Quitting mid-question leaves that prompt pending for your next session instead of denying it.
What's wrong with this entry?
When Claude Code has committed to shutting down, a pending permission request, tool approval or dialog is no longer cancelled or auto-denied. It is simply left unanswered so the next process can pick it up. Live for everyone on this build.
- Internally the shutdown path hands back a promise that never settles, and the tool loop waits on the same thing at several points once exit is committed.
- Replies that would answer this session's human are not injected; they are counted as replies left for the next process.
- The old special-case machinery that parked "ask user a question" across shutdown is deleted in favour of this general rule.
- New shutdown telemetry reports how many human requests were outstanding at exit.
tengu_shutdown_pending_state, this one is shutting down and settles no question
Strings lifted out of the shipped bundle, so the claim above can be checked against them.