Skip to content

[Feature]: terminal send needs --text-file or stdin — multi-line text cannot be sent reliably today #14915

Closed

Description

@Tauri-EPO

Translated to English (the template asks for it). The closing note has been narrowed to design context rather than a second request — see the bottom.

Problem or use case

orca terminal send accepts its text only through --text <string>. There is no --text-file, and it does not read stdin. For a coordinator sending structured briefings to agents, that makes multi-line text impossible to send reliably.

$ orca terminal send --help
Usage: orca terminal send [--terminal <handle>] [--text <text>] [--enter] [--interrupt] [--json]

Confirmed in src/cli/specs/core.ts: the command's allowedFlags are terminal, text, enter, interrupt and the globals. Nothing else.

Why --text does not cover it. Tested sending a ~3900-character briefing with headings, lists and code blocks:

  • --text-file <path> → invalid_argument; the flag does not exist.
  • Passing multi-line content through a shell wrapper on Windows truncates at the first line break. The call reported Sent 88 bytes — the briefing's title and nothing else — and --enter then submitted that fragment, so the agent received a single decontextualised line as if it were the instruction.
  • Escaping everything onto one line works, but destroys the readability of the message the human sees in the agent's terminal, and is where quoting mistakes come from.

The workaround in use today is to write the briefing to a file and send a one-line --text saying "read this path and execute". It works, but it adds a step that can fail — the agent may not read it — and it makes the instruction depend on an absolute path on this disk, which survives neither a different machine nor a remote agent.

Proposed solution

Any of these, in order of preference:

  1. --text-file <path> — the CLI reads the file and sends its contents as one block. Minimal and trivial.
  2. stdin — cat briefing.md | orca terminal send --terminal … --stdin --enter, which composes with everything else.
  3. Accept a repeated --text, one per line. Least good, but it unblocks.

Alternatives or additional context

The file-and-pointer workaround above is the alternative, and its failure modes are the reason for filing: it depends on the agent choosing to read the path, and on that path existing on whatever machine the agent runs on.

One piece of design context, not a second request. When the destination pane is busy, send --text … --enter queues the message into a follow-up box rather than delivering it, and an extra --enter queues it again — so the agent receives the same instruction twice when it closes its turn. I saw the two copies side by side.

That is a different defect and I am not asking for it here. It is relevant only because it bears on this feature's design: if send starts accepting large blocks, it is worth deciding deliberately what happens when the target is busy, rather than inheriting the current behaviour at a larger size. If maintainers would like the queueing behaviour and the fact that --json does not distinguish delivered from queued tracked as their own issue, I am happy to file it separately.

Related: #14822 (injected prompts sitting unsubmitted in the composer), #14914 (what happens downstream when a send lands in a composer that is not clean).

Activity

  1. changed the title [-][Feature]: terminal send precisa de --text-file ou stdin — hoje texto multi-linha nao ha como enviar[/-] [+][Feature]: terminal send needs --text-file or stdin — multi-line text cannot be sent reliably today[/+] on Aug 16, 2026
  2. n0an commented on Sep 9, 2026

    @n0an

    Same failure on macOS (Orca 1.4.194), with two details that differ from the report above and may help narrow it down.

    1. It is not only a multi-line problem. Single-line payloads truncate too.

    Sending into a Claude Code pane with orca terminal send --terminal <handle> --text "<payload>" --enter, no shell wrapper involved:

    Payload Delivered
    356 B, single line whole
    792 B, single line whole
    1327 B, single line last ~305 chars only, front lost
    3146 B, multi-line last line only

    So collapsing the message onto one line — the workaround suggested above — stops being reliable once the payload is large enough. I did not bisect the exact threshold; whole at 792 B and truncated at 1327 B are the bounds I have.

    2. bytesWritten reported the full payload size in every case, including the truncated ones.

    {"ok": true, "result": {"send": {"accepted": true, "bytesWritten": 3146}}}

    That send delivered roughly 60 bytes. In the original report, Sent 88 bytes at least matched what actually arrived; here the number matches what was submitted, not what landed.

    That combination makes the failure invisible from both ends. The caller sees accepted: true and a plausible byte count. The receiving agent then answers the surviving fragment coherently, so its reply reads like a reasonable response to the whole message — I only caught it because the reply addressed my closing sentence and nothing above it. The only reliable check I found was reading the target session's own transcript from disk and comparing its last received message against what I sent.

    Suggestion, alongside --text-file / stdin: have --json distinguish bytes written toward the pty from input the target actually received, or omit bytesWritten when that distinction is not available. As it stands there is no CLI-side way to verify a send succeeded. This overlaps with #10662.

    The --text-file or stdin fix requested here would resolve the underlying problem for my use case. The file-and-pointer workaround is what I am using meanwhile, and it holds up as long as the pointer itself stays short.

  3. Tauri-EPO commented on Sep 11, 2026

    @Tauri-EPO
    ContributorAuthor

    Closing. Retested on Orca 1.4.200 (Windows 11): orca terminal send --text $'echo L1\necho L2\necho L3' --enter wrote 24 bytes and all three lines ran in the target shell. The truncation reported here does not reproduce on this build. #17401 is closed with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions