Tool calls rendered as raw text and fail to parse with claude-opus-4-8 in VS Code extension

Resolved 💬 1 comment Opened Jun 5, 2026 by JunichiMatsuoka Closed Jun 8, 2026

Summary

Tool calls from claude-opus-4-8 are rendered as raw text in the VS Code extension instead of being executed, causing the session to hang indefinitely. This does not occur with claude-opus-4-7 or claude-sonnet-4-6.

Environment

  • Claude Code version: 2.1.145
  • Platform: VS Code extension
  • OS: Windows 11 Enterprise
  • Model affected: claude-opus-4-8
  • Models NOT affected: claude-opus-4-7, claude-sonnet-4-6

Steps to Reproduce

  1. Open a project in VS Code with the Claude Code extension
  2. Ensure the model is set to claude-opus-4-8 (default or via /model)
  3. Ask Claude to perform any task that requires tool use (e.g., read a file, search code)
  4. Observe that the tool call appears as raw text in the chat

Actual Behavior

The tool call is rendered as raw XML-like text in the chat with a spurious count token at the beginning:

count
<invoke name="Read">
  <parameter name="file_path">...</parameter>
</invoke>

The following error is displayed:

"The model's tool call could not be parsed (retry also failed)."

The session stops and does not recover automatically. The user must manually intervene to resume.

Expected Behavior

Tool calls should be executed without appearing as raw text in the chat.

Additional Context

Verified across 5 projects with a clear model-version correlation:

| Model | Tool calls executed | Issue occurs |
|---|---|---|
| claude-opus-4-8 | yes | yes (2 projects) |
| claude-opus-4-7 | yes (75+ calls) | no (2 projects) |
| claude-sonnet-4-6 | yes (20+ calls) | no (1 project) |

Workaround: Set "model": "sonnet" in ~/.claude/settings.json, or switch via /model sonnet.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗