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

[BUG] Unwanted backslash appended when using Shift+Enter for line breaks

Open JaySchenk opened this issue 1 year ago • 4 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?

When I press shift enter in CC on WSL or Powershell it leaves a trailing backslash on the end of the line. It does creates a new line.

When using Codex in WSL this issue doesn't happen while using shift+enter for a new line.

What Should Happen?

It shouldn't add a trailing backslash.

Error Messages/Logs


Steps to Reproduce

On windows install WSL2 ( WSL version: 2.5.9.0 ) Install CC in both WSL and through Powershell on Windows. Run the /terminal-setup command

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

Version 1.0.120

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

Image

JaySchenk avatar Sep 23 '25 12:09 JaySchenk

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 07 '25 10:12 github-actions[bot]

This is still happening in the latest Claude Code. Alt return works ok. Shift return inserts a backslash

primeBeri avatar Dec 16 '25 14:12 primeBeri

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 17 '26 10:01 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Jan 24 '26 14:01 github-actions[bot]