[Bug] Anthropic API Error: Tool result block missing corresponding tool use block
Resolved 💬 2 comments Opened Jun 9, 2026 by PrathikRamakrishnan Closed Jun 13, 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?
Bug Description
API Error: 400 messages.5.content.0: unexpected tool_use_id found in advisor_tool_result blocks: srvtoolu_01WNW3RQDq2wFXb9AfbQmzjc. Each advisor_tool_result block
must have a corresponding server_tool_use block before it.
Environment Info
- Platform: darwin
- Terminal: WarpTerminal
- Version: 2.1.169
- Feedback ID: ef5496c0-5052-4541-9c39-e5abd40d467a
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.0: unexpected `tool_use_id` found in `advisor_tool_result` blocks: srvtoolu_01WNW3RQDq2wFXb9AfbQmzjc. Each `advisor_tool_result` block must have a corresponding `server_tool_use` block before it.\"},\"request_id\":\"req_011Cbt5USpg71qxWSGvvmWug\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:68056)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-09T17:26:32.813Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.5.content.0: unexpected `tool_use_id` found in `advisor_tool_result` blocks: srvtoolu_01WNW3RQDq2wFXb9AfbQmzjc. Each `advisor_tool_result` block must have a corresponding `server_tool_use` block before it.\"},\"request_id\":\"req_011Cbt5ae1YKvwdcfyuapTpd\"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:68056)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-06-09T17:27:56.681Z"}]
What Should Happen?
Should have allowed to continue the session atleast
Error Messages/Logs
API Error: 400 messages.5.content.0: unexpected `tool_use_id` found in `advisor_tool_result` blocks: srvtoolu_01WNW3RQDq2wFXb9AfbQmzjc. Each `advisor_tool_result` block
must have a corresponding `server_tool_use` block before it.
Steps to Reproduce
Launch a skill, run advisor, set a goal. Encountered below error. Session is unusable now, doesnt get back even after /exit.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.170
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
<img width="1447" height="757" alt="Image" src="https://github.com/user-attachments/assets/8a7cad82-fd3d-4822-b662-ed78fd0843f4" />
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗