You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Require double Ctrl+C to exit (like Claude Code) #15932
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Hi, thanks for the great project!
I noticed that currently pressing Ctrl+C immediately exits opencode. In interactive usage it's quite easy to accidentally hit Ctrl+C and lose the current session.
Would it be possible to add an option to require pressing Ctrl+C twice within a short time window to exit, similar to how Claude Code behaves?
Example behavior:
First Ctrl+C → show a message like: Press Ctrl+C again to exit
Second Ctrl+C (within ~2 seconds) → exit the program
This pattern helps prevent accidental exits during interactive sessions.
Ideally it could be configurable, for example:
double_ctrl_c_to_exit = true
or enabled by default for interactive mode.
Thanks for considering!
Reacted by Raphael David François, Sergey Kostrukov, plucury, Savely Sivkov, Kieran Pilkington, Jimmy Sun, Xynonners, erkineryol, Lucas Lin and Douglas P. Fields, Jr.
Activity
github-actions commentedon Mar 4, 2026
This issue might be a duplicate of existing issues. Please check:
For keybind-related issues, please also check our pinned keybinds documentation: #4997
plucury commentedon Mar 4, 2026
This would be very useful. Without it, I often trigger it accidentally and end up exiting.