Description
Pressing Ctrl+C in OpenCode immediately exits the application. This is extremely frustrating because Ctrl+C is the universal copy shortcut on Windows (and commonly used on Linux too).
Users frequently press Ctrl+C out of habit when trying to copy text, and accidentally terminate their entire session - losing context and conversation history.
The Problem
| Shortcut |
User Expectation |
OpenCode Behavior |
Ctrl+C |
Copy selected text |
Exits application |
This happens constantly during normal usage:
- Copying error messages to search online
- Copying code snippets from AI responses
- Copying file paths or commands
- General muscle memory from every other application
Expected Behavior
Option 1 (Recommended): Require double Ctrl+C or Ctrl+C twice within 1-2 seconds to exit
- First
Ctrl+C: Show message "Press Ctrl+C again to exit"
- Second
Ctrl+C: Actually exit
Option 2: Use a different exit shortcut
Ctrl+D (common in Unix terminals for EOF/exit)
Ctrl+Q (quit)
/exit or /quit command only
Option 3: Make Ctrl+C cancel current operation only (like Claude Code)
- If AI is generating: Cancel generation
- If idle: Do nothing or show exit hint
- Never exit immediately on single Ctrl+C
Comparison with Other Tools
| Tool |
Ctrl+C Behavior |
| Claude Code |
Cancels current operation, does NOT exit |
| Cursor |
Copy (normal IDE behavior) |
| VS Code |
Copy |
| Most CLI tools |
Interrupt current command, not exit shell |
Environment
- OS: Windows 11 (also affects Linux users)
- Terminal: Windows Terminal, PowerShell, Git Bash
Related Issues
This deserves a dedicated issue due to its significant impact on user experience. Accidental exits cause real productivity loss.
Description
Pressing
Ctrl+Cin OpenCode immediately exits the application. This is extremely frustrating because Ctrl+C is the universal copy shortcut on Windows (and commonly used on Linux too).Users frequently press Ctrl+C out of habit when trying to copy text, and accidentally terminate their entire session - losing context and conversation history.
The Problem
Ctrl+CThis happens constantly during normal usage:
Expected Behavior
Option 1 (Recommended): Require double
Ctrl+CorCtrl+Ctwice within 1-2 seconds to exitCtrl+C: Show message "Press Ctrl+C again to exit"Ctrl+C: Actually exitOption 2: Use a different exit shortcut
Ctrl+D(common in Unix terminals for EOF/exit)Ctrl+Q(quit)/exitor/quitcommand onlyOption 3: Make Ctrl+C cancel current operation only (like Claude Code)
Comparison with Other Tools
Environment
Related Issues
This deserves a dedicated issue due to its significant impact on user experience. Accidental exits cause real productivity loss.