Repository navigation
fix: support a host-owned idle steering fallback - #593
leehom0123 wants to merge 4 commits into
Conversation
(cherry picked from commit 84bfbe8)
Resolve the conflict in performSteeringRequest by keeping the host-owned idle fallback branch and adopting the new startNewTurnFromSteering signature from main (ACP v2 rework): the idle steer now forwards its clientUserMessageId like the injection path does.
|
Merged latest main ( Verification on Windows: typecheck passes; the 29 targeted steering/plan-approval tests pass. The full suite fails 70 tests in 10 files, and a run of the same 10 files on the unmodified @EugeneTheDev could you take a look at the conflict resolution, since it touches the steering path your v2 work changed? @fontanierh heads-up that #441's patch in this PR has been rebased over the v2 rework. |
If a Codex turn finishes just before
_session/steeringreaches it, the adapter starts another turn and returnsstartedNewTurn. The client never receives that new prompt's final response. If the original prompt is still waiting for plan approval, steering waits too, which can block clients that process steering and permission replies serially.This adds the opt-in requested in #440:
{"_meta":{"steering":{"idleBehavior":"promptRequired"}}}Live turns still receive the input through native steering. When no turn can accept it, the adapter returns
promptRequiredwithreason: "noRunningTurn", leaving the input unconsumed and starting no new turn. The client can answer any pending approval, wait for the original prompt to finish, then send the input through a normalsession/prompt. Calls without the option behave as before.This builds on @fontanierh's patch in #441, cherry-picked with the original author and source reference preserved. I added regression tests for pending plan approval, malformed metadata tests, and usage documentation.
Fixes #440.
Testing
4583cb3, in history, attachment, and path assertions.The real Codex tests used temporary local runners, adapted for the removed
authRequired()call in the repository's test script. Cancellation dispatch has unit coverage; the real test used the reject-plan path.For clients:
promptRequiredis a steering result, not completion of the original prompt or its approval request. The existing_meta.steering.supportedflag also does not distinguish support for this option, so clients need to check the adapter version.