Repository navigation
Conversation
…art is unobserved `orca orchestration dispatch --inject` wrote the preamble into the agent's composer and then, when the submission verifier reported agent_prompt_stalled, failed the dispatch and revoked its capability. The preamble was already in the pane, so the worker went on to execute the task and had every heartbeat and worker_done rejected with "capability is revoked" (stablyai#17066; same shape as stablyai#16660 and stablyai#16902). A stall on the inject path now mirrors the coordinator's dispatched-unobserved handling from stablyai#16590: the dispatch stays `dispatched`, the capability stays valid, and the response carries `promptUnobserved: true` so the caller knows to read the terminal instead of re-injecting. Any other failure still fails the dispatch as before. Refs stablyai#17066 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe orchestration dispatch RPC now distinguishes stalled prompt observation from other injection failures. It keeps the dispatch active, returns Merge Risk: 🔵 Low · up to The change prevents valid worker progress from being rejected after an unobserved prompt start, but a terminal that never begins the task can leave the dispatch and its capability active indefinitely, and the new warning is English-only for localized CLI users. The PR is mergeable with explicit owner awareness and follow-up on cleanup and localization. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Description checkExplanation The description is complete and relevant. It covers the motivation, implementation, linked issues, behavior proof, testing, AI disclosure, compatibility considerations, and checklist status. The linked issue section uses explicit issue references instead of a Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 18b23f2c-dc04-46c2-8e04-318b1eb48e75
📒 Files selected for processing (3)
src/cli/handlers/orchestration/dispatch-handlers.tssrc/main/runtime/rpc/methods/orchestration-dispatch-methods.tssrc/main/runtime/rpc/methods/orchestration-tasks-dispatch.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
orchestration.dispatchstall handling —agent_prompt_stallednow leaves the dispatchdispatched(capability stays valid) and adds an optionalpromptUnobservedresponse field; every other error still callsdb.failDispatchand rethrows.- CLI human-readable output —
orca orchestration dispatch --injectprints a one-line "read the terminal before re-sending anything" note when the turn start was unobserved. - Test coverage — a new case asserts the dispatch and task stay
dispatchedandcapability_revoked_atstays null on a stalled injection.
The core premise is sound: writeTerminalAgentPrompt writes the paste bytes and the submit Enter before verifyAgentPromptSubmission runs, so agent_prompt_stalled can only mean "turn start not observed" — never "preamble missing". The change is consistent with the coordinator's dispatched-unobserved path in coordinator-task-dispatch.ts:145 and the worker-start receipt's retainCapability in orchestration-worker-start-receipt.ts:34. The promptUnobserved field is additive, so old CLIs degrade cleanly (they see injected: true and no error, which is the intended no-retry behavior). The test re-reads DB state (getTask, getDispatchContextById), so it genuinely fails if the fix is reverted.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Closing: #16904 (merged 2026-09-06,
The |

ELI5
dispatch --injecttypes the task into an agent's terminal and then waits to see the agent start working. When it could not see that, it marked the dispatch failed and revoked the worker's credentials — even though the task was already sitting in the agent's input box and the agent went on to do the work. Every progress report the worker then sent was rejected. Now, when the only problem is "we did not see the turn start", the dispatch stays active and the response says so.What Changed
src/main/runtime/rpc/methods/orchestration-dispatch-methods.ts: whensendTerminalAgentPromptthrowsagent_prompt_stalled, the dispatch is leftdispatched, the capability stays valid, the response gainspromptUnobserved: true, and a warning is logged. Any other error still fails the dispatch as before. This mirrors the coordinator'sdispatched-unobservedhandling from fix(agent-prompt): stop reporting delivered prompts as stalled (#16095) #16590.src/cli/handlers/orchestration/dispatch-handlers.ts: the human-readable output tells the caller the preamble is in the composer and to read the terminal before re-sending anything.src/main/runtime/rpc/methods/orchestration-tasks-dispatch.test.ts: a stalled injection keeps the dispatchdispatched, the taskdispatched, andcapability_revoked_atnull.Why
#17066: ten consecutive
dispatch --injectruns against an idle Codex terminal returnedagent_prompt_stalledabout 7 s after injection, the preamble sat unsubmitted in the composer, a manual Enter made Codex run the task, and everyheartbeat/worker_donewas rejected withDispatch <id> capability is revoked. The same pattern is reported for Hermes/opencode (#16660) and Grok (#16902). #16590 already stoppedworker-startand the coordinator from revoking on this verdict; the--injectpath still calleddb.failDispatch, which setscapability_revoked_at. The prompt bytes are written before verification, so a stall on this path can never prove the preamble is missing — failing the dispatch and revoking is the wrong default. Making the first Enter land reliably is a separate PR (agent-prompt composer observation); this one stops the lifecycle damage when it does not.Linked Issue
Refs #17066, #16660, #16902
Visual Proof
N/A — RPC/CLI behavior only.
orca orchestration dispatch --injecton a stall now prints the dispatch as[dispatched]plus a one-line note instead of{"ok": false, "error": {"code": "agent_prompt_stalled"}}.Testing
Ran on Windows 11:
AI Disclosure
Written with Claude Code (Claude Fable 5.1) under direction of @Tauri-EPO.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Wire compatibility:
promptUnobservedis a new optional response field; old CLIs ignore it and seeinjected: true. Behavior change to weigh: a caller that used the stall error as a signal to retry no longer gets an error. #17066 and #15976 both document that retry as harmful (it pastes on top of the parked preamble), so the new default matches what the field reports asked for.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) —tc:node,tc:cli, the dispatch RPC tests and oxlint on changed files pass locally; full lint/build left to CI🤖 Generated with Claude Code