[FEATURE] Add a setting to exit with a single Ctrl+D instead of pressing it twice
Preflight Checklist
- [ ] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Summary
Exiting Claude Code currently requires Ctrl+D, Ctrl+D (pressed twice). Add a configuration option to allow exit on a single Ctrl+D, applied uniformly to a normal claude session, claude --resume, and the claude agents view. The default stays as-is (double Ctrl+D); single-press is strictly opt-in.
Motivation
- Double Ctrl+D is an extra keystroke for users who never fire it accidentally and want a fast, single-key exit.
- Behavior should be consistent everywhere — the same setting should govern the normal session,
--resume, andclaude agents, rather than each view having its own exit convention. - Keeping double Ctrl+D as the default preserves the current accidental-exit safeguard for everyone who relies on it.
Proposed Solution
- Add a config setting (e.g. in
~/.claude/settings.json) to control how many Ctrl+D presses are required to exit:
``json``
{ "singleCtrlDExit": true }
- When enabled, a single Ctrl+D exits — in
claude,claude --resume, andclaude agentsalike. - When unset/false, keep the current double Ctrl+D behavior (default, unchanged).
- The setting applies uniformly across all three views (and probably more); there is no per-view override.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Raising priority to High — this is not a one-off ask. There are already multiple existing user requests for the same behavior, showing real, repeated demand:
- #14027 — "Leave Claude with single Ctrl+D" (open)
- #78928 — "Make double-press Ctrl+C/Ctrl+D exit confirmation configurable" (open)
- #9177 — "Add user-configurable keyboard shortcut actions" (open; would encompass this)
Multiple independent users have requested exiting with a single Ctrl+D / making the exit gesture configurable, so this warrants prioritization rather than sitting as a low-priority nice-to-have.
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
Environment
- Claude Code version: 2.1.198
- Platform: Linux (CLI / console)
Related
- #79435
- #79443
- #79451
Duplicates
- #14027
- #78928
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗