Skip to content

[FEATURE]: Require double Ctrl+C to exit (like Claude Code) #15932

Closed as duplicate

Description

@lamnickdavid

Feature hasn't been suggested before.

  • 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!

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Mar 4, 2026
  2. github-actions commented on Mar 4, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  3. plucury commented on Mar 4, 2026

    @plucury

    This would be very useful. Without it, I often trigger it accidentally and end up exiting.

  4. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions