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

Resolved 💬 17 comments Opened Oct 12, 2025 by Vhailors Closed Oct 21, 2025

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?

Randomly every 15 minutes of usage I've got this, can't do any more complicated prompt without trigger this. It's making a CC unusable!

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

What Should Happen?

I should be able to work without error

Error Messages/Logs

Steps to Reproduce

  1. Write any more complicated prompt
  2. Wait CC to crash

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.14

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

17 Comments

github-actions[bot] · 9 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/8763
  2. https://github.com/anthropics/claude-code/issues/9002
  3. https://github.com/anthropics/claude-code/issues/8867

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

jeffzickgraf · 9 months ago

Claude code asked me to report this same issue I'm seeing as well so I'm adding this comment here as I am also receiving this issue making Claude Code unusable.

When reporting, include:

  • Version: 2.0.14
  • Environments affected: Ubuntu and WSL (both experiencing the issue)
  • Frequency: Happening frequently over the last couple days
  • Pattern: Occurs when asking general questions in Ubuntu and questions about multiple repositories in VS Code
  • Error: API Error 400 - tool use concurrency issues
  • Workaround attempts: Moved to WSL (didn't resolve it)

This appears to be an issue with how Claude Code handles parallel tool calls in recent versions. The development team will need to investigate the API rate limiting or concurrency
handling on their end.

More from Claude:
Environment:

  • OS: Linux (WSL2) - 5.15.133.1-microsoft-standard-WSL2
  • Shell: /bin/bash
  • Node: v18.20.8
  • Also occurs on native Ubuntu and using VSCode

Error Type: 400 invalid_request_error

Symptom: Conversation state becomes corrupted where tool_use blocks are sent without corresponding tool_result blocks in the conversation history.

Frequency: Multiple times over the last few days

Usage Pattern: Asking general questions in Ubuntu instance + questions about multiple repositories in VS Code

Debug Log Evidence: Available in ~/.claude/debug/ directory showing repeated instances of tool_use/tool_result mismatch

Impact: Conversation becomes unrecoverable and requires /rewind to restore

This is clearly a state management bug in how Claude Code tracks tool calls and results across the conversation history, especially when handling multiple parallel tool invocations.

My experience: /rewind doesn't help and the conversation is unrecoverable.

jpvanoosten · 9 months ago

API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.
I'm getting the same issue. I'm using the Visual Studio Code extension, and there doesn't seem to be a /rewind command. My only option is to start a new conversation and try to continue from the previous one...

sumitpanwar10 · 9 months ago

Facing the same, and it is happening since last claude-code update.

akifnadeem17 · 9 months ago

I’m facing the same issue—this problem has been occurring since the last update of the Claude Code extension.
Error: API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.
However, when I try using the /rewind command, nothing happens; there seems to be no command available.

faizan-ali · 9 months ago

Running into this as well as of the last update and my suspicions align with Jeff; the conversation seems to be in an unrecoverable bad state.

ramarnat · 9 months ago

Also confirming that this has been happening since the last updates.

adamjmurray · 9 months ago

I've started running into this several times a day. It completely breaks my workflow.

KMDgit · 9 months ago

This shit is stopping in the middle of the work.
API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.

dbarnett · 9 months ago
My experience: /rewind doesn't help and the conversation is unrecoverable.

+1, and this is the infuriating part... It says to use /rewind which doesn't even exist in the native UI version, doesn't give any guidance about how to find what to restore it to, and /rewind in the terminal version doesn't actually fix anything for me, the conversation is dead and unrecoverable from that point.

smnbbrv · 9 months ago

that is really annoying and counter-productive. In fact, all explanations and guidance you do through the session just gets lost

acidtech · 9 months ago

The cause(at least one of them) is returning "deny" in a json block in pretooluse hooks. Use sys.exit(2) instead and send the error via print and stderr to bypass this error.

Anthropic should start paying me for fixing there garbage code.

jpvanoosten · 9 months ago

This is what happens when you let AI write your tools.
AI slop.
I guess that's why there are currently 4.4k open issues on this repo (4.3k are bot spam)

jpvanoosten · 9 months ago

An another note: I've wasted so much time clicking "Yes" or "Yes, and don't ask me again" every time Claude wants to run a python command:

{
  "permissions": {
    "allow": [
      "Bash(.venv/Scripts/python.exe -c \"from src.services.depot_service import DepotService; from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - using p4 opened -a instead of p4 resolve -n'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.services.p4_service import P4Service; from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - P4 commands will be logged to application log widget'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.workers.depot_workers import ArchiveWorker; from src.ui.widgets.depot_widget import DepotWidget; from src.ui.widgets.depot.depot_data_manager import DepotDataManager; print(''Import successful - archive now checks for opened files before archiving and offers to revert them'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - archive now uses pending_changelists_dialog to show and revert opened files'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - archive shows pending changelists dialog directly without intermediate message'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.workers.depot_workers import ArchiveWorker; from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - fixed: no error dialog, proper path format for pending changelists'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - no success dialog when only opened files found'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - default changelist selection now matches by user'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - revert groups by client and uses p4 revert -C client fileSpec'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - removed redundant fstat pending resolves check'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - archive will retry after closing pending changelists dialog'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - selection changes now debounced with 150ms delay'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - debounce timer removed, multi-selection shows summary instead of file details'')\")",
      "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - simplified to single _on_selection_changed method'')\")"
    ],
    "deny": [],
    "ask": []
  }
}

Maybe I don't know the syntax for this or how to just say "Shutup and do it!" but at this point, I'm just getting frustrated!
I keep doing it because:

  1. I don't care about the code it generates (as long as it works for me)
  2. I hope it will eventually save me a lot of time (still yet to be proven)
drosophila82 · 9 months ago

reporting this iOS (15.6.1) + vscode using the Claud.ai add-on.

jpvanoosten · 8 months ago
An another note: I've wasted so much time clicking "Yes" or "Yes, and don't ask me again" every time Claude wants to run a python command: ``json { "permissions": { "allow": [ "Bash(.venv/Scripts/python.exe -c \"from src.services.depot_service import DepotService; from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - using p4 opened -a instead of p4 resolve -n'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.services.p4_service import P4Service; from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - P4 commands will be logged to application log widget'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.workers.depot_workers import ArchiveWorker; from src.ui.widgets.depot_widget import DepotWidget; from src.ui.widgets.depot.depot_data_manager import DepotDataManager; print(''Import successful - archive now checks for opened files before archiving and offers to revert them'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - archive now uses pending_changelists_dialog to show and revert opened files'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - archive shows pending changelists dialog directly without intermediate message'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.workers.depot_workers import ArchiveWorker; from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - fixed: no error dialog, proper path format for pending changelists'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - no success dialog when only opened files found'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - default changelist selection now matches by user'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - revert groups by client and uses p4 revert -C client fileSpec'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - removed redundant fstat pending resolves check'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot_widget import DepotWidget; print(''Import successful - archive will retry after closing pending changelists dialog'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - selection changes now debounced with 150ms delay'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - debounce timer removed, multi-selection shows summary instead of file details'')\")", "Bash(.venv/Scripts/python.exe -c \"from src.ui.widgets.depot.pending_changelists_dialog import PendingChangelistsDialog; print(''Import successful - simplified to single _on_selection_changed method'')\")" ], "deny": [], "ask": [] } } `` Maybe I don't know the syntax for this or how to just say "Shutup and do it!" but at this point, I'm just getting frustrated! I keep doing it because: 1. I don't care about the code it generates (as long as it works for me) 2. I hope it will eventually save me a lot of time (still yet to be proven)

After reporting this issue just a few days ago, I see this post: Making Claude Code more secure and autonomous with sandboxing \ Anthropic

I have yet to see the benefit of this, but I'm already excited to see this being addressed!

github-actions[bot] · 8 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.