[BUG] Ctrl+d to delete a character sometimes causes the app to exit

Resolved 💬 9 comments Opened Dec 9, 2025 by stiang Closed Mar 1, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Since about a day ago, pressing ctrl+d to edit the prompt text will sometimes abruptly exit the app, mid-edit.

What Should Happen?

Ctrl+d should _always_ be treated as delete-next-char unless the text field is empty.

Error Messages/Logs

Steps to Reproduce

  1. Type a text string into a prompt
  2. Use keyboard shortcuts to take the cursor back to the middle of the text
  3. Use ctrl+d repeatedly to delete characters
  4. Observe how the app sometimes exits

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

I’m not sure, but I would guess it worked in 2.0.61.

Claude Code Version

2.0.62

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

It would seem that it momentarily thinks the text field is empty, in which case ctrl+d would normally (and rightly) have the effect of closing the app. But this is a bug - I am editing a long prompt, so the text field is definitely not empty.

This happens on two different machines, one Linux and one Mac, since the same time - about 24 hours ago.

For those of use who use this shortcut to delete text, this is a very nasty bug, resulting in much lost work and frustration. It typically happens when you’re deep into editing a long prompt, and there is no way (that I know of) to recover what you’ve written, even with --resume.

Note that it doesn’t happen every time I use ctrl+d, just every so often, so it appears to be timing sensitive.

I am using Kitty as the terminal emulator, and starting Claude Code inside tmux.

View original on GitHub ↗

This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗