Skip to content

[Bug]: Worker mail submits a half-typed prompt in a Pi coordinator terminal #45901

Closed

Description

@wuhaoyujerry

Where were you using Orca?

Desktop only

Orca version

v1.4.266 (Pi 1.6.0)

Operating system

macOS

Details

Short summary: When a Pi agent coordinates Orca workers, a worker's report can submit the half-typed prompt in the coordinator's Pi terminal.

What happened?
I was typing a prompt in a Pi coordinator terminal while its workers were running. A worker sent its report (orchestration send). Orca typed its "check your mail" note into the coordinator's input box and pressed Enter, which also sent my unfinished prompt.

Orca already holds mail while a terminal has unsent typed text (ptyDeliveryHold in src/main/runtime/terminal/wait/terminal-wait-settlements.ts). For Claude, Codex and OpenCode this works. For Pi it never turns on:

  • readTerminalComposerTypedText (src/shared/terminal/input/terminal-composer-draft.ts) finds a draft only after a ❯, › or » prompt symbol.
  • Pi's input box has no prompt symbol. Pi draws a border line, the typed text, then another border line.
  • hasComposerDraft has a special case for OpenCode only, so Pi uses the generic check and always gets "no draft".

How can we reproduce it?

  1. Start a Pi agent in an Orca terminal and make it coordinate at least one worker.
  2. In the coordinator's terminal, type some text and do not press Enter.
  3. Have a worker run orca orchestration send to the coordinator.
  4. Expected: delivery waits ("terminal has typed text that is not sent yet"). Actual: the note and your unfinished text are submitted together.

A recorded Pi screen with please refactor the login page so typed but not sent, read through HeadlessEmulator.getCursorLineContext():

────────────────────────────────────────────
please refactor the login page so
<cursor>
────────────────────────────────────────────

readTerminalComposerTypedText(context) returns null for this screen. The same check returns the draft for the saved Claude screen claude-2-1-316-default-labelled-middle.

Activity

  1. added 2 commits that reference this issue on Nov 20, 2026
    88c2f48
    55fb22f
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