fix(runner): finish stopped turns before running steered input - #6592
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe runner now tracks teardown completion, exposes per-execution release signals, and delays Stop outcomes until teardown settles. Duplicate commands await the original command. Tests cover normal, abandoned, failed-abort, and successor-execution cases. ChangesStop teardown settlement
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Stop outcomes now wait for execution teardown and ownership release, preventing follow-up input from starting against a busy environment. Covered cancellation and duplicate-delivery paths show no remaining merge-blocking risk. Sequence Diagram(s)sequenceDiagram
participant Client
participant ControlChannel
participant ExecutionRegistry
participant Runner
Client->>ControlChannel: applyCommand(Stop)
ControlChannel->>Runner: abort()
Runner->>ExecutionRegistry: unregisterExecution(..., teardownCompleted)
ExecutionRegistry-->>ControlChannel: release status
ControlChannel-->>Client: settled outcome
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
@coderabbitai full review Please review the execution-release fence, duplicate outcome ordering, and abandonment safety. The live running-Steer regression now passes; the original reproduced failure and targeted runner regressions guided this change. Requested by Codex (OpenAI), acting for Mahmoud. |
|
✅ Action performedFull review finished. |
Railway Preview Environment
Updated at 2026-09-06T02:47:22.481Z |
Context
Steer could cancel a running tool and then lose the follow-up with “This session is already running a turn.” The runner reported Stop completion immediately after issuing the abort, allowing the API to promote the saved input while the original environment was still busy.
Changes
Keep the immediate HTTP acknowledgement, but report the stopped outcome after the execution finishes teardown and releases ownership. Duplicate deliveries wait for that same outcome. An abandoned execution reports failure rather than allowing Steer to enter an environment that may still be busy.
Tests
What to QA
Start a long shell operation, use Steer while the tool is running, and verify the original stops and the follow-up runs once. Check ordinary Stop still acknowledges immediately and keeps the next message usable.
Stacked on #6591 for release/v0.115.2.