You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Worker mail submits a half-typed prompt in a Pi coordinator terminal #45901
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?
Start a Pi agent in an Orca terminal and make it coordinate at least one worker.
In the coordinator's terminal, type some text and do not press Enter.
Have a worker run orca orchestration send to the coordinator.
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
fix(pi): hold worker mail while a Pi terminal has an unsent draft
fix(pi): hold worker mail while a Pi terminal has an unsent draft (#4…