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]: Orchestration message pointer is typed + submitted over the user's unsent prompt draft #22651
When a Run message arrives for a coordinator terminal with no live waiter, Orca types You have N orchestration messages. Run ... plus Enter into the coordinator's agent prompt. If the user is mid-way through typing a prompt, that unsent draft is submitted together with the pointer.
Worker heartbeat messages trigger this repeatedly during normal runs.
Expected
Do not inject (or hold the injection) while the prompt has a draft. detectTerminalComposerDraft already reports the draft on orca terminal read --screen, so the delivery path could check it before writing.
Notes
Seen with both Claude Code and Codex coordinators.
For Codex, draft detection only works on the rendered screen: CODEX_FOOTER_LINE does not match a footer that includes the reasoning effort (e.g. <model> low · ...), so the stream-based check misses Codex drafts.
Still reproducible on 1.4.217 (macOS, Claude Code coordinator).
The pointer is written to the PTY and a separate \r follows ~500 ms later (enterTimer in deliverPendingMessages), so an unsent draft is submitted together with the pointer. In our runs the trigger is almost always worker heartbeats.
Workaround that avoids it today: keep a waiter whose --types includes heartbeat (a loop running check --wait --types worker_done,escalation,question,heartbeat that acks heartbeat-only deliveries). Pointer delivery skips types that have a live waiter, so nothing is typed into the prompt. Heartbeats that arrived before the loop got delivered_at set (pointer typed); after it they were consumed silently.
Gap: between waits (right before/after processing a delivery) the pointer can still land on a draft. A draft check before writing (as proposed above), or keeping heartbeats out of pointer delivery (#14910 / #15173), is still needed.
orca terminal wait --for tui-idle returns satisfied: true at once.
orca terminal send --text "…" --enter is accepted, and the agent receives one prompt: the user's half line and the
sent text joined. Twice in two tries.
A suggestion: wait --for tui-idle not satisfied while draft is non-empty (or a --for empty-draft condition), and terminal send refusing, or holding, while a draft is present unless --force. Until then we read draft before
every send.
Reproduced on 1.4.221 with a Claude Code coordinator. The pointer was submitted together with the user's draft, so the agent received a single turn reading:
You have 1 orchestration message. Run `orca orchestration check --run run_…`.
ok
where ok was the user's unsent reply to an earlier question. In this Run most pointers were for heartbeat or status ("Setup succeeded for worker …") deliveries, i.e. nothing the coordinator needed to act on.
Activity
AmethystLiang commentedon Sep 24, 2026
Very valid. Looking into improving this for composer that we can detect draft
soonJ817 commentedon Sep 30, 2026
Still reproducible on 1.4.217 (macOS, Claude Code coordinator).
The pointer is written to the PTY and a separate
\rfollows ~500 ms later (enterTimerindeliverPendingMessages), so an unsent draft is submitted together with the pointer. In our runs the trigger is almost always worker heartbeats.Workaround that avoids it today: keep a waiter whose
--typesincludesheartbeat(a loop runningcheck --wait --types worker_done,escalation,question,heartbeatthat acks heartbeat-only deliveries). Pointer delivery skips types that have a live waiter, so nothing is typed into the prompt. Heartbeats that arrived before the loop gotdelivered_atset (pointer typed); after it they were consumed silently.Gap: between waits (right before/after processing a delivery) the pointer can still land on a draft. A draft check before writing (as proposed above), or keeping heartbeats out of pointer delivery (#14910 / #15173), is still needed.
ixiion001 commentedon Oct 6, 2026
The same happens through the CLI, not only with the orchestration nudge (1.4.220, macOS, Claude Code coordinator):
ZEBRA half lineinto the agent's prompt and does not press Enter.orca terminal read --screen --jsonshows it:.result.terminal.draft="ZEBRA half line".orca terminal wait --for tui-idlereturnssatisfied: trueat once.orca terminal send --text "…" --enteris accepted, and the agent receives one prompt: the user's half line and thesent text joined. Twice in two tries.
A suggestion:
wait --for tui-idlenot satisfied whiledraftis non-empty (or a--for empty-draftcondition), andterminal sendrefusing, or holding, while a draft is present unless--force. Until then we readdraftbeforeevery send.
Race428 commentedon Oct 7, 2026
Reproduced on 1.4.221 with a Claude Code coordinator. The pointer was submitted together with the user's draft, so the agent received a single turn reading:
where
okwas the user's unsent reply to an earlier question. In this Run most pointers were for heartbeat orstatus("Setup succeeded for worker …") deliveries, i.e. nothing the coordinator needed to act on.