[FEATURE] Leave Claude with single Ctrl+D

Status Open
Maintainer reply None cached
Activity 14 comments · opened Dec 15, 2025

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.

View original on GitHub ↗

14 Comments

github-actions[bot] · 8 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/4288
  2. https://github.com/anthropics/claude-code/issues/7391

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] · 7 months ago

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.

sblaisot · 7 months ago

Still an issue

JayDoubleu · 7 months ago

+1

gornostal · 6 months ago

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.

graehl · 5 months ago

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

coldham10 · 4 months ago

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"

tdterry · 4 months ago

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.

vchimishuk · 3 months ago

+1
It is very annoying and breaks the user experience humanity has developed since UNIX epoch start.

gabriel-breda · 2 months ago

yes please, so annoying. And it's easy to claude --continue if I change my mind

burke · 2 months ago

Claude 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.

hsgg · 1 month ago

Sonnet thinks this is a bug as well (not just everyone in this report):

If you start with an empty input, one press exits immediately.
it's worth filing a bug at github.com/anthropics/claude-code/issues
ghjm · 1 month ago

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.

hsgg · 1 month ago

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