[Bug] Anthropic API Error: Tool Result Block Without Corresponding Tool Use Block

Resolved 💬 1 comment Opened Jun 1, 2026 by larryxiao Closed Jun 1, 2026

Bug Description
API Error: 400 messages.7.content.0: unexpected tool_use_id found in advisor_tool_result blocks: srvtoolu_01JjfQsdhSJkT7qLCL7Pj9jc. Each advisor_tool_result block must have a corresponding server_tool_use block before it.

Environment Info

  • Platform: darwin
  • Terminal: tmux
  • Version: 2.1.159
  • Feedback ID: 91228eda-77e3-4d12-b516-a9b0cf5e374f

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.7.content.0: unexpected `tool_use_id` found in `advisor_tool_result` blocks: srvtoolu_01JjfQsdhSJkT7qLCL7Pj9jc. Each `advisor_tool_result` block must have a corresponding `server_tool_use` block before it.\"},\"request_id\":\"req_011CbboXqqvWYaCeMQ6aVjWV\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:64224)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-01T03:07:59.155Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.7.content.0: unexpected `tool_use_id` found in `advisor_tool_result` blocks: srvtoolu_01JjfQsdhSJkT7qLCL7Pj9jc. Each `advisor_tool_result` block must have a corresponding `server_tool_use` block before it.\"},\"request_id\":\"req_011CbboYysQCwSJUfWMJaywZ\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:64224)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-01T03:08:14.598Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.7.content.0: unexpected `tool_use_id` found in `advisor_tool_result` blocks: srvtoolu_01JjfQsdhSJkT7qLCL7Pj9jc. Each `advisor_tool_result` block must have a corresponding `server_tool_use` block before it.\"},\"request_id\":\"req_011CbboaDef3RSxMrZjQ2BSW\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:64224)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:51:7694)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-06-01T03:08:31.399Z"}]

View original on GitHub ↗

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