Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
I use OpenCode on macOS with Ghostty, and I accidentally exit OpenCode several times a day by pressing Ctrl+D.
Ctrl+D is deeply ingrained in my terminal workflow, and when working with long-running agent sessions it's easy to hit it unintentionally, immediately terminating the session.
Comparison
I don't experience this with Claude Code, Codex CLI, or Kimi Code, since they require an additional action (such as confirmation or a second key press) before exiting, making accidental termination much less likely.
Proposal
Would it be possible to make exit confirmation configurable?
For example, one of the following:
- Require pressing
Ctrl+D twice within a short timeout.
- Show a confirmation prompt before exiting.
- Add a configuration option (e.g.
confirm_exit: true).
- Allow users to disable or remap
Ctrl+D for app_exit independently.
This would preserve the current default behavior while allowing users who frequently hit Ctrl+D by accident to avoid losing active agent sessions.
Note: This is not a duplicate of the Ctrl+C discussions. This request is specifically about accidental exits caused by Ctrl+D on macOS.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
I use OpenCode on macOS with Ghostty, and I accidentally exit OpenCode several times a day by pressing
Ctrl+D.Ctrl+Dis deeply ingrained in my terminal workflow, and when working with long-running agent sessions it's easy to hit it unintentionally, immediately terminating the session.Comparison
I don't experience this with Claude Code, Codex CLI, or Kimi Code, since they require an additional action (such as confirmation or a second key press) before exiting, making accidental termination much less likely.
Proposal
Would it be possible to make exit confirmation configurable?
For example, one of the following:
Ctrl+Dtwice within a short timeout.confirm_exit: true).Ctrl+Dforapp_exitindependently.This would preserve the current default behavior while allowing users who frequently hit
Ctrl+Dby accident to avoid losing active agent sessions.Note: This is not a duplicate of the
Ctrl+Cdiscussions. This request is specifically about accidental exits caused byCtrl+Don macOS.