[Bug] Anthropic API Error: Missing Tool Result Block for Tool Use ID + hooks execution output as user messages?!
Resolved 💬 8 comments Opened Oct 3, 2025 by semikolon Closed Jan 9, 2026
Bug Description
So many times over the last few days I've been getting this:
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.103: `tool_use` ids were found without
`tool_result` blocks immediately after: toolu_01LyiKadDYSxLiPRfy4ScWgg. Each `tool_use` block must have a corresponding `tool_result`
block in the next message."},"request_id":"req_011CTkczFuzPea5e5779WfmK"}
and now lately this:
> Running PostToolUse:TodoWrite...
That is, the hook execution for tool use is being somehow output as if it were a user message I wrote?!?! Causing additional responses from Claude and general mayhem. Please please please look into this.
I'm Claude Coding all day long these days and NEED it to be stable.
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.0.5
- Feedback ID: 75e21d58-cd11-46c6-8c52-b0d143316d54
Errors
[{"error":"Error: Tool mcp__REF__ref_search_documentation not found\n at dJB (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2847:4252)\n at CC (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:19415)\n at Fp (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:42814)\n at I9 (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38355)\n at Ch (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38283)\n at TC (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38137)\n at OH (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:35216)\n at G6 (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:4841)\n at A5 (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:32461)\n at A.Q.updateContainer (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:40:1837)","timestamp":"2025-10-03T15:51:13.526Z"},{"error":"Error: Tool mcp__REF__ref_read_url not found\n at dJB (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2847:4252)\n at CC (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:19415)\n at Fp (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:42814)\n at I9 (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38355)\n at Ch (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38283)\n at TC (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38137)\n at OH (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:35216)\n at G6 (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:4841)\n at A5 (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:32461)\n at A.Q.updateContainer (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:40:1837)","timestamp":"2025-10-03T15:51:13.527Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n at QK (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1741:1183)\n at file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1741:911\n at Array.map (<anonymous>)\n at xX (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1741:902)\n at cJB (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2847:9380)\n at CC (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:19415)\n at Fp (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:42814)\n at I9 (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38355)\n at Ch (file:///Users/fredrikbranstrom/.nvm/versions/node/v22.12.0/lib/node_modules/@anthropic-ai/claude-cod
Note: Error logs were truncated.
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗