Skip to content

[Bug]: terminal send --enter appends to the target's unsent draft and submits both #16289

Description

@luisgonzaleznf

Operating system

macOS

Orca version

1.4.188

Details

Short summary:
`orca terminal send --text --enter` does not check the target composer. If the target has an unsent draft, the sent text is added to the end of the draft. Enter then submits the draft and the sent text as one prompt.

What happened?
An agent in terminal A sent a message to terminal B. Terminal B had an unsent draft in its Claude Code composer. The agent could not see the draft. Terminal B ran one prompt made of the draft plus the message.

How can we reproduce it?

  1. Run `claude` in a terminal. Wait for the composer.
  2. Type `Refactor the login page so that it`. Do not press Enter.
  3. From another terminal, run `orca terminal send --terminal --text "Status update: the build is green." --enter`.
  4. Run `orca terminal read --terminal --screen`.

Result: the terminal submits `Refactor the login page so that itStatus update: the build is green.`

Expected: the send does not submit the user's draft. Refuse the send, or report the draft, when the composer is not empty. Then the sender can decide.

Anything else that might help:
The screen read in step 4 shows the draft before the send. The runtime has the information to detect it.

Activity

  1. AmethystLiang commented on Aug 27, 2026

    @AmethystLiang
    Contributor

    thanks for reporting. looking into it

  2. added theissue type on Sep 19, 2026
  3. luisgonzaleznf commented on Sep 21, 2026

    @luisgonzaleznf
    Author

    @nwparker — since this is assigned to you: the fix PR, #16290, had gone stale with merge conflicts and is now resolved and back to MERGEABLE (merge 893909e2f5, 2093 commits behind).

    It needed real surgery rather than a mechanical merge — upstream split orca-runtime.ts into ~200 mixin modules, so the guard had to be re-homed into orca-runtime-write-terminal-agent-prompt.ts. Two small refactors also ride along to stay under the 300-line max-lines gate, both noted on the PR.

    Full validation is green (typecheck, repo-wide lint, five verify/ratchet gates, ~12.7k tests including the end-to-end integration test for this guard). CodeRabbit had been paused on the branch since August and has been resumed, so a fresh review should land shortly.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingos:macosIssues affecting macOS

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions