GrepBoard/Manuals
605 manuals ·

Fix Claude Code API Error 400: tool use concurrency issues

·Tested on Claude Code official docs · 2026-10·Test scope ↓·5 steps

Claude Code API Error 400 tool use concurrency issues means tool_use and tool_result blocks in history no longer match. Check your version, then /rewind.

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

The sequence of tool_use, tool_result, and thinking blocks in the conversation history no longer matches what the API expects, and the fix is to /rewind to a point before it broke. Resending the same message carries the broken history along, so the error repeats.

The official error reference groups all of these messages under the same cause.

MessageMeaning
400 due to tool use concurrency issuesTool calls and results are out of pairing
400 orphaned tool_result in conversation historyA result is left without its tool_use
400 duplicate tool_use ID in conversation historyThe same tool call ID appears twice
unexpected tool_use_id found in tool_result blocksA result points at a call ID not in history
thinking blocks ... cannot be modifiedA thinking block was resent in altered form

[1] Check your version first. The docs say that on Opus 4.7 or Opus 4.8, Claude Code versions before v2.1.156 can trigger this error during normal tool use, and /rewind does not clear it. Update before anything else in that case.

console
$ claude --version$ claude update

[2] Run /rewind, or press Esc twice while the prompt input is empty, to open the rewind menu. If the input has text, double Esc only clears it, so empty the input first.

[3] Pick the prompt that started the turn right before the error, then choose an action.

Menu itemWhat it does
Restore conversationConversation back to that point; files stay as they are now
Restore code and conversationBoth conversation and files back to that point
Restore codeFiles back; conversation kept

To clear the error and keep the edits made so far, choose Restore conversation.

[4] Resend the restored prompt. After you restore the conversation, the original prompt of the selected message is put back into the input, so send it as is or edit it.

[5] If it comes back after a rewind, move to a new session. Clear the conversation with /clear or start claude fresh, and restate briefly what you were doing. Right after /clear, the rewind menu shows a /resume <session-id> (previous session) entry at the top that returns to the old conversation, but if the broken history is still in it you hit the same error again.

Issues on the official repository report this error right after context compaction (#37452, #40305) and on the first message after /resume (#39818). All three are closed, and the official docs do not split the cause that way, so do not treat compaction or resume as the confirmed cause. If it keeps happening in the same situation, check whether it still reproduces on the latest version and report it.

If code that calls the API directly gets the same 400, the cause is the same but the fix is in your own messages array; see Fix Claude API 400 "tool_use without tool_result". For handling long conversations and compaction, see Claude Code: /compact vs /clear.

#claude-code#api-error#400#rewind