Skip to content

fix(cli): decline questions from interrupted turns - #259

Closed
KaiEureka wants to merge 1 commit into
mainfrom
codex/fix-audit-question-cancellation-20261025
Closed

KaiEureka wants to merge 1 commit into
mainfrom
codex/fix-audit-question-cancellation-20261025

Conversation

@KaiEureka

Copy link
Copy Markdown
Collaborator

When a model returned two ask_user calls in one batch, interrupting the first question still allowed the second question to take over the terminal. A fresh follow-up could then be consumed as an answer to the cancelled turn.

Associate interactive reads with their owning CLI turn's cancellation event. Later questions from an interrupted turn use the existing declined-answer path, preserving a result for every tool call. Ordinary tools retain the existing batch cancellation behavior, including writes already included in that batch.

The native SDK and PromptSession regression failed before the fix and passed afterward. Related CLI and cancellation tests passed all 191 cases. Four real PTY cases cover single-question cancellation, double-question cancellation, normal answers and a fresh interactive follow-up after cancellation. Repository Ruff, import constraints and dependency checks passed.

@KaiEureka KaiEureka closed this Oct 25, 2026
@KaiEureka
KaiEureka deleted the codex/fix-audit-question-cancellation-20261025 branch October 25, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant