[BUG] Claude Desktop incorrectly reads tags <Name> and </Name> as <n> and </n> from files
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?
Note: This is a Claude Desktop issue, not Claude Code.
Filing here because no Claude Desktop issue tracker exists.
Environment
- Claude Desktop on Windows 11
- Using desktop-commander MCP server for file operations
- Also affects built-in Linux container tools
Expected Behavior
XML tags should be preserved exactly as they appear in the file/input:<Name>SomeValue</Name>
Actual Behavior
Tags are corrupted/transformed at the client level:<n>SomeValue</n>
Impact
- Claude cannot correctly parse or generate XML files with <Name> tags
- Affects ALL file reading methods (MCP servers, built-in tools, direct paste)
- Workaround required: manually instructing Claude to interpret
<n>as<Name>
Root Cause Hypothesis
The corruption appears to happen in Claude Desktop's input processing layer, suggesting possible overly aggressive HTML/XML sanitization or tag normalization that incorrectly transforms <Name> → <n>.
What Should Happen?
Expected Behavior
XML tags should be preserved exactly as they appear in the file/input:<Name>SomeValue</Name>
Error Messages/Logs
Steps to Reproduce
Scenario 1: Reading files via MCP
- Create a file containing XML with
<Name>and</Name>tags - Read the file using desktop-commander MCP server
- Observe that Claude receives
<n>and</n>instead
Scenario 2: Pasting XML content directly in chat
- Copy XML content containing
<Name>tags - Paste it directly into Claude Desktop chat
- Use the built-in
viewtool (Linux container) to read the pasted content - The
viewtool also returns corrupted tags (<n>instead of<Name>)
This indicates the corruption happens at the Claude Desktop client level, before content reaches any backend tools.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
it's in Claude Desktop and judging by the other similar reports in Claude CLI version: 0.2.45 (Claude Code), Claude CLI version: claude/v1.5.0
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
_No response_
16 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
All the other threads were auto-closed without any actual fix.
I'm sorry for calling out directly to @bcherny, @hackyon-anthropic, @fvolcic but this bug was reported many times and never got any attention and I hope that this way maybe someone besides github-actions will notice and this can be fixed :)
Bump
Bump
Bump
I hope someone will look into this eventually ;)
I still have hope ;)
Bump
pmuB
Up
Is there a good workaround for this serious defect?
Not that I know of
Also seeing this bug. I have a temporary workaround in my app's xml parsing to map
<n>back to<name>because Claude absolutely cannot be persuaded to give me<name>. It is not limited to Windows. Also on macOS.Closing for now — inactive for too long. Please open a new issue if this is still relevant.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.