[FEATURE] Leave Claude with single Ctrl+D
Problem Statement
Right now, the Claude command line can be exited by pressing Ctrl+D twice in quick succession. (After the first Ctrl+D, Claude says "Press Ctrl-D again to exit".) This is rather annoying, and it isn't how other similar utilities work. If you get the timing slightly wrong, you can accidentally end up exiting the parent shell as well. A single Ctrl+D should be enough.
Proposed Solution
Can double Ctrl+D either be removed or made configurable?
Claude itself suggests to run "claude config set confirm_exit false" to disable double Ctrl+D, but this config option doesn't seem to exist.
Priority
Low - Nice to have
Feature Category
CLI commands and flags
Use Case Example
I'm always exiting Claude with Ctrl+D like I do with all other shells and shell-like utilities like bash, gdb, python. It's a very normal thing for command line users.
14 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still an issue
+1
Another use case where double CTRL+D creates a problem is when coding from a smartphone via SSH client.
It's difficult to hit the combination in such a short time window because the terminal emulator keyboard is tiny, and it takes more than a second to hit two keys.
C-d out of ssh sessions due to this. The default needs to be C-d exits. the 'double tap' timeout is ridiculously small but who even asked for this? it already gives you a command to resume ... really poor PM judgment on this one
This is was a very opinionated UX choice, and it was a bad opinion. Thank you for
--resume; please don't try to keep your REPL as a semi-daemon. Don't make us special-case near-universal shortcuts because your CLI tool is "more important"pretty please. Exits are routinely three or four CTRL+D presses because invariably I hit it once expecting it to exit, see the message, remember to hit it a second time, then it's too late. Then I end up hitting it twice more to finally get out.
+1
It is very annoying and breaks the user experience humanity has developed since UNIX epoch start.
yes please, so annoying. And it's easy to
claude --continueif I change my mindClaude is the one application in the world that doesn't respect Ctrl-D on an empty input and it is honestly a bit infuriating. Please at least add a config option to quit on a single Ctrl-D.
Sonnet thinks this is a bug as well (not just everyone in this report):
I would go so far as to call the current behavior dangerous. If you are a frequent Claude Code user, you're training yourself to hit ^D ^D from muscle memory. If you do this in any other context where ^D is expected, you will almost certainly exit something you didn't want to exit.
Please prioritize this.
I vibe-coded a workaround: A script that wraps the call to claude, catches all input, and doubles every occurrence of Ctrl+D. Use at your own risk, obvs. https://github.com/hsgg/double-ctrl-d