[Bug] Anthropic API Error: Tool Use Concurrency Conflict in PostToolUse Hook

Resolved 💬 7 comments Opened Oct 10, 2025 by romeromarcelo Closed Oct 16, 2025

Bug Description
The Error:

API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.

This error occurs when I use the PostToolUse hook and pass content to the {hookSpecificOutput: {hookEventName: "PostToolUse", additionalContext: .}} field in the JSON output. The issue arises when the agent executes tool calls in parallel that trigger the hook—in this case, file creation or updates.

Key Details:

  • The bug was introduced in version 2.0.9
  • This issue had been fixed in version 2.0.0 and worked correctly through version 2.0.8

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 2.0.13
  • Feedback ID: 2fb95a41-a7a7-45d5-b67e-3a3e90afb13f

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.2: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_011ERLs8xgGUG2Q7xb6sarcs, toolu_011HpajW86gAM7zohXQhFDsK, toolu_01EzfSYPfUbPC32skLoisfD4, toolu_01MsVPXgyWFVcagjct9Xmtm8, toolu_01UYGfaVT6VztjHAfBHZAmbC. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CTyv1cNcSC4x3Xp2Z66MB\"}\n    at generate (/$bunfs/root/claude:382:21386)\n    at makeRequest (/$bunfs/root/claude:527:5345)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-10-10T17:30:19.932Z"}]

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗