Skip to content

fix(acp): Allow multiple Ctrl-C calls to exit program#82

Merged
CSRessel merged 1 commit into
devfrom
claude/fix-ctrl-c-exit-011pSzgm7Ey75s52nqWweQ8N
Dec 6, 2025
Merged

fix(acp): Allow multiple Ctrl-C calls to exit program#82
CSRessel merged 1 commit into
devfrom
claude/fix-ctrl-c-exit-011pSzgm7Ey75s52nqWweQ8N

Conversation

@CSRessel
Copy link
Copy Markdown
Collaborator

@CSRessel CSRessel commented Dec 5, 2025

Previously, Op::Shutdown was silently ignored by the ACP backend, causing the double Ctrl-C quit mechanism to fail. When a user pressed Ctrl-C at idle state, the TUI would send Op::Shutdown but the ACP backend would ignore it, so no ShutdownComplete event was sent back and the program would never exit.

This change properly handles Op::Shutdown by:

  1. Canceling any in-progress ACP session
  2. Sending a ShutdownComplete event back to the TUI

This allows the TUI to receive the shutdown signal and exit properly.

Previously, Op::Shutdown was silently ignored by the ACP backend,
causing the double Ctrl-C quit mechanism to fail. When a user pressed
Ctrl-C at idle state, the TUI would send Op::Shutdown but the ACP
backend would ignore it, so no ShutdownComplete event was sent back
and the program would never exit.

This change properly handles Op::Shutdown by:
1. Canceling any in-progress ACP session
2. Sending a ShutdownComplete event back to the TUI

This allows the TUI to receive the shutdown signal and exit properly.
@CSRessel CSRessel merged commit d64953c into dev Dec 6, 2025
1 of 3 checks passed
@CSRessel CSRessel deleted the claude/fix-ctrl-c-exit-011pSzgm7Ey75s52nqWweQ8N branch December 6, 2025 02:07
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.

2 participants