Skip to content

Pasting text into command code crashes the application with UnexpectedEoF #529

Description

@dutchbase

Summary

When I try to paste text into the command code cli (the length of text is not a factor) then it crashes right away.

thread '<unnamed>' panicked at src/lib.rs:72:37:
called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: UnexpectedEof, error: "failed to read whole buffer" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)

Command Code v0.40.8

models: deepseek-v4-pro with high effort · taste-1

Expected Behavior

When I copy text to the terminal, I expect it to be pasted in. In a tmux session, this should work with CTRL+0

Actual Behavior

Command code crashes immediately.

thread '<unnamed>' panicked at src/lib.rs:72:37:
called `Result::unwrap()` on an `Err` value: IoError(Custom { kind: UnexpectedEof, error: "failed to read whole buffer" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)

Steps to reproduce the issue

  1. copy text from anywhere
  2. open command code and try to paste the text

Command Code Version

0.40.8

Operating System

Linux

Terminal/IDE

tmux

Shell

bash

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions