Problem#
A queued message promoted to Steer after Stop was accepted could be moved onto the stopping run and lost. The run can still report running while its provider finishes stopping, so checking status alone was insufficient.
Change#
Use the persisted Stop marker in the shared steering path to reject explicit steer, restart and queued-message promotion into a stopping run. Rejection leaves the queued message and its held state intact.
A normal send whose automatic delivery would steer that stopping run instead takes the existing queue path. It follows earlier queued messages and, consistent with current main, resumes their hold. An explicit Steer/Restart still fails during the Stop window. Ordinary interrupt-and-restart steering without an explicit Stop is unaffected.
Scope and approval#
Maintainer takeover of lbgos's contribution, preserving contributor history. Shared server orchestration covers clients and providers using these commands. This integrates #21473's user-send-resumes-queue behavior; agent, MCP and scheduled sends retain their existing exclusions. No merge is requested.
Verification#
At 84e64d8, incorporating main c274a25:
- 235 focused orchestration tests passed, plus scoped server typecheck, formatting and lint. Only pre-existing lint warnings remain. Fresh independent full Opus and Sol reviews were clean; their independent focused runs passed 61 and 49 tests respectively.
- The existing promotion regression proves rejection preserves the held queue. The normal-send regression proves ordered queuing without steering and release of the hold. The old held-queue expectation failed after current-main integration and was corrected to match the intended resume behavior.
- Independent scratch proof drove the real orchestrator, effect worker and projection store: after a controlled provider-stop event, the earlier queued message reached starting and the normal send remained behind it, with no held runs or steering. Without the normal send, the queue stayed held. Replacing the orchestrator with the base version reproduced the lost-send failure. The test waited on domain events, with no wall-clock sleeps.
Limits: deterministic service proof with a controlled Codex-shaped adapter and injected terminal events, not a live provider or browser/native Resume flow. The scratch proof stops at the next run reaching starting; it does not claim that run completed a provider turn. Review also confirmed Stop disposes the delegated-completion cohort before delivery, so the previously suspected retry concern does not require an extra guard.
Current-head CI remains separate from the focused local checks.
Prepared through T3 Code: Claude Opus 5.5 tests and independent review, Claude Fable 5.1 implementation, and GPT-6.1 Sol independent review, using Claude Code and Codex harnesses.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
65996d0d-6039-4fde-b58a-876508413bd8📥 Commits
Reviewing files that changed from the base of the PR and between c71f5af35aa8f1f14bea46d8d924dde3ae388503 and 42a849df7c1fe731a5d521fe2fb1d48e8c5f4f20.
📒 Files selected for processing: 2
apps/server/src/orchestration-v2/Orchestrator.tsapps/server/src/orchestration-v2/SteeringCompletion.integration.test.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
📝 Walkthrough
When Stop has reached a target run, the orchestrator rejects steering into that run. It also changes automatic steering or restart delivery to queueing. Integration tests check both behaviors while the queue is held.
Changes: Delivery after stop request
apps/server/src/orchestration-v2/Orchestrator.ts,apps/server/src/orchestration-v2/SteeringCompletion.integration.test.tsdispatchSteerIntoRunrejects steering when Stop has reached the target run.dispatchMessagechanges automaticsteer_activeandrestart_activeintents toqueue_after_activein that state. Integration tests check that queued messages remain held and in order.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
42a84The reviewed Stop-aware delivery change is mergeable after normal checks; no unresolved defect was identified.
Security architecture risk: 🔵 Low · up to
42a84The change preserves accepted Stop decisions and keeps later messages queued instead of sending them into work that is shutting down. No new privileges or external interfaces are introduced. Remaining uncertainty concerns interruption and recovery behavior.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Pre-merge checks:
4
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment `@coderabbitai help` to get the list of available commands.