What happened?
In non-interactive stream-json mode, interrupting the active turn aborts session-lifetime control infrastructure as well as the turn. The control dispatcher and pending control requests use the same signal as the current model turn, so interrupt() can make the session unusable for later prompts or leave request ownership ambiguous.
Deterministic reproduction:
- Start a reusable non-interactive stream-json session.
- Begin a turn and issue a turn-owned control request.
- Interrupt the active turn.
- Submit another prompt on the same session.
- Observe that session-lifetime dispatch has also been aborted, so later control traffic cannot proceed reliably.
What did you expect to happen?
Interrupt should cancel only the active turn and its pending control requests. The session and lifetime dispatcher should remain usable for a later prompt, and full session shutdown should still cancel both lifetime and turn-owned work.
Client information
Client Information
Qwen Code: 0.21.4
Platform: Windows 11
Node.js: v24.16.0
npm: 11.13.0
Login information
Not login-provider specific; reproduced in deterministic CLI session and control-dispatcher tests.
Anything else we need to know?
The lifecycle needs distinct session-lifetime and current-turn abort signals. Pending requests must bind to the signal for the turn that created them rather than whichever turn happens to be current later.
What happened?
In non-interactive stream-json mode, interrupting the active turn aborts session-lifetime control infrastructure as well as the turn. The control dispatcher and pending control requests use the same signal as the current model turn, so
interrupt()can make the session unusable for later prompts or leave request ownership ambiguous.Deterministic reproduction:
What did you expect to happen?
Interrupt should cancel only the active turn and its pending control requests. The session and lifetime dispatcher should remain usable for a later prompt, and full session shutdown should still cancel both lifetime and turn-owned work.
Client information
Client Information
Login information
Not login-provider specific; reproduced in deterministic CLI session and control-dispatcher tests.
Anything else we need to know?
The lifecycle needs distinct session-lifetime and current-turn abort signals. Pending requests must bind to the signal for the turn that created them rather than whichever turn happens to be current later.