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

Ctrl-D unexpectedly terminates session instead of deleting characters in macOS

Open FMs-sugiyama opened this issue 7 months ago • 6 comments

Ctrl-D unexpectedly terminates session instead of deleting characters in macOS

Description

When using Claude Code CLI on macOS, pressing Ctrl-D unexpectedly terminates the entire session instead of deleting characters forward as it normally would in standard macOS terminals.

Expected Behavior

Ctrl-D should delete the character at the cursor position (forward delete), matching standard macOS terminal behavior.

Current Behavior

Pressing Ctrl-D immediately terminates the Claude Code session, causing loss of context and requiring restart.

Environment Information

  • OS: macOS 15.4.1 (Sequoia)
  • Terminal: xterm-256color (Node.js based terminal emulator)
  • Claude Code version: 0.2.107 (Claude Code)
  • Shell: zsh

Additional Information

This behavior is disruptive to the normal workflow as many macOS users rely on Ctrl-D for forward deletion. The termination happens without warning or confirmation, potentially causing loss of work.

Steps to Reproduce

  1. Start Claude Code CLI with claude command
  2. Begin typing a prompt
  3. Position cursor within the text
  4. Press Ctrl-D
  5. Observe that the session terminates instead of deleting a character

FMs-sugiyama avatar May 10 '25 06:05 FMs-sugiyama

This seems to be a regression from the fix applied in #960. It also impacts platform:linux

mceachen avatar Sep 02 '25 17:09 mceachen

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.

github-actions[bot] avatar Dec 06 '25 10:12 github-actions[bot]

I have just encountered this several times today.

Claude Code v2.0.65 MacOS 14.5 Iterm2

whw avatar Dec 12 '25 00:12 whw

Me too

cce avatar Dec 13 '25 01:12 cce

Can confirm there is a regression here recently.

duckSquirrelPilot avatar Dec 15 '25 05:12 duckSquirrelPilot