[BUG] Claude Desktop incorrectly reads tags <Name> and </Name> as <n> and </n> from files

Resolved 💬 16 comments Opened Jan 22, 2026 by XJanuszCH Closed Jun 25, 2026

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

  1. Create a file containing XML with <Name> and </Name> tags
  2. Read the file using desktop-commander MCP server
  3. Observe that Claude receives <n> and </n> instead

Scenario 2: Pasting XML content directly in chat

  1. Copy XML content containing <Name> tags
  2. Paste it directly into Claude Desktop chat
  3. Use the built-in view tool (Linux container) to read the pasted content
  4. The view tool 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_

View original on GitHub ↗

16 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/525
  2. https://github.com/anthropics/claude-code/issues/866
  3. https://github.com/anthropics/claude-code/issues/1150

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

XJanuszCH · 5 months ago

All the other threads were auto-closed without any actual fix.

XJanuszCH · 5 months ago

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 :)

XJanuszCH · 5 months ago

Bump

XJanuszCH · 5 months ago

Bump

XJanuszCH · 5 months ago

Bump

XJanuszCH · 5 months ago

I hope someone will look into this eventually ;)

XJanuszCH · 5 months ago

I still have hope ;)

XJanuszCH · 5 months ago

Bump

XJanuszCH · 4 months ago

pmuB

XJanuszCH · 4 months ago

Up

TKProlifics · 3 months ago

Is there a good workaround for this serious defect?

XJanuszCH · 3 months ago

Not that I know of

rmd-gh · 3 months ago

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.

github-actions[bot] · 1 month ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 21 days ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.