claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

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

Open stiang opened this issue 2 weeks ago • 3 comments

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.

stiang avatar Dec 09 '25 06:12 stiang

Also having this problem

cce avatar Dec 12 '25 17:12 cce

Can confirm this is a recent regression.

duckSquirrelPilot avatar Dec 15 '25 05:12 duckSquirrelPilot