[BUG] If a user types a \ in the prompt, in certain cases, it's treated as an escape character, for example ~\.folder
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?
User prompts should be read as the user types them. If the users text needs to be pre-processed to escape characters that should be done by the input handler. When I type a path or some other sequence of text with backslashes, For example: ~\.claude, it shouldn't turn into ~.claude. If the internal mechanism needs a \ escaped, it should escape it. The user shouldn't have to type ~\\.claude ever to represent a single \.
What Should Happen?
A user should type ~\.claude and see ~\.claude when it posts, not ~.claude. If the input handler escapes it for internal use, it should un-escape it for re-displaying it.
Error Messages/Logs
Steps to Reproduce
Type text in a prompt for Claude... use \ within that text. It's context sensative so if the \ is followed by a . you just get a . instead of \. as you should.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
I don't know what the previous version was, it updates on an almost daily basis.
Claude Code Version
Claude 1.2278.0 (e5213f) 2026-04-13T17:49:21.000Z
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
I couldn't see Claude for Windows as an option in choosing the Terminal I'm using.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗