Skip to content

Fix AI CLI interrupt handling and immediate turn recovery - #3263

Merged
youknowriad merged 3 commits into
trunkfrom
codex/fix-code-cli-interrupt-prompt
Apr 28, 2026
Merged

Fix AI CLI interrupt handling and immediate turn recovery#3263
youknowriad merged 3 commits into
trunkfrom
codex/fix-code-cli-interrupt-prompt

Conversation

@youknowriad

Copy link
Copy Markdown
Contributor

Summary

  • Make ESC interrupt handling immediate in the AI CLI UI so the user gets an instant interruption notice instead of waiting for SDK cleanup
  • Centralize interrupt cleanup in AiChatUI and suppress duplicate interruption rendering from late SDK messages
  • Let the next prompt start a fresh turn directly after an interrupt instead of queuing behind the interrupted turn
  • Cover the interrupt lifecycle and immediate next-prompt behavior with focused regression tests

Testing

  • npx eslint --fix on the touched CLI UI, command, and test files
  • npm test -- apps/cli/ai/tests/ui.test.ts apps/cli/commands/ai/tests/ai.test.ts
  • npm run typecheck
@wpmobilebot

wpmobilebot commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing dbf0d01 vs trunk

app-size

Metric trunk dbf0d01 Diff Change
App Size (Mac) 1453.95 MB 1453.92 MB 0.03 MB ⚪ 0.0%

site-editor

Metric trunk dbf0d01 Diff Change
load 1782 ms 1505 ms 277 ms 🟢 -15.5%

site-startup

Metric trunk dbf0d01 Diff Change
siteCreation 8081 ms 8084 ms +3 ms ⚪ 0.0%
siteStartup 4951 ms 4953 ms +2 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@youknowriad
youknowriad merged commit 2f921e2 into trunk Apr 28, 2026
8 of 10 checks passed
@youknowriad
youknowriad deleted the codex/fix-code-cli-interrupt-prompt branch April 28, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants