claude-code - 💡(How to fix) Fix [BUG] Bash tool call rendered as raw XML instead of executing

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Claude Code should either execute the Bash tool call normally, or show a normal tool/error state if execution is unavailable.

Error Messages/Logs

Code Example

<invoke name="Bash">
<parameter name="command">git status --short; echo "--- DIFF cli.py ---"; git diff ...</parameter>
<parameter name="description">gitの現状態確認</parameter>
</invoke>

A later response also displayed:
<invoke name="Bash">
<parameter name="command">git add .company/automation/skills/lsp-lsr-updater/lsp_lsr_updater/cli.py</parameter>
<parameter name="description">cli.pyをステージング</parameter>
</invoke>

These looked like tool calls, but they were shown as normal assistant text. The commands did not appear to run, and the workflow became confusing/stuck.

This is not only a cosmetic rendering issue. It creates a false execution state: the UI shows what looks like a Bash invocation, but the command does not run. Subsequent assistant behavior may then proceed as if git status/diff/add or other operations were completed, causing downstream workflow errors.

### What Should Happen?

Claude Code should either execute the Bash tool call normally, or show a normal tool/error state if execution is unavailable.

It should not render internal/tool-call syntax such as `<invoke name="Bash">` / `<parameter name="command">` as assistant message text.

### Error Messages/Logs
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

During a Claude Code session, Bash tool calls were rendered in the chat as raw XML-like text instead of being executed.

For example, the assistant displayed text like:

<invoke name="Bash">
<parameter name="command">git status --short; echo "--- DIFF cli.py ---"; git diff ...</parameter>
<parameter name="description">gitの現状態確認</parameter>
</invoke>

A later response also displayed:
<invoke name="Bash">
<parameter name="command">git add .company/automation/skills/lsp-lsr-updater/lsp_lsr_updater/cli.py</parameter>
<parameter name="description">cli.pyをステージング</parameter>
</invoke>

These looked like tool calls, but they were shown as normal assistant text. The commands did not appear to run, and the workflow became confusing/stuck.

This is not only a cosmetic rendering issue. It creates a false execution state: the UI shows what looks like a Bash invocation, but the command does not run. Subsequent assistant behavior may then proceed as if git status/diff/add or other operations were completed, causing downstream workflow errors.

### What Should Happen?

Claude Code should either execute the Bash tool call normally, or show a normal tool/error state if execution is unavailable.

It should not render internal/tool-call syntax such as `<invoke name="Bash">` / `<parameter name="command">` as assistant message text.

### Error Messages/Logs

```shell
No stack trace was shown.

Observed raw assistant output included XML-like tool calls such as:

<invoke name="Bash">
<parameter name="command">git status --short; echo "--- DIFF cli.py ---"; git diff ...</parameter>
<parameter name="description">gitの現状態確認</parameter>
</invoke>

and:

<invoke name="Bash">
<parameter name="command">git add .company/automation/skills/lsp-lsr-updater/lsp_lsr_updater/cli.py</parameter>
<parameter name="description">cli.pyをステージング</parameter>
</invoke>

After manually checking the repository, the referenced cli.py diff/staged change was not present.

Steps to Reproduce

  1. Open Claude Code in a local git repository on Windows.
  2. Ask Claude to inspect git status/diff and stage a file.
  3. Observe that instead of a Bash tool execution UI, the assistant message renders raw XML-like text such as <invoke name="Bash">.
  4. Check the repository manually with git status --short and git diff.
  5. The command shown in the raw XML text did not appear to have executed.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown

Claude Code Version

2.1.140

Platform

Other

Operating System

Windows

Terminal/Shell

Other

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Bash tool call rendered as raw XML instead of executing