Skip to content

[BUG] View tool mangles XML tags #866

@commi

Description

@commi

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version: claude/v1.5.0
  • Operating System: Linux 6.11.7-x64v3-xanmod1
  • Terminal: Bash

Bug Description

XML tag discrepancy between hex view and text view when working with XML files. The system appears to be replacing certain XML tags when they're displayed in text output.

Steps to Reproduce

  1. Create or access an XML file with short tag names (e.g., <name> tags)
  2. View the file using the View tool or cat command, which shows <n> tags
  3. Examine the same file with a hex editor (xxd), which reveals the actual content has <name> tags
  4. Create a new file based on what you see in the View tool
  5. The resulting file shows discrepancy between what was intended and what was actually written

Expected Behavior

Tools should display XML tags exactly as they appear in the file, without any modification or substitution.

Actual Behavior

  • Text view (using View tool or cat) shows <n> tags
  • Hex view (using xxd) shows <name> tags for the same elements
  • When writing new files based on what's shown in the text view, the system maintains this inconsistency

Metadata

Metadata

Assignees

No one assigned

    Labels

    autocloseIssue will be closed automaticallybugSomething isn't workingduplicateThis issue or pull request already existsplatform:linuxIssue specifically occurs on Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions