[BUG] Raw <invoke> XML printed to terminal and session hangs — requires user message to resume (Windows, v2.1.168)
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?
During normal operation, Claude outputs raw <invoke> XML for tool calls directly to the terminal, then the session halts indefinitely. Pressing Enter has no effect. The only way to resume is to send a new message (e.g. "continue").
This occurs from the very beginning of any session — not only after long sessions. It has been happening consistently for several days with no changes on the user side.
The word "count" appears in the terminal immediately before the XML every time.
What Should Happen?
Claude Code should silently intercept the <invoke> XML, execute the tool, return the result to the model, and continue processing — without printing raw XML to the terminal and without requiring any user input to resume.
Error Messages/Logs
count
<invoke name="Read">
<parameter name="file_path">D:\Users\andokaz\...\someFile.ts</parameter>
</invoke>
<invoke name="Grep">
<parameter name="pattern">SomePattern</parameter>
<parameter name="path">D:\Users\andokaz\...\someDir</parameter>
<parameter name="output_mode">files_with_matches</parameter>
</invoke>
Steps to Reproduce
- Open Claude Code in PowerShell on Windows 11 (any directory — confirmed
to occur in both regular directories and Git worktree directories)
- Ask Claude to perform a task that involves multiple tool calls
(e.g. "Read this file and search for a pattern")
- Observe that Claude prints "count" followed by raw <invoke> XML to the
terminal, then stops
- Press Enter — no response
- Type any message (e.g. "continue") and press Enter — Claude resumes
from exactly where it left off
Environment:
- Claude Code version: 2.1.168
- OS: Windows 11
- Shell: PowerShell
- Node.js: v24.12.0
- Install method: WinGet (winget install Anthropic.ClaudeCode)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.168
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
- Restarting Claude Code does not resolve the issue
- Also reported via /bug command (Feedback ID: d541bad9-145a-48c7-831f-71b55ec4e4a4)
- Related to (but distinct from) issue #62344: occurs from session start
rather than only in long sessions, and recovers with a user message
rather than requiring /clear
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗