[BUG] Tool-use blocks intermittently rendered as plain text instead of executing

Resolved 💬 2 comments Opened Jun 13, 2026 by brownsoo Closed Jun 17, 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?

Environment: Claude Code (desktop/app), model Opus 4.8

Symptom: Tool invocations (Bash/Edit) are intermittently emitted as raw
markup in the chat transcript and never execute. The assistant then has
to retry. Correlates with command complexity — simple single commands
(e.g. git branch --show-current) usually execute; multi-line Bash with
pipes/quoted grep patterns, or multiple tool calls in one turn, leak as
text far more often. Straight quotes sometimes appear converted to curly
quotes / -- to en-dash in the leaked text.

Impact: Many failed/retried tool calls in one session; high token cost
($200+), user friction.

Repro: not deterministic; increases with command complexity and
multi-tool turns.

What Should Happen?

Claude need to execute the script rather than displaying its contents in the dialog box.

Error Messages/Logs

#85699 레드마인 일감을 조회합니다(키는 .env.version에서 읽음).

Facts:

현재 요청: 레드마인 일감 #85699 조회.
이 명령이 확인하는 것: .env.version의 REDMINE_URL/API_KEY로 #85699 제목·상태·담당·설명 조회(HTTP 코드 포함). 키는 출력하지 않음.

call
<invoke name="Bash">
<parameter name="command">cd /Users/brownsoo/Workspace/hello/hiclass-ios
set -a; . ./.env.version; set +a
curl -s -H "X-Redmine-API-Key: $REDMINE_API_KEY" "$REDMINE_URL/issues/85699.json?include=journals" -o /tmp/rm85699.json -w "HTTP:%{http_code}\n" --max-time 25
python3 -m json.tool /tmp/rm85699.json 2>/dev/null | grep -E ""id"|"subject"|"name"|created_on|updated_on|done_ratio|"status"" | head -25
echo "--- description (head) ---"
python3 -c "import json;d=json.load(open('/tmp/rm85699.json'));print((d.get('issue',{}).get('description') or '(none)')[:1200])" 2>/dev/null</parameter>
<parameter name="description">Fetch Redmine issue 85699</parameter>
<parameter name="timeout">40000</parameter>
</invoke>

Steps to Reproduce

There are no specific steps required for reproduction.

However, it occurs in only one session and is not fixed even if I keep requesting a fix.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Claude 1.12603.1 (3df4fd) 2026-06-11T16:57:36.000Z

Claude Code Version

Claude 1.12603.1 (3df4fd) 2026-06-11T16:57:36.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗