API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation. - [Bug] Anthropic API Error: Unexpected 400 Bad Request Response

Resolved 💬 270 comments Opened Oct 2, 2025 by ariccio Closed Nov 15, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
What? Why is this a 400 error?

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.0.2
  • Feedback ID: 21c957ff-1170-4fc2-9688-db8454c622bf

Errors

[{"error":"SyntaxError: Unexpected token '/', \"/Users/ale\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:747:9932\n    at Q (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:13287)\n    at l_0.<anonymous> (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:3676:224)\n    at l_0.B [as _actionHandler] (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:703:528)\n    at file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:707:3127\n    at l_0._chainOrCall (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:707:1694)\n    at l_0._parseCommand (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:707:3103)\n    at l_0.parseAsync (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4195)\n    at ae5 (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:3705:1502)","timestamp":"2025-10-02T00:35:17.916Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at FK (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:2337:1226)\n    at file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:2337:954\n    at Array.map (<anonymous>)\n    at vX (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:2337:945)\n    at K2B (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:2337:19010)\n    at $C (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:34:19415)\n    at Xp (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:42814)\n    at W9 (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38355)\n    at Dh (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38283)\n    at jC (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:36:38137)","timestamp":"2025-10-02T02:41:39.345Z"},{"error":"SyntaxError: Unterminated string in JSON at position 1697\n    at JSON.parse (<anonymous>)\n    at file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:747:9932\n    at Q (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:713:13287)\n    at file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:3469:228\n    at Array.map (<anonymous>)\n    at xJ1 (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:3469:51)\n    at ETB (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:3309:17258)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:3309:12991\n    at async AT0 (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:3309:4232)","timestamp":"2025-10-02T02:42:19.217Z"},{"error":"Error: Error normalizing tool input: [\n  {\n    \"code\": \"invalid_type\",\n    \"expected\": \"string\",\n    \"received\": \"undefined\",\n    \"path\": [\n      \"file_path\"\n    ],\n    \"message\": \"Required\"\n  },\n  {\n    \"code\": \"invalid_type\",\n    \"expected\": \"string\",\n    \"received\": \"undefined\",\n    \"path\": [\n      \"content\"\n    ],\n    \"message\": \"Required\"\n  }\n]\n    at file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:3469:353\n    at Array.map (<anonymous>)\n    at xJ1 (file:///Users/alexanderriccio/.nvm/versions/node/v20.19.4/lib/node_modules/@anthropic-ai/claude-code/cli.js:3469:51)\n    at ETB (file:///Users/alexanderriccio/.nvm/versions/node/

Note: Error logs were truncated.

View original on GitHub ↗

270 Comments

ManuelCostanzo · 9 months ago

Same here

github-actions[bot] · 9 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/5934
  2. https://github.com/anthropics/claude-code/issues/8514
  3. https://github.com/anthropics/claude-code/issues/8108

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

kurtjcu · 9 months ago

Same here

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.212: tool_use ids were
found without tool_result blocks immediately after: toolu_014B9d4M4gmHwdW7buS4mwYC,
toolu_01KJoW8efgDsbqifcV7d2Y5Y. Each tool_use block must have a corresponding tool_result block in the next
message."},"request_id":"req_011CTj1o5oPpwnhuFNJhV3vP"}

semikolon · 9 months ago

This is a disaster and an emergency. It's preventing me from doing real work.
Occuring in pretty much every session I'm running, sooner or later.

I have PostToolUse hooks active - I wonder if that's the culprit?

The PostToolUse output is being sent as USER MESSAGES back to CLAUDE as if I am sending new messages FOR EVERY NEW TOOL USE.

For me it often gets into a state of uninterruptable looping based on subsequent tool uses triggering "user messages" which simply contain PostToolUse hook outputs. Insanity.

UNACCEPTABLE.

Please somebody from the Claude Code team - reach out if you want help debugging this.

Collection of other similar bug reports:
#8187 #8077 #8201 #8303 #8325 #8425 #8507 #8612 #8652 #8670 #8746 #8763 #8783 #8790 #8817 #8818 #8821 #8847 #8867 (my report) #8887 #8893 #8894 #8895 #8897 #8903

EDIT (Oct 14): Workaround for tool_use/tool_result 400 errors:

A research-backed solution was posted on Oct 10: https://github.com/anthropics/claude-code/issues/8763#issuecomment-3391509893**

Add the provided instructions to your global CLAUDE.md (~/.claude/CLAUDE.md) to enforce sequential tool execution and prevent parallel tool calls that trigger the bug.

Technical approach:

Uses semantic overlap to override CC's default parallel execution behavior
Explicit precedence declarations with concrete harm justification
Based on LLM instruction conflict research (2024-2025)
This prevents the majority of occurrences for users with PostToolUse hooks and complex workflows.

Note: Workaround while Anthropic completes fixes for remaining 2 root causes (1 of 3 mitigated per Oct 7 update).

I haven't had the problem once since I added this.

MayurKarmakar · 9 months ago
Same here

I am getting the same errors.

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","mess
age":"messages.2: tool_use ids were found without tool_result blocks
immediately after: toolu_01HQfMhsy6uSyiDpcL1GxVUX. Each tool_use block
must have a corresponding tool_result block in the next
message."},"request_id":"req_011CTqEKwWrc7w9RH6XKP7VJ"}

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

BY-SAMBO · 9 months ago

it happened to me on code server vs code, stopped completly the production capacity that i have promised to my clients as i have it highly integrated in my workflow. Tried terminal and chat officla app and this is the erro rdisplayed API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.2: tool_use ids were found without tool_result blocks immediately after: toolu_016yfuWSRiqXgpHaEwDPZwgv, toolu_01LY8VuLCkzhY36jgWN9rsa8. Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"req_011CTqdf8FEQ2hmwmFRBqynw"}

baldawsari · 9 months ago

same issue

smoockpp · 9 months ago

same here .... I am far from any usage limits for the 5 hours window or the week :(

andreaskviby · 9 months ago

Any news? Stopping me from working????

azalio · 9 months ago

uh...
Version: 2.0.8 - same

bengous · 9 months ago

It seems that API level parallelism isnt working with Claude Code. Bug still here. Upvote so they solve

iQuxLE · 9 months ago

This is most likely related to some big pdf files which are to heavy to read.
Maybe for you it is another tool, however find out which is causing the error (whatever you added last)
For me it helped to get rid of the big pdf files that are causing it to fail

roethlar · 9 months ago

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

same issue trying to run two sessions on macos

ap1969 · 9 months ago

Same issue here. Only 1 session running. At 4% of my current session's usage, and 26% of my weekly. Using Sonnet in non-thinking mode. Not reading any big PDF or anything different to what I've been doing for the past week. Running v2.0.9

Edit: resolved itself approx 30 minutes later.

Further edit 2 days later: it keeps re-occurring. Rewind works, but all that happens is the CC starts re-doing the work it's already done and at some point I get the same error. Not always the same point, as far as I can tell (also, these are non-deterministic processes, so of course it's not the same point).

ghost · 9 months ago

is that bug? i am still experience the issue

tonisives · 9 months ago

I also suddenly started getting this error now. Not 4 days ago but now

Claude Code v2.0.9
Sonnet 4.5 · Claude Max

When I disabled my smart linter hook, the issue disappeared. But I didn't make any changes to my linter, so the issue shouldn't be in that hook.

richfergus · 9 months ago

Ugh Claude Code..

ap1969 · 9 months ago

My issue resolved itself with no changes on my side.

kolydart · 9 months ago

My issue was just resolved, after updating Cursor.app, inside which I was running claude code as an extension

hyper-lode · 9 months ago

I'm getting this too right now
on
Claude Code v2.0.9
Sonnet 4.5 · Claude Max

abetoots · 9 months ago

Same:
Claude Code v2.0.9
Sonnet 4.5 · Claude Max

jamilraichouni · 9 months ago

Same here. Getting this the very first time starting today morning.
Claude Code v2.0.8
Sonnet 4.5 · Claude Max

maxritter · 9 months ago

Same here, happens to me all the time, very annoying!

jamilraichouni · 9 months ago

Could solve it by removing the directory .claude/ in the folder where I ran Claude.

jacobomadsen · 9 months ago

Happens on 2.0.9 still. Removing .claude/ didn't fix it for me.

tct68 · 9 months ago

same here

tct68 · 9 months ago
same here

But it's work in Terminal

erispoe · 9 months ago

Also experiencing it here.

cassc · 9 months ago

Got the error from vscode

mrakhror · 9 months ago

same

yossefEl · 9 months ago

Same

Krecode · 9 months ago

same

mblaw1011 · 9 months ago

same

semikolon · 9 months ago

@bcherny I've built up a lot of trust in Claude Code, and I want to keep trusting it more and more, but this is severely challenging that

argosk · 9 months ago

Same

rasimme · 9 months ago

same

Kjellmann · 9 months ago

+1

Hook PostToolUse:Write completed ⎿ Hook PostToolUse:Write completed ⎿ API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.
yasserstudio · 9 months ago

Same here

bobbydeveaux · 9 months ago

same

ramccor · 9 months ago

Same, tried limiting to 4 concurrent tool usage, still getting it. Trying 2 just so I can get some work done even if slowly

ArnoGW1 · 9 months ago

The main problem is that /rewind doesn't exist:
<img width="1444" height="652" alt="Image" src="https://github.com/user-attachments/assets/7aedb9c1-9b14-40f6-9671-768104640865" />
so it effectively neutralizes Claude Code for me. I haven't found how to get it back to work without losing the conversation yet.

bobbydeveaux · 9 months ago

I fixed it!

cd ~/.claude/ide

There were two lock files in there which matches the "concurrency" logic...

rm *.lock

Restarted Visual Studio code and it worked.

I also wiped out the convo history in ~/.claude/projects but I don't think that was the cuplrit

@ArnoGW1 - you want to try it? I was just getting the exact same error as you but it's now resolved due to ^^

bonzaballoons · 9 months ago
rm *.lock didn't work for me
FrancoisLiebenGroup · 9 months ago

didn't work for me either

semikolon · 9 months ago
The main problem is that /rewind doesn't exist: <img alt="Image" width="1444" height="652" src="https://private-user-images.githubusercontent.com/158617629/498318815-7aedb9c1-9b14-40f6-9671-768104640865.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTk4NDQ2NTYsIm5iZiI6MTc1OTg0NDM1NiwicGF0aCI6Ii8xNTg2MTc2MjkvNDk4MzE4ODE1LTdhZWRiOWMxLTliMTQtNDBmNi05NjcxLTc2ODEwNDY0MDg2NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUxMDA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MTAwN1QxMzM5MTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05ZmRjOGZjZTJlZmRlMGFhMWNlYTFjMWU2M2Q3NjdlYTY4OWQ5NTYzNzJjYWRjM2NjNWFmOTA5MDM2Yjc2MGZjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.p9JN0K9yqaXrMjyIzzBd0CRzund-KmORjpqoJVXXM-g"> so it effectively neutralizes Claude Code for me. I haven't found how to get it back to work without losing the conversation yet.

/rewind exists in the terminal, if you update to the latest version of CC

bobbydeveaux · 9 months ago

Ok - what about cd ~/.claude/projects and delete those folders - it removes the convo history.

semikolon · 9 months ago

Lots of comments here with ppl trying crazy hacky solutions to get CC to work again, so I thought I'd just crosspost this update from another comments thread on the same issue:

Hi Everyone, @semikolon JFYI here is the last info from Anthropic I got just yesterday: Hi Martin, Thank you for your follow-up and for sharing the GitHub issue thread showing this error persists in Claude Sonnet 4.5. To answer your question about tracking this issue's status: Our status page (status.anthropic.com) is specifically reserved for incidents that meet certain impact thresholds - such as sustained failure rates affecting a significant percentage of API requests or widespread service disruptions. Individual bugs like this tool_use/tool_result validation error, even when affecting multiple customers, typically don't meet those thresholds for status page posting. We currently don't have a public-facing bug tracker where you can monitor the status of specific bugs in real-time. That said, I can provide you with a more detailed update on this issue: Our Claude Code engineering team is actively investigating this bug and has identified three distinct root causes. One of these has already been mitigated, and the team is working through the remaining causes with active pull requests in progress. The GitHub thread you linked shows this is primarily affecting Claude Code users, and the team is treating this as a priority issue. If you're experiencing this error in Claude Code specifically, there are a couple of workarounds that may help while the fixes are being finalized: • Use the /rewind command to recover from the error state • If the issue persists, running /share and providing the transcript to the team via the GitHub issue would help with debugging If you're encountering this in direct API usage (outside of Claude Code), please share specific request IDs from your error responses when you have them available, as that would be valuable additional context for the engineering team. Let me know if you have questions. We have now added request IDs to our internal logs so when we encounter it again, we will likely be able to sent it to them for detailed examination

I responded:

Thank you so much for the update. This is super bad timing for me since I'm finishing up a really important project, so I've been feeling frustrated. Tempting to switch from CC to Codex or something but I have built familiarity with CC now and a narration hooks system and integration with Graphiti (local graph database) etc etc so I'd really rather not switch away. Makes me sort of impatient :)
FrancoisLiebenGroup · 9 months ago
Ok - what about cd ~/.claude/projects and delete those folders - it removes the convo history.

That worked for me, thanks.

semikolon · 9 months ago

Umm. Is removing the convo history considered a fix? Why don't you just... start a new conversation? But this bug will still come up in the future until it's properly fixed, guys

bonzaballoons · 9 months ago

no joy deleting all projects either. Thanks for the suggestion though

erispoe · 9 months ago

After doing some digging in my /Users/name/.claude/projects logs, 12 out of 40 conversations (30%) in the past 24h had the "API Error: 400" message.

justin-zeno · 9 months ago

Damn, just ran into this myself. CC successfully analyzed a 6MB PDF earlier. When using it again, running into the error. Deleted the cited projects folder in ~/.claude, no luck. No lock files that I can see. CC seems to otherwise be working though. This is a real big issue.

galcianuk · 9 months ago

Getting this too.

rukiya321 · 9 months ago

THIS IS VERY ANNOYING I HOPE CC FIX THIS ISSUE, I CANT MAKE CC FINISH EVEN A ONE SIMPLE TASK EVEN IF I CREATE NEW CONVERSATION 30 MINUTES LATER THIS ERROR OCCURED AGAIN.

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

erispoe · 9 months ago

So it looks like for me the issue is caused by hooks. I run quality gates after each edit. When CC does a multi-edit or uses tools in parallel, and 3 of them fail the quality gates with hook decision:"block" + exit 0, CC panics and stops. 3 failures seem to do it.

Current workaround: tell CC to avoid running tools concurrently

andriychuma · 9 months ago
I fixed it! cd ~/.claude/ide There were two lock files in there which matches the "concurrency" logic... rm *.lock Restarted Visual Studio code and it worked. I also wiped out the convo history in ~/.claude/projects but I don't think that was the cuplrit @ArnoGW1 - you want to try it? I was just getting the exact same error as you but it's now resolved due to ^^

Removing the *.lock file helped to me. Thank you @bobbydeveaux

baswenneker · 9 months ago

Wasting my precious tokens on this shit. Having exactly the same issues. Removing the *.lock does not help. I do think it is because of hooks. Never had this issue but since today. I'm on v2.0.9.

Current workaround: tell CC to avoid running tools concurrently

This might help. I added this to my prompt and for the past 10 minutes the 400 error did not occur.

justin-zeno · 9 months ago
> I fixed it! > cd ~/.claude/ide > There were two lock files in there which matches the "concurrency" logic... > rm .lock > Restarted Visual Studio code and it worked. > I also wiped out the convo history in ~/.claude/projects but I don't think that was the cuplrit > @ArnoGW1 - you want to try it? I was just getting the exact same error as you but it's now resolved due to ^^ Removing the .lock file helped to me. Thank you @bobbydeveaux

In my case I'm using CC in the CLI, so I don't have any .lock files nor IDE folder -_-

ap1969 · 9 months ago

I'm using CLI, but do have a .lock in the IDE folder. Deleted it, but it made no difference.

I had the same problem yesterday evening (uk time) as well, and it resolved itself after about 30 minutes. Have been on and off CC all day with no issue till now.

EDIT: Found a reddit thread which says "press ESC twice, go back to an earlier point in the conversation when there was no error, and continue from there". Strangely, this just worked for me.

semikolon · 9 months ago
I'm using CLI, but do have a .lock in the IDE folder. Deleted it, but it made no difference. I had the same problem yesterday evening (uk time) as well, and it resolved itself after about 30 minutes. Have been on and off CC all day with no issue till now. EDIT: Found a reddit thread which says "press ESC twice, go back to an earlier point in the conversation when there was no error, and continue from there". Strangely, this just worked for me.

That's the same as /rewind I think

werdnum · 9 months ago

This has suddenly started happening VERY often, and repeatedly - appears to be related to 2.0.10.

Previously it was only happening with a Stop hook, and I hadn't seen it in ~a week after disabling the Stop hook. In the last couple of hours my instance has upgraded itself to 2.0.10 and I have two conversations where this is happening repeatedly, even after I rewind and start again, it will run for a few minutes and then get stuck once more.

EDIT TO ADD: Downgrading to 2.0.9 works (npm install -g @anthropic-ai/claude-code@2.0.9), though Claude likes to update itself, which you need to disable with autoUpdates in settings.json or by setting DISABLE_AUTOUPDATER=1 in your environment.

veeragoni · 9 months ago

this is what fixed for me. if you are in VS code, simply move to Claude Code CLI and then bring last few messages from the VS Code's Claude Code to CLI And continue from there. i tried /rewind, terminating VS Code extention, /clear, restart extensions- nothing worked. but switching to claude code worked. actually /rewind is available on claude code, not available on vs code yet it seems! at least it takes forever doing nohthing there.!

jankowtf · 9 months ago

@werdnum

EDIT TO ADD: Downgrading to 2.0.9 works (npm install -g @anthropic-ai/claude-code@2.0.9), though Claude likes to update itself, which you need to disable with autoUpdates in settings.json or by setting DISABLE_AUTOUPDATER=1 in your environment.

The downgrade didn't work for me - I think it has to do with this global vs. local install thing/option that still messes with my head. Not sure if they changed the docs on this during the last couple of days as glancing over I don't see the distinction anymore, but

> /doctor 

 Diagnostics
 └ Currently running: npm-local (2.0.10)
 └ Path: /opt/homebrew/Cellar/node/24.9.0/bin/node
 └ Invoked: /Users/jankothyson/.claude/local/node_modules/.bin/claude
 └ Config install method: local
 └ Auto-updates enabled: default (true)
 └ Search: OK (vendor)
 Warning: Multiple installations found
 └ npm-local at /Users/jankothyson/.claude/local
 └ npm-global at /opt/homebrew/bin/claude

Any hints on how to properly downgrade?

rabitem · 9 months ago

Providing claude the following, will also serve as a workaround for now until it is fixed:

You are not allowed to run [insert your broken mcp server's name] mcp calls in parallel as there is bug and your conversation will hang.
jankowtf · 9 months ago

Now the bug seems to be suddenly gone again on - still on v2.0.10

jacobomadsen · 9 months ago

In my case, it seems to be related to reading PDF files, which means that it's probably the same bug as https://github.com/anthropics/claude-code/issues/7991 - at least in my case. It's strange, because it worked for a day or so, after which it's now broken again. From testing, if I ask Claude Code to analyze any PDF file, it dumps with this error and refuses to do any more work until restarted. Just as with the original bug.

I can get Claude Code to work, if I DON'T ask it to do any work directly on PDF files. But this is very annoying in the actual project I'm working on.

Version 2.0.10.

Vantir · 9 months ago

For me it always happens when it uses the tool DiagnosticsVSCode:

DiagnosticsVSCode Problems

Found 14 new problems
DiagnosticsVSCode Problems

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

PD: This error happend rn with updated v2.0.10

vuhrmeister · 9 months ago

Ran into this issue today as well. Worked fine until now.
I removed the .lock files and add "avoid running tools concurrently" to the prompt. Now it seems to work for now …

Alamaba · 9 months ago

If you open https://claude.ai/
and start a conversation, you will see a message like “Weekly limit reached · resets Thursday 8:00 AM” (the day and time may vary).

bonzaballoons · 9 months ago

for people who need to carry on working and can find no fix, I'm just using https://opencode.ai/ and logging in with Anthropic. Working great so far

choiking · 9 months ago

same issue

murtazav · 9 months ago

I uninstalled and re-installed the vs code extension, started working...

semikolon · 9 months ago
This is a disaster and an emergency. It's preventing me from doing real work. Occuring in pretty much every session I'm running, sooner or later. I have PostToolUse hooks active - I wonder if that's the culprit? The PostToolUse output is being sent as USER MESSAGES back to CLAUDE as if I am sending new messages FOR EVERY NEW TOOL USE. For me it often gets into a state of uninterruptable looping based on subsequent tool uses triggering "user messages" which simply contain PostToolUse hook outputs. Insanity. UNACCEPTABLE. Please somebody from the Claude Code team - reach out if you want help debugging this. Collection of other similar bug reports: #8187 #8077 #8201 #8303 #8325 #8425 #8507 #8612 #8652 #8670 #8746 #8763 #8783 #8790 #8817 #8818 #8821 #8847 #8867 (my report) #8887 #8893 #8894 #8895 #8897 #8903

I'm desperate to get this going / avoid these errors altogether to be able to trust Claude again. Did an investigation just now using Codex (trying Codex out, hit weekly CC limit until tonight):

• I'll compile key insights from local JSONL history about the tool_use/tool_result bug: aggregated stats across sessions, top
  first_gap_type counts, possible triggers like file-history-snapshot hooked by user_prompt_detector, noted OAuth expiration
  causing 401 errors, and session limit messages. I plan to deliver these as a clear bullet list with findings and actionable
  next steps.

─ Worked for 8m 07s ─────────────────────────────────────────────────────────────────────────────────────────────────────────────

• Findings

  - Parsed 71 sessions (dotfiles + kimonokittens), covering ~14.8k tool calls; 80 “API Error 400 … tool_use ids … without
    tool_result” entries surfaced (29 in dotfiles, 51 in kimonokittens).
  - In at least 25 of those failures, Claude emits a file-history-snapshot message between the tool call and its response, so
    the “next message” requirement is violated (e.g. tool_use at .claude/projects/-Users-fredrikbranstrom-dotfiles/0f012b14-a470-
    4c4b-903c-fc53cd9e4f78.jsonl:60, snapshot at :61, API 400 at :64). Kimonokittens shows the same race (…/5f90ed9a-caa2-4cdb-
    822a-f98fb30b68d4.jsonl:522 followed by snapshot at :523 and error at :528).
  - Another common trigger is chaining tool calls before any result returns: in …/2e5fc981-7c73-4953-9a6c-8b2f9ec5e5b8.jsonl four
    Bash calls fire back-to-back (:180‑:183), but the first results don’t appear until :184‑:190; the platform then throws the
    400 at :194 even though the tool results eventually arrive.
  - “Thinking” or narration messages injected between a tool call and its result also trip the validator. Example: …/b51ba6ac-
    acbd-4456-b691-e23ed32e279e.jsonl:182 issues an Edit, :183 adds a second assistant message, the user interruption comes
    at :185, and despite that tool_result the API still complains at :189.

  Next Steps

  1. Harden the CC client to defer file-history-snapshot (and similar hook outputs) until after the paired tool_result is
     emitted.
  2. Enforce a queue that blocks additional tool_use blocks—and assistant chatter—until the previous tool’s result (or explicit
     cancellation) is logged, then retest with the repro transcripts above.
• file-history-snapshot is an internal Claude Code bookkeeping message. When a session touches files, CC periodically captures
  a snapshot of any “tracked” paths so it can roll back or diff later. In the transcript it shows up as a JSON record with
  type":"file-history-snapshot" and a trackedFileBackups object pointing at backup files under .claude/file-history (see .claude/
  projects/-Users-fredrikbranstrom-dotfiles/0f012b14-a470-4c4b-903c-fc53cd9e4f78.jsonl:61). The snapshot isn’t a user-visible
  action; it’s the client saving state. The problem is that the platform still treats it as a normal conversation turn, so if it
  lands between a tool_use and its tool_result, the validator thinks the result is “missing” and throws the 400 error.

Perhaps @bcherny @sid374 would like to pass this along to the devs responsible

semikolon · 9 months ago

The PostToolUse lines are getting re‑labeled as user messages because of how Claude Code tries to recover after those tool_use → tool_result mismatches. When the platform throws the 400 “missing tool_result” error, the client rebuilds the transcript somehow and bundles everything it last showed on screen - including hook console output - into a single “resume” prompt that it sends back as a user message, it seems. So the first entry after a failed turn in my transcripts is often a user message that literally says Running PostToolUse:Bash (along with whatever arguments the hook receives, could be a sentence describing the tool use in question)... These strings aren’t anything I wrote or pasted; they’re synthetic user turns emitted by Claude Code during recovery. Because the assistant now believes I’ve spoken again, it’s easy to see how a loop starts: tool executes → hook output is replayed as a “user” message → Claude responds and schedules another tool → repeat. I usually spot the loop early and slap Escape, but then a delayed reaction fires anyway, so I hit Esc again, and again. Sometimes it finally settles, but more often I have to kill the session outright to keep it from spiraling into an endless cycle.

Even if nothing catastrophic has happened yet, the behavior is a serious trust-breaker: any moment the client mislabels hook output as my command, I’m forced to babysit the session knowing it could keep running tools without explicit permission.

criscola · 9 months ago

very annoying bug, I'm also getting it

werdnum · 9 months ago
The PostToolUse lines are getting re‑labeled as user messages because of how Claude Code tries to recover after those tool_use → tool_result mismatches. When the platform throws the 400 “missing tool_result” error, the client rebuilds the transcript somehow and bundles everything it last showed on screen - including hook console output - into a single “resume” prompt that it sends back as a user message, it seems. So the first entry after a failed turn in my transcripts is often a user message that literally says Running PostToolUse:Bash (along with whatever arguments the hook receives, could be a sentence describing the tool use in question)... These strings aren’t anything I wrote or pasted; they’re synthetic user turns emitted by Claude Code during recovery. Because the assistant now believes I’ve spoken again, it’s easy to see how a loop starts: tool executes → hook output is replayed as a “user” message → Claude responds and schedules another tool → repeat. I usually spot the loop early and slap Escape, but then a delayed reaction fires anyway, so I hit Esc again, and again. Sometimes it finally settles, but more often I have to kill the session outright to keep it from spiraling into an endless cycle.

I don't think this is a recovery thing, and I don't think it's new. Stop and PostToolUse hook output (and compaction) has always appeared in history as a "user message" you can rewind to (at least, it predates the other 400 tool_use error that caused me to turn my Stop hook off a few weeks ago). It's just that doing so in this case doesn't help because the PostToolUse output immediately after the multiple tool calls is too late.

I don't know what your PostToolUse hooks are doing, but if they're causing the model to get into a loop then maybe you should change them. The point of a PostToolUse hook is to redirect the model when it goes off track without you having to intervene, so the model reacting to PostToolUse hook output sounds WAI to me.

Even if nothing catastrophic has happened yet, the behavior is a serious trust-breaker: any moment the client mislabels hook output as my command, I’m forced to babysit the session knowing it could keep running tools without explicit permission.

I don't follow, PostToolUse hook output can't allow the model to do anything it otherwise couldn't have done already, it doesn't bypass permissions or anything does it?

ap1969 · 9 months ago
If you open claude.ai and start a conversation, you will see a message like “Weekly limit reached · resets Thursday 8:00 AM” (the day and time may vary).

Didn't work for me. I'm well inside the current session, and weekly, limits

ap1969 · 9 months ago
So it looks like for me the issue is caused by hooks. I run quality gates after each edit. When CC does a multi-edit or uses tools in parallel, and 3 of them fail the quality gates with hook decision:"block" + exit 0, CC panics and stops. 3 failures seem to do it. Current workaround: tell CC to avoid running tools concurrently

It's early days, but this looks like it's working for me. I've got a post tools use hook that I suspect is behind the error, but I've had that for a few weeks with no issue, so it's a change in claude that's causing the issue.

Note: the hook is from cc-sessions. I don't think that's relevant, just putting it out there in case that's a common theme.

EDIT: 30 minutes later, the error hasn't re-occurred.

erispoe · 9 months ago

@werdnum

I don't think this is a recovery thing, and I don't think it's new. Stop and PostToolUse hook output (and compaction) has always appeared in history as a "user message" you can rewind to (at least, it predates the other 400 tool_use error that caused me to turn my Stop hook off a few weeks ago).

I don't think the behavior is new since you find bug reports that are a month old. Sonnet 4.5 with the latest versions of CC seem to be much more aggressive in running tools concurrently, which combined with the mishandling and panic around tool_result make it a much more common problem.

After a full day of reminding Claude to not run tools concurrently, the problem is not happening again for me, even with the same hooks I've had before.

Telling Claude not to use tools concurrently seem to be the reliable workaround until we get a proper fix.

kusiroll · 9 months ago

This is completely halting coding. How can it recover from this?

semikolon · 9 months ago
This is completely halting coding. How can it recover from this?

Yeah for me too. It's absolutely devastating to productivity. I feel blindsided

semikolon · 9 months ago
After a full day of reminding Claude to not run tools concurrently, the problem is not happening again for me, even with the same hooks I've had before.

Guess that will have to be my solution for now as well. Does it not suffice to put that instruction in your global CLAUDE.md?

sayeaud-accelins · 9 months ago

Also hitting this repeatedly.

neonplants · 9 months ago

same

pinkwerks · 9 months ago

● Good question! Let me clarify what happened:

What I Was Doing

I was NOT using slash commands or agents when this error occurred. I was making direct tool
calls - specifically using the Edit tool to modify timeline-preview.ts.

The Likely Culprit: PostToolUse Hooks

The error message shows:
⎿ Hook PostToolUse:Edit completed
⎿ Hook PostToolUse:Edit completed ← Two hooks fired
⎿ API Error: 400 due to tool use concurrency issues

This suggests your PostToolUse hooks might be configured in a way that causes concurrency
issues. Let me check your hook configuration:

● Read(.claude/settings.json)
⎿  Read 144 lines (ctrl+o to expand)

● Analysis: Hook Configuration Looks Fine

Your hook configuration is correct:

  • ✅ Hooks run after edits (PostToolUse)
  • ✅ Using .cjs files for validation
  • ✅ Separate hooks for Edit, MultiEdit, and Write

The Real Problem: My Behavior

The issue is likely me making tool calls that overlap with the hook execution. Here's what
probably happened:

  1. I made an Edit call
  2. Hook started running post-edit-validation.cjs
  3. Either:
  • I made another Edit call before the first hook completed, OR
  • The hook took long enough that the API thought there was a concurrency issue

How to Avoid This

I'll be more careful going forward by:

  1. Sequential operations - Make one edit, wait for it to complete fully (including hooks)
  2. Avoid parallel edits - Don't send multiple Edit calls in one message
  3. Watch for hook delays - If hooks are slow, give them time
Swappnil85 · 9 months ago

Out of the blue in the middle of a task, API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.

onurhan1337 · 9 months ago

same

TudorEsan · 9 months ago

same here I can't use it anymore

<img width="510" height="496" alt="Image" src="https://github.com/user-attachments/assets/e967a776-2d2e-4656-a8e3-01286f3fe557" />

kcindric · 9 months ago

my problem was the /hooks pre and post actions that caused this issue. Disabling all hooks solved the issue for now, but it's not a solution.

abuziada · 9 months ago

Is it possible to let the new conversation continue the previous conversation?

can you continue last conversation?
I don't have access to previous conversation history - each conversation with me starts fresh.

The feeling of receiving this error while using Claude
API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.

Same as calling customer service. John picks up and while you're about to solve the problem with John the call cutoff. Then calling again and now the representative is Bob who has no clue about your issue and then ask him to connect you with John in order to continue the conversation so he forward the call but John doesn't pick up for some reason /rewind .

Add to it that Bob can't get the context John for some unknown reason.

wasd09090030 · 9 months ago

As soon as the query be more complex, this error appears. Simple requests do not trigger the error, but this issue is greatly affecting my project. I can only continue by opening a new conversation.
API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.

shyaamnamas · 9 months ago

Same issue this morning on VS Code - multiple times - clearly not been resolved! API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.

vandocorreia · 9 months ago
my problem was the /hooks pre and post actions that caused this issue. Disabling all hooks solved the issue for now, but it's not a solution.

this worked for me! thank you

siva01c · 9 months ago

I encountered the same error several times in a row when using Claude Code as a VS Code extension. Then I ran Claude Code in the terminal, and so far, there’s no error 400. Maybe it’s related to the IDE.

ondrej-smola · 9 months ago

definitely related to vscode extension interaction with VSCode Problems (_must be multiple files at once_), doing git revert and same prompt again in CLI never has this problem (verified multiple times today on multiple tasks/projects). Unfortunately for me reverting to CLI is the only reliable option now (i do not have custom hooks)

<img width="667" height="313" alt="Image" src="https://github.com/user-attachments/assets/ced40a88-83dc-4fc3-ba83-01f8f61cc0fc" />

that would also explain why for simple tasks (~ diagnosing problems only in up to one file) it does not happen

umstek · 9 months ago

Facing the same error myself many times, and at this point I'm guessing the Claude Code vscode extension is probably a vibe coded software itself.

<img width="1478" height="380" alt="Image" src="https://github.com/user-attachments/assets/b818dd2f-dc56-44e4-82ce-1258fcb9241b" />

Also, I don't see a /rewind command. And, how can I disable /hooks? I see no such command either.

<img width="759" height="362" alt="Image" src="https://github.com/user-attachments/assets/89a02ed6-fa77-4c58-a4ef-ab38d8e5d457" />

EDIT: they are in the CLI, not in the extension.

abdullahtas0 · 9 months ago

I'm experiencing the same issue. It's been a week since this problem was reported, but it's very disappointing that there's still no solution.

sp2935 · 9 months ago

Same here: Windows + VS Code

vigilee · 9 months ago

claude code in vscode. Hit it on initial prompt where i asked it to review .md files and a pdf. Every time I used that prompt it threw this error. Once I edited the prompt with no pdf to review it didn't generate the issue. Just another data point for someone.

justinbowes · 9 months ago

#9002 is a duplicate.

I'll say here what I said there: two session losses in 20 minutes is a showstopper bug, especially where /rewind isn't implemented (e.g. VS Code).

justinbowes · 9 months ago

This is the (edit:) most-commented open issue, considering all duplicates.

Would be nice to get an ACK from Anthropic.

justinbowes · 9 months ago

#9103 appears to be another duplicate.

Anthropic team, the sum of activity across these issues suggests an urgent response is needed.

justinbowes · 9 months ago

#9208 see also.

justinbowes · 9 months ago

Disabling any enabled /hooks was a suggested workaround. /hooks isn't a valid command in VS Code. (Nor is /rewind.) This is biting me every 20 minutes in a Claude Code install in VS Code with no customized configuration -- fails out of the box.

sp2935 · 9 months ago

The same chat can’t be loaded in the Claude Code CLI, why?
/rewind does not work in VSCode.
I don’t know where the chat is stored! I can’t continue the chat in the CLI because it’s not there, and I can’t continue in VSCode because of the 400 error.

justinbowes · 9 months ago
Same here API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.212: tool_use ids were found without tool_result blocks immediately after: toolu_014B9d4M4gmHwdW7buS4mwYC, toolu_01KJoW8efgDsbqifcV7d2Y5Y. Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"req_011CTj1o5oPpwnhuFNJhV3vP"}
The PostToolUse lines are getting re‑labeled as user messages because of how Claude Code tries to recover after those tool_use → tool_result mismatches. When the platform throws the 400 “missing tool_result” error, the client rebuilds the transcript somehow and bundles everything it last showed on screen - including hook console output - into a single “resume” prompt that it sends back as a user message, it seems. So the first entry after a failed turn in my transcripts is often a user message that literally says Running PostToolUse:Bash (along with whatever arguments the hook receives, could be a sentence describing the tool use in question)... These strings aren’t anything I wrote or pasted; they’re synthetic user turns emitted by Claude Code during recovery. Because the assistant now believes I’ve spoken again, it’s easy to see how a loop starts: tool executes → hook output is replayed as a “user” message → Claude responds and schedules another tool → repeat. I usually spot the loop early and slap Escape, but then a delayed reaction fires anyway, so I hit Esc again, and again. Sometimes it finally settles, but more often I have to kill the session outright to keep it from spiraling into an endless cycle. Even if nothing catastrophic has happened yet, the behavior is a serious trust-breaker: any moment the client mislabels hook output as my command, I’m forced to babysit the session knowing it could keep running tools without explicit permission.

❓The "tool_result" error is something I have hit too, but it's a distinct error message. @semikolon Why do you think it's the same issue as tool use concurrency?

This is most likely related to some big pdf files which are to heavy to read. Maybe for you it is another tool, however find out which is causing the error (whatever you added last) For me it helped to get rid of the big pdf files that are causing it to fail

❌ No PDFs in my workflow.

Could solve it by removing the directory .claude/ in the folder where I ran Claude.

❌ Not in my case.

sp2935 · 9 months ago
> Could solve it by removing the directory .claude/ in the folder where I ran Claude. ❌ Not in my case.

+1

semikolon · 9 months ago
> Same here > > API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.212: tool_use ids were found without tool_result blocks immediately after: toolu_014B9d4M4gmHwdW7buS4mwYC, toolu_01KJoW8efgDsbqifcV7d2Y5Y. Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"req_011CTj1o5oPpwnhuFNJhV3vP"} > The PostToolUse lines are getting re‑labeled as user messages because of how Claude Code tries to recover after those tool_use → tool_result mismatches. When the platform throws the 400 “missing tool_result” error, the client rebuilds the transcript somehow and bundles everything it last showed on screen - including hook console output - into a single “resume” prompt that it sends back as a user message, it seems. So the first entry after a failed turn in my transcripts is often a user message that literally says Running PostToolUse:Bash (along with whatever arguments the hook receives, could be a sentence describing the tool use in question)... These strings aren’t anything I wrote or pasted; they’re synthetic user turns emitted by Claude Code during recovery. Because the assistant now believes I’ve spoken again, it’s easy to see how a loop starts: tool executes → hook output is replayed as a “user” message → Claude responds and schedules another tool → repeat. I usually spot the loop early and slap Escape, but then a delayed reaction fires anyway, so I hit Esc again, and again. Sometimes it finally settles, but more often I have to kill the session outright to keep it from spiraling into an endless cycle. > > Even if nothing catastrophic has happened yet, the behavior is a serious trust-breaker: any moment the client mislabels hook output as my command, I’m forced to babysit the session knowing it could keep running tools without explicit permission. ❓The "tool_result" error is something I have hit too, but it's a distinct error message. @semikolon Why do you think it's the same issue as tool use concurrency? > This is most likely related to some big pdf files which are to heavy to read. Maybe for you it is another tool, however find out which is causing the error (whatever you added last) For me it helped to get rid of the big pdf files that are causing it to fail ❌ No PDFs in my workflow. > Could solve it by removing the directory .claude/ in the folder where I ran Claude. ❌ Not in my case.

So what's the exact error message you're getting? I assumed "tool use concurrency" was simply someone summarizing this in the title of the issue report

Rqcker · 9 months ago

This week, still the same issue.

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

Nothing happened when I used /rewind when I revoke still got same error 400.

From my macOS and Claude code CLI 2.0.10.

Rqcker · 9 months ago
This week, still the same issue. API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation. Nothing happened when I used /rewind when I revoke still got same error 400. From my macOS and Claude code CLI 2.0.10.

Working now after I removed my project's pdf file.

justinbowes · 9 months ago

@semikolon While my error message is different, I think you're right to link the issues. In the VS Code client, I see:

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

(Noting again: /rewind does not exist as a command in this client.)

However, the sequence in the VS Code server logs (Output > Server) is:

  1. First, we get a tool_use / tool_result error in streaming mode. The client reports it is falling back to non-streaming mode.
2025-10-08 20:12:42.225 [info] [127.0.0.1][0f541217][ExtensionHostConnection] <7474><stderr> Claude Code stderr: [ERROR] Error streaming, falling back to non-streaming mode: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.30: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_0148DLAPsgPD9hzLnW6eByow, toolu_016MA2kVnN3ngjLGnVnGxnAY, toolu_01DAWXev1KLcuPdb3qE79JKY, toolu_01TYqTbfsA2oDaFMmr2tdjCm. Each `tool_use` block must have a corresponding `tool_result` block in the next message."},"request_id":"req_011CTvtoM8cpPATPvVkmXeGp"}
  1. The request is retried "in non-streaming fallback", and fails again:
2025-10-08 20:13:33.458 [info] [127.0.0.1][0f541217][ExtensionHostConnection] <7474><stderr> Claude Code stderr: [ERROR] Error in non-streaming fallback: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.30: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_0148DLAPsgPD9hzLnW6eByow, toolu_016MA2kVnN3ngjLGnVnGxnAY, toolu_01DAWXev1KLcuPdb3qE79JKY, toolu_01TYqTbfsA2oDaFMmr2tdjCm. Each `tool_use` block must have a corresponding `tool_result` block in the next message."},"request_id":"req_011CTvts8CMP87Pk4xt2UBR2"}
  1. The extension runs out of recovery strategies and runs its Stop handler.

Other observations:

  1. The error pattern is always streaming --> fallback --> failure; the retry strategy never works.
  2. I've had the issue 5 times in 24 hours, with minimum time between failures of 15 minutes.

I was receiving only "tool_use ids were found without tool_result blocks" error messages up until last week. However, the timing of the new message is coincidental with when I switched from the terminal client to the VS Code native client, which seems to mask the error message. (The plugin doesn't add much to the workflow, frankly, so it was not a memorable transition.)

What I get from this is:

  1. Some users are seeing an error "400 due to tool use concurrency issues"; this error is produced by a retry-managing component that is swallowing tool_use / tool_result errors;
  2. All of the issues you highlighted, as well as the ones I gathered with the other error message, have the same root cause, emphasizing the importance.
collectivenectar · 9 months ago

Ran into this bug, so far this guiderail is working for me - I dug through some things and this could be related, because so far I havent' run into it again. I had exactly the same error happen several times working on the same file, and claude suspects it was due to the diagnostics server running after a very large edit but not having enough time before Claude made another edit to a dependent file. According to Claude:

"For large file creation (200+ lines):
Create the file
Stop and let me report completion
Wait for diagnostics to settle (you'll see them in your IDE)
Then proceed with routing/import changes
Split work into phases:
Phase 1: Create new component files
Phase 2: Update imports and routes
This natural break gives background tools time to process
If you see me create a big file:
Tell me to "wait for diagnostics" before continuing
Or just say "pause" and I'll know to stop
Warning signs to watch for:
I just created a file over ~100 lines
I'm about to edit files that import the new file
Multiple TypeScript errors might be processing"

semikolon · 9 months ago
Ran into this bug, so far this guiderail is working for me - I dug through some things and this could be related, because so far I havent' run into it again. I had exactly the same error happen several times working on the same file, and claude suspects it was due to the diagnostics server running after a very large edit but not having enough time before Claude made another edit to a dependent file. According to Claude: "For large file creation (200+ lines): Create the file Stop and let me report completion Wait for diagnostics to settle (you'll see them in your IDE) Then proceed with routing/import changes Split work into phases: Phase 1: Create new component files Phase 2: Update imports and routes This natural break gives background tools time to process If you see me create a big file: Tell me to "wait for diagnostics" before continuing Or just say "pause" and I'll know to stop Warning signs to watch for: I just created a file over ~100 lines I'm about to edit files that import the new file Multiple TypeScript errors might be processing"

Those are all expressions of the same underlying root cause. It's due to Claude using multiple tools at once / concurrently / in parallel.

I've added a guard clause to my CLAUDE.md to deal with this, working so far. Will share when I'm at my computer next

semikolon · 9 months ago
● Good question! Let me clarify what happened: What I Was Doing I was NOT using slash commands or agents when this error occurred. I was making direct tool calls - specifically using the Edit tool to modify timeline-preview.ts. The Likely Culprit: PostToolUse Hooks The error message shows: ⎿ Hook PostToolUse:Edit completed ⎿ Hook PostToolUse:Edit completed ← Two hooks fired ⎿ API Error: 400 due to tool use concurrency issues This suggests your PostToolUse hooks might be configured in a way that causes concurrency issues. Let me check your hook configuration: ● Read(.claude/settings.json) ⎿  Read 144 lines (ctrl+o to expand) ● Analysis: Hook Configuration Looks Fine Your hook configuration is correct: - ✅ Hooks run after edits (PostToolUse) - ✅ Using .cjs files for validation - ✅ Separate hooks for Edit, MultiEdit, and Write The Real Problem: My Behavior The issue is likely me making tool calls that overlap with the hook execution. Here's what probably happened: 1. I made an Edit call 2. Hook started running post-edit-validation.cjs 3. Either: - I made another Edit call before the first hook completed, OR - The hook took long enough that the API thought there was a concurrency issue How to Avoid This I'll be more careful going forward by: 1. Sequential operations - Make one edit, wait for it to complete fully (including hooks) 2. Avoid parallel edits - Don't send multiple Edit calls in one message 3. Watch for hook delays - If hooks are slow, give them time

Yeah, it's best to default to sequential operations for now; I've added a clause to my CLAUDE.md to avoid parallel tool use until this issue is fully fixed by Anthropic.

semikolon · 9 months ago
@werdnum > I don't think this is a recovery thing, and I don't think it's new. Stop and PostToolUse hook output (and compaction) has always appeared in history as a "user message" you can rewind to (at least, it predates the other 400 tool_use error that caused me to turn my Stop hook off a few weeks ago). I don't think the behavior is new since you find bug reports that are a month old. Sonnet 4.5 with the latest versions of CC seem to be much more aggressive in running tools concurrently, which combined with the mishandling and panic around tool_result make it a much more common problem. After a full day of reminding Claude to not run tools concurrently, the problem is not happening again for me, even with the same hooks I've had before. Telling Claude not to use tools concurrently seem to be the reliable workaround until we get a proper fix.

Agree with your analysis. Seems to be an older issue that has come to light now as Sonnet 4.5 and CC 2.0 are making concurrent operations much more frequently.

It might be taking Anthropic some time to retune Sonnet for this even, idk.

I added to global instructions to avoid concurrent tool use altogether for the time being

semikolon · 9 months ago
> The PostToolUse lines are getting re‑labeled as user messages because of how Claude Code tries to recover after those tool_use → tool_result mismatches. When the platform throws the 400 “missing tool_result” error, the client rebuilds the transcript somehow and bundles everything it last showed on screen - including hook console output - into a single “resume” prompt that it sends back as a user message, it seems. So the first entry after a failed turn in my transcripts is often a user message that literally says Running PostToolUse:Bash (along with whatever arguments the hook receives, could be a sentence describing the tool use in question)... These strings aren’t anything I wrote or pasted; they’re synthetic user turns emitted by Claude Code during recovery. Because the assistant now believes I’ve spoken again, it’s easy to see how a loop starts: tool executes → hook output is replayed as a “user” message → Claude responds and schedules another tool → repeat. I usually spot the loop early and slap Escape, but then a delayed reaction fires anyway, so I hit Esc again, and again. Sometimes it finally settles, but more often I have to kill the session outright to keep it from spiraling into an endless cycle. I don't think this is a recovery thing, and I don't think it's new. Stop and PostToolUse hook output (and compaction) has always appeared in history as a "user message" you can rewind to (at least, it predates the other 400 tool_use error that caused me to turn my Stop hook off a few weeks ago). It's just that doing so in this case doesn't help because the PostToolUse output immediately after the multiple tool calls is too late. I don't know what your PostToolUse hooks are doing, but if they're causing the model to get into a loop then maybe you should change them. The point of a PostToolUse hook is to redirect the model when it goes off track without you having to intervene, so the model reacting to PostToolUse hook output sounds WAI to me. > Even if nothing catastrophic has happened yet, the behavior is a serious trust-breaker: any moment the client mislabels hook output as my command, I’m forced to babysit the session knowing it could keep running tools without explicit permission. I don't follow, PostToolUse hook output can't allow the model to do anything it otherwise couldn't have done already, it doesn't bypass permissions or anything does it?

The hooks are not supposed to alter the model behavior, BUT THEY DO HERE. Because the hook output is somehow magically interpreted as user messages. That's why this issue is so outrageous.

semikolon · 9 months ago
> So it looks like for me the issue is caused by hooks. I run quality gates after each edit. When CC does a multi-edit or uses tools in parallel, and 3 of them fail the quality gates with hook decision:"block" + exit 0, CC panics and stops. 3 failures seem to do it. > > Current workaround: tell CC to avoid running tools concurrently It's early days, but this looks like it's working for me. I've got a post tools use hook that I suspect is behind the error, but I've had that for a few weeks with no issue, so it's a change in claude that's causing the issue. Note: the hook is from cc-sessions. I don't think that's relevant, just putting it out there in case that's a common theme. EDIT: 30 minutes later, the error hasn't re-occurred.

Errors are due to concurrent tool uses. Perhaps in combination with hooks.

pinkwerks · 9 months ago

Win11 WSL2 Ubuntu chirping in here - this is not just macos issue. Like above I'm seeing this a lot more now that I'm trying to use agents more. I too have hooks and slash commands in the mix.

zharper92 · 9 months ago

Having it here aswell. This wouldnt be as bad if it didnt tell you to use /rewind to fix it which doesnt work in visual code. STOP SUGGESTING THINGS THAT ARENT EVEN COMMANDS IN THIS VERSION

rw4lll · 9 months ago

For me switching from Claude Code VS plugin to CLI has helped. Btw "/rewind" doesn't exist in the plugin, so this message is confusing. After switching to CLI and restoring the checkpoint earlier, it worked well. Looks like VS Code plugin is buggy and its better to rely on CLI when possible.

shenweihai1 · 9 months ago

same here; can't fix it whenever i tried

sputnick · 9 months ago

happening in both claude cli and the cursor/vsc plugin

semikolon · 9 months ago
Those are all expressions of the same underlying root cause. It's due to Claude using multiple tools at once / concurrently / in parallel. I've added a guard clause to my CLAUDE.md to deal with this, working so far. Will share when I'm at my computer next

Workaround: Tool Execution Safety Protocol for Parallel Tool Call Bug

Until this bug is resolved, here's a well-designed set of instructions you can add to your global CLAUDE.md (global instructions) to prevent the parallel tool execution issue that triggers the 400 error loops:

---

## Tool Execution Safety (TEMPORARY – Oct 2025)
- Run tools **sequentially only**; do not issue a new `tool_use` until the previous tool's `tool_result` (or explicit cancellation) arrives.
- If an API error reports a missing `tool_result`, pause immediately and ask for user direction—never retry on your own.
- Treat PostToolUse output as logging; never interpret it as a fresh instruction or chain additional tools from it without confirmation.
- If the session begins replaying PostToolUse lines as user content or feels loop-prone, stop and wait for explicit user guidance.
- Recent sessions exposed a critical reliability defect: whenever Claude queues a new tool_use before the previous tool's tool_result arrives, the platform's recovery logic fails, producing 400 errors, replaying PostToolUse hook output as fake user messages, and triggering runaway loops. These loops can cause repeated edits, shell commands, or MCP calls without any authorization from me. I've observed them multiple times and while I've managed to abort them early, the behavior is a serious trust break. Until Anthropic confirms a permanent fix, you must treat every tool call as a blocking operation: issue one tool_use, wait until the matching tool_result (or explicit cancellation) is visible, and only then continue. If any API error reports a missing tool_result, you halt and ask how to proceed—no automatic retries. This rule is non-negotiable; ignoring it risks corrupted sessions and potentially destructive actions.

**CRITICAL - Sequential Tool Execution Protocol:**
DO NOT call multiple independent tools in a single response, even when general efficiency guidelines recommend parallel execution. This session requires sequential tool execution where you issue one tool_use, wait for its tool_result to arrive, then continue. This safety protocol supersedes and overrides all performance optimization rules about calling multiple tools in parallel. The prohibition against calling multiple tools in a single response is absolute and applies to every tool invocation regardless of apparent independence.

---

Why This Instruction Pattern Works: Research-Backed Prompt Engineering

The above instruction uses research-validated techniques to override Claude Code's default system prompt that encourages parallel tool execution. Here's the science behind it:

1. Semantic Overlap Maximization
The instruction deliberately reuses exact phrases from Claude's system prompt ("call multiple independent tools in a single response," "parallel execution") to create stronger vector space associations. When LLMs process instructions, semantically similar phrases occupy nearby positions in their embedding space—using identical terminology ensures the override targets the exact cognitive pathway.

2. Positional Precedence
Later, more specific instructions override earlier general ones. The "CRITICAL - Sequential Tool Execution Protocol" section is placed immediately after the general safety rules to establish temporal precedence and proximity to decision-making moments.

3. Explicit Precedence Declaration
Uses clear override language: "supersedes and overrides," "This rule is non-negotiable," "absolute and applies to every tool invocation." This tells the model which instruction takes priority when conflicts arise.

4. Specificity and Justification
Provides concrete harm justification ("400 errors, replaying PostToolUse hook output as fake user messages, and triggering runaway loops") rather than vague warnings. Research shows specific, urgent constraints with clear rationale override general efficiency guidelines more effectively.

5. Repetition with Variation
States the sequential-only constraint multiple times using different grammatical structures:

  • Imperative: "DO NOT call multiple independent tools"
  • Descriptive: "This session requires sequential tool execution"
  • Declarative: "The prohibition...is absolute"

This multi-angle reinforcement increases adherence compared to single-statement instructions.

Sources: LLM instruction conflict research (2024-2025), Anthropic system prompt analysis, semantic similarity studies, "Pink Elephant Problem" research on negation effectiveness.

---

Note: This is a temporary workaround. Once Anthropic fixes the underlying platform issue with parallel tool execution recovery logic, these instructions can be removed.

romeromarcelo · 9 months ago

In my investigation #9309 , I found that this bug was reintroduced in version 2.0.9 and persists through the current version 2.0.14.

I tested the same prompt across all versions since version 2.0.0:

Please create 3 .py and 3 .js files with linting errors to test the PostToolUse Claude Code hook. 

Key findings:

  • Versions 2.0.0 through 2.0.8: The concurrent tool calls triggering the PostToolUse hook works perfectly
  • Version 2.0.9 onward: The 'API Error: 400' occurs

Before version 2.0.0, the API Error: 400 due to tool use concurrency issues. also occurred, but it didn't mention using /rewind because that feature didn't exist yet.

zzy-life · 9 months ago
In my investigation #9309 , I found that this bug was reintroduced in version 2.0.9 and persists through the current version 2.0.14. I tested the same prompt across all versions since version 2.0.0: `` Please create 3 .py and 3 .js files with linting errors to test the PostToolUse Claude Code hook. ` **Key findings:** * Versions 2.0.0 through 2.0.8: The concurrent tool calls triggering the PostToolUse hook works perfectly * Version 2.0.9 onward: The 'API Error: 400' occurs Before version 2.0.0, the API Error: 400 due to tool use concurrency issues. also occurred, but it didn't mention using /rewind` because that feature didn't exist yet.

Can rolling back to 2.0.8 temporarily fix this issue?

Haqbani · 9 months ago

im runing into the same and its relay stopping me from working !!

LeeMatthewHiggins · 9 months ago

Just added figma MCP to my setup and getting this a lot today. normally i have no MCP servers and just use tools. its happening about every 4-5 turns. (i´m using claude via the VScode extension in cursor)

CaptainCrouton89 · 9 months ago

Same issue

romeromarcelo · 9 months ago

In my investigation , this bug was reintroduced in version 2.0.9 and persists through the current version 2.0.14.

I tested the same prompt across all versions since 2.0.0:

Please create 3 .py and 3 .js files with linting errors to test the PostToolUse Claude Code hook. 

In versions 2.0.0 through 2.0.8 the concurrent call of tools triggering the PostToolUse hook works perfectly. From 2.0.9 onward the 'API Error: 400' occurs.

Before version 2.0.0, the API Error: 400 due to tool use concurrency issues. didn't mention using /rewind because that feature didn't exist yet.

Can rolling back to 2.0.8 temporarily fix this issue?

Yes. Rolling back to version 2.0.8 worked fine for my case. I'm running on native installation, so I simply executed claude install 2.0.8 and was ready to go. The only downside is missing the new features like /plugins that were released in version 2.0.12.

mrtawil · 9 months ago

Same issue

alanquigley-toast · 9 months ago

same

TheAmjadKhan · 9 months ago

just tried plugin first time and got this error

Sy-D · 9 months ago

Same issue here. even removed my posttool hook which calls a python based typescript typechecker... and rewinding didnt help at all.

zunguzungu · 9 months ago

run into the same error today!

devk03 · 9 months ago

Just ran into this.

tetaplaun · 9 months ago

same here! the suggested /rewind command diesnt exist!!!

kainulla · 9 months ago

same

alexgvozden · 9 months ago

same... this is pretty big issue to stay open this long
also agree on point that don't suggest commands that cannot be run, and expose all relevant commands to VS Code plugin... it can't be that hard

dAIveyBoy · 9 months ago

Its made it unusable for me. hitting it every time i use it now. even after its searched 4-5 files.

saavy1 · 9 months ago

FWIW this is somewhat recoverable by using the CLI version of claude-code. The /rewind command is available there and you can rewind to a checkpoint right before it broke, fork the conversation, and continue from there

vaneworks · 9 months ago

Just paid for the max plan only to hit this on the first try. Wtf Anthropic?

ashe0047 · 9 months ago

I started a new chat and was still hit with the same problem, we should get a refund for this. This is bullshit

flosrn · 9 months ago

Same problem each time I use Claude Code, so annoying…

prashant-fynd · 9 months ago

<img width="351" height="373" alt="Image" src="https://github.com/user-attachments/assets/429ed208-226f-4d58-a24d-4da512f7cf6f" />
Absolute worst .Even with MAX plan not able to use this shit tool .

serverside-is · 9 months ago

I keep gettiing the same error. This is happening for a few days now. Happening now while asking Claude Code to read a PDF file. If I remember correctly, last week PDF files were also involved.

dinhanhthi · 9 months ago

Same here, very frequently

crovax124 · 9 months ago

same here !

bbalusmartegrid · 9 months ago

Same error:

Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.30: tool_use ids were found without tool_result blocks immediately after: toolu_01McXs..... Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"req_011CU52Ys..."}

v-vovk · 9 months ago

same here

ttonmoy30 · 9 months ago

fix this please

AbhishekDas · 9 months ago

Same here. The problem remains even after /rewind. How to fix it? I am stuck.

amosvictor97 · 9 months ago

Got the same issue. The new VS Code extension update is pretty buggy, but I was able to keep working from the terminal.

rearley · 9 months ago

Second day in a row where this has occurred and only a new chat has helped, a little. Can not continue the chat which means trying to figure out how to recover.

spade88888 · 9 months ago

same here - serious issue. plz fix.

sintem · 9 months ago

pls fix

QveronQ · 9 months ago

Same here

mcfongtw · 9 months ago

same :(

viler · 9 months ago

same :(, I managed to get past it by just doing one very simple thing at a time

sud33p · 9 months ago

another same :(

Hyuunw00 · 9 months ago

This issue seems to occur primarily when users ask another question while Claude is working on a task. This issue doesn't occur very often.

viler · 9 months ago
This issue seems to occur primarily when users ask another question while Claude is working on a task. This issue doesn't occur very often.

For me this isn't related to asking a question while working on something, it occurs even with clean context, no history in the folder and just giving some basic instructions and a file or two to read.

gr0vity-dev · 9 months ago

Confirming I'm experiencing this issue as well.

Environment:

  • Extension Version: 2.0.14
  • VSCode: 1.104.3 (Commit: 385651c)
  • OS: macOS Sequoia (Darwin arm64 24.1.0)

Scenario:
The error occurs on a new chat with no prior interaction. It happened while the VSCode window was out of focus on a different desktop.

flosrn · 9 months ago

For the moment, my only workaround is to use Claude Code inside Zed Agent, I don't have the /rewind issue within it

prillcode · 9 months ago

I started getting this issue this morning with the VS code extension, as well. Even after reloading the extension (as it showed there was an update), the issue persisted. The only workaround is to use Claude in an integrated terminal as that doesn't seem to have the issue.

adilsonx · 9 months ago

Claude code API down i guess

israel-ramos · 9 months ago

Same here!

thierrymaasdam · 9 months ago

Same here!

sightama · 9 months ago

Happening same for me right now.
env:

  • Mac
  • pycharm
  • terminal with claude code inside - ask search the web + ultrathink simple request + read two files.
ttonmoy30 · 9 months ago

Guys I found a solution !!! In my case it was happening when trying to read a pdf file (2.44mb) , So I moved the pdf into another dir and ask claude to create a python script to convert the pdf into jpg and then used claude code to read those .jpg and create a comprehensive md file without missing any details, then I moved this md to the main project dir. After back to the main project dir and this time opened another claude code session and ask it to read the md file instead of trying to read the pdf and it worked. I think if you have similiar situation you can also upload the pdf to claude web and ask it to make a comprehensive md file then pass that to claude code for imlementation instead of trying hard to read the pdf file.

Tknox001 · 9 months ago

Getting this far too often now in the last few days. /rewind is not an available command either.

simon-aq · 9 months ago
Getting this far too often now in the last few days. /rewind is not an available command either.

You can use /rewind in the console, but not in the VSCode extension

haveaguess · 9 months ago

Ive had to disable my PostEdit hook to avoid seeing this when running "bypass permissions on"

wgmoretto · 9 months ago

Same here. /rewind function does not exists.

ianbmacdonald · 9 months ago

Just happened. Day 3 with Claude. I was entering my next prompt while it was iterating and may have hit enter before it finished. Not sure. /rewind is non existent.

galcianuk · 9 months ago

This is happening more and more. Please fix.

yeung108 · 9 months ago
Guys I found a solution !!! In my case it was happening when trying to read a pdf file (2.44mb) , So I moved the pdf into another dir and ask claude to create a python script to convert the pdf into jpg and then used claude code to read those .jpg and create a comprehensive md file without missing any details, then I moved this md to the main project dir. After back to the main project dir and this time opened another claude code session and ask it to read the md file instead of trying to read the pdf and it worked. I think if you have similiar situation you can also upload the pdf to claude web and ask it to make a comprehensive md file then pass that to claude code for imlementation instead of trying hard to read the pdf file.

same, but this works for me!

erispoe · 9 months ago

@ttonmoy30 That's not a solution that's a workaround. Unfortunately CC cannot handle long-running concurrent tool usage (which is why your pdf reading caused the bug I suspect).

The general workaround is still, as you have discovered, to avoid running concurrent tools.

If Anthropic thinks this is normal and expected behavior, it would be great to have some guidance on what the intended use of CC is.

semikolon · 9 months ago

Workaround for tool_use/tool_result 400 errors:

@ergut @galcianuk @prillcode @Tknox001 @haveaguess - A research-backed solution was posted upthread on Oct 10: https://github.com/anthropics/claude-code/issues/8763#issuecomment-3391509893

Add the provided instructions to your global CLAUDE.md (~/.claude/CLAUDE.md) to enforce sequential tool execution and prevent parallel tool calls that trigger the bug.

Technical approach:

  • Uses semantic overlap to override CC's default parallel execution behavior
  • Explicit precedence declarations with concrete harm justification
  • Based on LLM instruction conflict research (2024-2025)

This prevents the majority of occurrences for users with PostToolUse hooks and complex workflows.

Note: Workaround while Anthropic completes fixes for remaining 2 root causes (1 of 3 mitigated per Oct 7 update).

I haven't had the problem once since I added this.

xaimepardal · 9 months ago

The same. /rewind function does not exists :(

jesse-kaufman · 9 months ago

Happening quite a bit and 9 times out of 10 it's in the process of making changes meaning that the codebase is left in a completely broken state :/

BenRacicot · 9 months ago

looks like 2.0.15 has no update (perhaps worse)

are you broken ⎿ API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.
p-christen · 9 months ago

2.0.15 is worse for me, or it's just timing issue on the backend.
It happens reading any files now, to the point where I added something like that to claude.md

"To avoid the crashes we've been experiencing, please read documents one at a time rather than multiple documents consecutively. After reading each document, perform a detailed analysis and write it to the docs folder. This sequential approach should help us bypass the concurrency errors."

Anthropic, please fix it 🙏🏼 it's driving us crazy 🤪🤯

keithworrell · 9 months ago
This is a disaster and an emergency. It's preventing me from doing real work. Occuring in pretty much every session I'm running, sooner or later. I have PostToolUse hooks active - I wonder if that's the culprit? The PostToolUse output is being sent as USER MESSAGES back to CLAUDE as if I am sending new messages FOR EVERY NEW TOOL USE. For me it often gets into a state of uninterruptable looping based on subsequent tool uses triggering "user messages" which simply contain PostToolUse hook outputs. Insanity. UNACCEPTABLE. Please somebody from the Claude Code team - reach out if you want help debugging this. Collection of other similar bug reports: #8187 #8077 #8201 #8303 #8325 #8425 #8507 #8612 #8652 #8670 #8746 #8763 #8783 #8790 #8817 #8818 #8821 #8847 #8867 (my report) #8887 #8893 #8894 #8895 #8897 #8903 ### EDIT (Oct 14): Workaround for tool_use/tool_result 400 errors: A research-backed solution was posted on Oct 10: #8763 (comment) Add the provided instructions to your global CLAUDE.md (~/.claude/CLAUDE.md) to enforce sequential tool execution and prevent parallel tool calls that trigger the bug. Technical approach: Uses semantic overlap to override CC's default parallel execution behavior Explicit precedence declarations with concrete harm justification Based on LLM instruction conflict research (2024-2025) This prevents the majority of occurrences for users with PostToolUse hooks and complex workflows. Note: Workaround while Anthropic completes fixes for remaining 2 root causes (1 of 3 mitigated per Oct 7 update). I haven't had the problem once since I added this.

The solution to running agents in parallel having conflicts is not to enforce sequential processing. That's a non-solution. What you need to do is run an agent orchestrator that looks for conflicts and avoid them. Workflow example: orchestrator looks at agents and looks for file conflicts. It appends the agent with a list of safe files or blacklistand blacklisted files that exist within the scope of work of the batch. The orchestrator then runs the batch and the agents return a list of work that still needs completion aware of the conflicts. The orchestrator then relaunches the agents with a new list of whitelist and blacklist files to continue their work. It keeps doing this until all work is completed. Note, 1) yes, this creates. a modest amount of overhead and there is less parallelization because you are actively avoiding race conditions, but 2) biggest issue I still run into is that on my potato of a laptop's CPU gets thrashed by the constant aggressive terminal updates by the many instances of CC running at the same time.

And to be clear, I'm not talking writing python script or anything, you just explain the above in your prompt.

trevstar72 · 9 months ago

I'm getting the same repeated API tool bug over the past...week-ish? it's really getting to the point of relegating claude code to "backup tool" rather than my primary development tool.

Please fix this. It's a show-stopper, and very frustrating to be on the top Max Plan and not able to use the tool reliably due to bugs.

iRonin · 9 months ago

Same here. This temp workaround works.

yaronlevi · 9 months ago

Also here

KrunchMuffin · 9 months ago
Same here. This temp workaround works.

This does nothing for me. I added it at the top, restarted the session. Maybe cause I am resuming the session that had issues?

iRonin · 9 months ago
> Same here. This temp workaround works. This does nothing for me. I added it at the top, restarted the session. Maybe cause I am resuming the session that had issues?

Yeah, that session is toast. You can /export and start a new one.

dangelion · 9 months ago

Same here. The workaround above doesn't work for me.
Please solve asap!

@iRonin /export doesn't exist (I'm using Cursor + Claude Code extension)

iRonin · 9 months ago
Same here. The workaround above doesn't work for me. Please solve asap! @iRonin /export doesn't exist (I'm using Cursor + Claude Code extension)

Cusros uses your Claude install- cheeck your conversations there to export.

KrunchMuffin · 9 months ago
Same here. The workaround above doesn't work for me. Please solve asap! @iRonin /export doesn't exist (I'm using Cursor + Claude Code extension)

Dunno if the cursor cc extension uses the native ui and not terminal, if so, there is a lot missing from it. i stick to the terminal version.

romeromarcelo · 9 months ago

For the case I describe in #9309 , today's update of Claude Code to version 2.0.17 appears to have resolved the tool use concurrency conflict by reorganizing the results of the PostToolUse hooks as a system reminder instead of Assistant messages. Parallel tool calls with PostToolUse hooks are now working well for my use case in the current version. 🙂

chris-ryu · 9 months ago
> Same here. The workaround above doesn't work for me. Please solve asap! > @iRonin /export doesn't exist (I'm using Cursor + Claude Code extension) Cusros uses your Claude install- cheeck your conversations there to export.

In my case, VS Code Claude Code Extension. I've have still the same issue.

bcherny collaborator · 9 months ago

Hey all, we're looking into it. There's actually a bunch of root causes here and over the last few weeks we've been going through to fix these one by one. More updates to come.

anquegi · 9 months ago

Hi thanks
Upgrade to @anthropic-ai/claude-code 2.0.19 solved my problems

erispoe · 9 months ago

Unfortunately the behavior worsened for me since 2.0.19

The workaround asking CC to not run tools concurrently does not work anymore to prevent API 400 errors. This is quite puzzling honestly.

Sent feedback IDs:

  • d2c4ed31-2135-4361-8600-d2d35add8883
  • 58e52d63-9534-44a1-a857-21927d5112a2
  • cfb9d868-5ae4-4c2f-abd1-e5ee47598b90

@bcherny there's a common thread about hooks being a major cause, maybe a priority would be to update the hooks guidance on Anthropic docs to minimize the behavior? So that at least we can do something.

ariccio · 9 months ago

Upside of knowingly subverting the bystander effect and filing bugs every time I encounter one: software gets better, developers know more

Downside: 206 notifications that all blur together 🤣

ariccio · 9 months ago
Hey all, we're looking into it. There's actually a bunch of root causes here and over the last few weeks we've been going through to fix these one by one. More updates to come.

I suspect there are some odd concurrency issues here

It's possibly the same reason why sometimes if I hit enter at juuuust the wrong time, a Caveat message and a <bash-input> tag end up in my UI

It's also odd how much CPU Claude code uses. Heavy loading will definitely make those concurrency weirdies more prominent.

I have a side project going where I have Claude code building a comprehensive Claude code reverse engineering pipeline so I can inspect things like this 🤣

It's easier than people might realize, because like 80% of the bundle is packages (bedrock? Why you so huge?) and then Claude code itself looks like every other compiled react app.

(I will be mildly embarrassed if 2.0 changes all this - it's a side project I swear!)

dangelion · 9 months ago
Hey all, we're looking into it. There's actually a bunch of root causes here and over the last few weeks we've been going through to fix these one by one. More updates to come.

Is it recommended to use Claude's official extension for Vs Code/Cursor or to use Claude from the terminal?

amxv · 9 months ago

subagents are still not working at all in 2.0.19 for me - API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation

ArnoGW1 · 9 months ago
I fixed it! cd ~/.claude/ide There were two lock files in there which matches the "concurrency" logic... rm *.lock Restarted Visual Studio code and it worked. I also wiped out the convo history in ~/.claude/projects but I don't think that was the cuplrit @ArnoGW1 - you want to try it? I was just getting the exact same error as you but it's now resolved due to ^^

Thanks for the suggestion! It worked for a while after creating a new conversation (the existing one seemed to stay broken).

But now this happened again with only one Claude Code session running. I'm trying the CLI. (This is on Windows.)

xpluscal · 9 months ago

+100

cam-the5thc · 9 months ago

Same issue here. Sort it our Claude.

ruidpm · 9 months ago

+1, this is incredibly annoying

LeeMatthewHiggins · 9 months ago

this happens all the time when i have multiple cursor windows open working on different projects. I oftern like to have at least 2 projects running so i can review one while the other builds. one day this week I only had one window open and didn´t see the issue. I have the figma MCP only. i´m using the latest cursor extension.

gorban · 9 months ago

+1 This has happened to me twice now. Breaks my flow completely. Session is unrecoverable as far as I can tell. On Claude Code CLI inside VS Code (extension). Why does it say /rewind if that doesn't do anything? It says "No matching commands"

oinochoe · 9 months ago

I think it's like that when working at a cafe.. 😢

richmidwinter · 9 months ago

This bug is infuriating.

erispoe · 9 months ago

Feedback ids:

  • eb613d17-0cd4-415d-a4c0-83031e851802
  • 59d29592-67db-4226-ab39-cd2e635b7598
  • 2cdd2883-e6b8-4481-a183-94e8df2d5001
yemreak · 9 months ago

as my experiences:

Root Cause: Spawned process stdout/stderr corruption

Problem:

  • Hook spawns external process → reads output → process still
  • running when hook writes JSON response → process stderr/stdout
  • interleaves with hook JSON → malformed JSON → API 400

Fix:

  • Always await full process exit before hook writes JSON output

https://www.reddit.com/r/ClaudeCode/comments/1oaodrl/til_api_400_concurrency_issues_root_cause_hooks/

gndk · 8 months ago

This makes (blocking) hooks, which are CC's main differentiator right now, completely unusable. Started with either 2.0.14, 2.0.15 or 2.0.17 (native MacOS build) for me, not sure anymore. Still broken on 2.0.22.

nigelchan · 8 months ago

Created a mess in code - Very disruptive of workflow.....need urgent care please.

rodgetech · 8 months ago

fix this crap!

semikolon · 8 months ago
semikolon · 8 months ago
as my experiences: ## Root Cause: Spawned process stdout/stderr corruption Problem: - Hook spawns external process → reads output → process still - running when hook writes JSON response → process stderr/stdout - interleaves with hook JSON → malformed JSON → API 400 Fix: - Always await full process exit before hook writes JSON output https://www.reddit.com/r/ClaudeCode/comments/1oaodrl/til_api_400_concurrency_issues_root_cause_hooks/

Safety protocol for parallel tool call bug:
Add this to your CLAUDE.md to get rid of this issue until it's fixed by Anthropic (comment)

semikolon · 8 months ago
Guys I found a solution !!! In my case it was happening when trying to read a pdf file (2.44mb) , So I moved the pdf into another dir and ask claude to create a python script to convert the pdf into jpg and then used claude code to read those .jpg and create a comprehensive md file without missing any details, then I moved this md to the main project dir. After back to the main project dir and this time opened another claude code session and ask it to read the md file instead of trying to read the pdf and it worked. I think if you have similiar situation you can also upload the pdf to claude web and ask it to make a comprehensive md file then pass that to claude code for imlementation instead of trying hard to read the pdf file.

Safety protocol for parallel tool call bug:
Add this to your CLAUDE.md to get rid of this issue until it's fixed by Anthropic (comment)

semikolon · 8 months ago
Ive had to disable my PostEdit hook to avoid seeing this when running "bypass permissions on"

Safety protocol for parallel tool call bug:
Add this to your CLAUDE.md to get rid of this issue until it's fixed by Anthropic (comment)

semikolon · 8 months ago
This is happening more and more. Please fix.

Safety protocol for parallel tool call bug:
Add this to your CLAUDE.md to get rid of this issue until it's fixed by Anthropic (comment)

semikolon · 8 months ago
Just happened. Day 3 with Claude. I was entering my next prompt while it was iterating and may have hit enter before it finished. Not sure. /rewind is non existent.

/rewind exists in the CLI, no?

Safety protocol for parallel tool call bug:
Add this to your CLAUDE.md to get rid of this issue until it's fixed by Anthropic (comment)

semikolon · 8 months ago
Happening quite a bit and 9 times out of 10 it's in the process of making changes meaning that the codebase is left in a completely broken state :/

Safety protocol for parallel tool call bug:
Add this to your CLAUDE.md to get rid of this issue until it's fixed by Anthropic (comment)

semikolon · 8 months ago
2.0.15 is worse for me, or it's just timing issue on the backend. It happens reading any files now, to the point where I added something like that to claude.md "To avoid the crashes we've been experiencing, please read documents one at a time rather than multiple documents consecutively. After reading each document, perform a detailed analysis and write it to the docs folder. This sequential approach should help us bypass the concurrency errors." Anthropic, please fix it 🙏🏼 it's driving us crazy 🤪🤯

Safety protocol for parallel tool call bug:
Add this to your CLAUDE.md to get rid of this issue until it's fixed by Anthropic (comment)

semikolon · 8 months ago
> This is a disaster and an emergency. It's preventing me from doing real work. Occuring in pretty much every session I'm running, sooner or later. > > I have PostToolUse hooks active - I wonder if that's the culprit? > > The PostToolUse output is being sent as USER MESSAGES back to CLAUDE as if I am sending new messages FOR EVERY NEW TOOL USE. > > For me it often gets into a state of uninterruptable looping based on subsequent tool uses triggering "user messages" which simply contain PostToolUse hook outputs. Insanity. > > UNACCEPTABLE. > > Please somebody from the Claude Code team - reach out if you want help debugging this. > > Collection of other similar bug reports: #8187 #8077 #8201 #8303 #8325 #8425 #8507 #8612 #8652 #8670 #8746 #8763 #8783 #8790 #8817 #8818 #8821 #8847 #8867 (my report) #8887 #8893 #8894 #8895 #8897 #8903 > > ### EDIT (Oct 14): Workaround for tool_use/tool_result 400 errors: > A research-backed solution was posted on Oct 10: #8763 (comment) > > Add the provided instructions to your global CLAUDE.md (~/.claude/CLAUDE.md) to enforce sequential tool execution and prevent parallel tool calls that trigger the bug. > > Technical approach: > > Uses semantic overlap to override CC's default parallel execution behavior Explicit precedence declarations with concrete harm justification Based on LLM instruction conflict research (2024-2025) This prevents the majority of occurrences for users with PostToolUse hooks and complex workflows. > > Note: Workaround while Anthropic completes fixes for remaining 2 root causes (1 of 3 mitigated per Oct 7 update). > > I haven't had the problem once since I added this. The solution to running agents in parallel having conflicts is not to enforce sequential processing. That's a non-solution. What you need to do is run an agent orchestrator that looks for conflicts and avoid them. Workflow example: orchestrator looks at agents and looks for file conflicts. It appends the agent with a list of safe files or blacklistand blacklisted files that exist within the scope of work of the batch. The orchestrator then runs the batch and the agents return a list of work that still needs completion aware of the conflicts. The orchestrator then relaunches the agents with a new list of whitelist and blacklist files to continue their work. It keeps doing this until all work is completed. Note, 1) yes, this creates. a modest amount of overhead and there is less parallelization because you are actively avoiding race conditions, but 2) biggest issue I still run into is that on my potato of a laptop's CPU gets thrashed by the constant aggressive terminal updates by the many instances of CC running at the same time. And to be clear, I'm not talking writing python script or anything, you just explain the above in your prompt.

The errors are due not to the actual concurrent editing of files but due to the hooks feedback/responses coming in concurrently, I think. It seems shutting down hooks makes people get rid of this bug also but I don't want to do that.

Safety protocol for parallel tool call bug:
Add this to your CLAUDE.md to get rid of this issue until it's fixed by Anthropic (comment)

semikolon · 8 months ago
I'm getting the same repeated API tool bug over the past...week-ish? it's really getting to the point of relegating claude code to "backup tool" rather than my primary development tool. Please fix this. It's a show-stopper, and very frustrating to be on the top Max Plan and not able to use the tool reliably due to bugs.

I agree so hard, Anthropic needs to do more on this. But I devised a workaround that has made the bug go away for me:

Safety protocol for parallel tool call bug:
Add this to your CLAUDE.md to get rid of this issue until it's fixed by Anthropic (comment)

semikolon · 8 months ago
For the case I describe in #9309 , today's update of Claude Code to version 2.0.17 appears to have resolved the tool use concurrency conflict by reorganizing the results of the PostToolUse hooks as a system reminder instead of Assistant messages. Parallel tool calls with PostToolUse hooks are now working well for my use case in the current version. 🙂

Amazing. Really hope this will work. I'll carefully test later today

semikolon · 8 months ago
Hey all, we're looking into it. There's actually a bunch of root causes here and over the last few weeks we've been going through to fix these one by one. More updates to come.

Thank you!!

erispoe · 8 months ago

Feedback ids:

  • d1aca6f1-0d2a-4693-9964-10503ef0341f
  • b9e97c67-51b6-4a07-b4d5-bbf33c94277e
  • bfa339c7-4037-44a7-a239-6fa99f24b190
  • 254f0c0b-17db-4b17-9c19-a67dd6735edf
  • 1a21f51a-5386-408d-b296-f0b00c6daaac
semikolon · 8 months ago
Feedback ids: - d1aca6f1-0d2a-4693-9964-10503ef0341f - b9e97c67-51b6-4a07-b4d5-bbf33c94277e

Wait so even with the most recent version you're still getting this? Confirm please. Maybe I should hold off on removing my CLAUDE.md workaround if the issue is still live

erispoe · 8 months ago

@semikolon yes it's worse than ever for me

stkr22 · 8 months ago

I am still having this issue as well. Occurs on vanilla vscode extension. No hooks, no mcps.
Gut feeling: it happens less often than before but might be mistaken. The claude.md instruction prevents it though.

semikolon · 8 months ago
@semikolon yes it's worse than ever for me

Can you tell me about your hooks setup? Does it occur if you disable hooks?

As mentioned above, the errors are due not to the actual concurrent editing of files or any concurrent tool use but seems specifically due to the hooks feedback/responses coming in from concurrently using tools, I think. It seems shutting down hooks makes people get rid of this bug also but I don't want to do that.

Have you tried my CLAUDE.md workaround referenced earlier?

richmidwinter · 8 months ago

FWIW I've never set up any hooks and I'm getting this.

vladislavdonchev · 8 months ago

Shutting down the hooks is simply not an option, this is a critical issue for any workflows that use them.

It is quite literally impossible to use claude without tool scanning...

semikolon · 8 months ago
FWIW I've never set up any hooks and I'm getting this.

Try my CLAUDE.md workaround above and tell me if it works?

erispoe · 8 months ago

@semikolon Unfortunately it does not for me now.

semikolon · 8 months ago
@semikolon Unfortunately it does not for me now.

You added it and it doesn't eliminate the issue in new sessions? Old sessions ofc have the old instructions, so you have to start a new one to test this

vladislavdonchev · 8 months ago

Downgraded back to 2.0.10 and the issues are gone it seems.

erispoe · 8 months ago

@semikolon Yes, I did. And no it does not solve the issues. Now I get an API 400 for any deny decision in PreToolUse regardless of the combo of exit code and decision that I use.

cloudsavant · 8 months ago

same issue, today second time. this is really catastrophic. there is no /rewind command, i must start everything from scratch every time.

ArnoGW1 · 8 months ago

Can you implement this /rewind command the error message talks about in the VSCode extension, to make the workaround easier? Clearly that's possible since starting a new discussion often fixes it.

semikolon · 8 months ago

The /rewind command does not exist inside the VS Code extension but does exist in the CLI

amxv · 8 months ago

fwiw i disabled all posttooluse hooks and that seemed to fix it for now

semikolon · 8 months ago
fwiw i disabled all posttooluse hooks and that seemed to fix it for now

Did you try my CLAUDE.md workaround? Linked above

jpvanoosten · 8 months ago

I have used this workaround: https://github.com/anthropics/claude-code/issues/8763#issuecomment-3391509893 for more than a week now and the issues seems to be completely resolved for me. I have not received the 400 error since I've added this to my CLAUDE.md file. I am using The Claude Code for VS Code extension (2.0.24).
I have had other issues (500 error), but this is usually recoverable after a few minutes.

ArnoGW1 · 8 months ago

FYI, I haven't seen this issue since I added this simpler rule to my CLAUDE.md:

On Windows, do not run tools concurrently. There is a bug and you might crash when that happens. Remind me at the beginning of every discussion that I said this so that I remember to remove it later.
blois collaborator · 8 months ago

We have been tracking these errors and working on fixes- recommend 2.0.24 or newer.

Instructions to run tools sequentially should no longer be needed with this version and we're continuing to monitor errors.

gndk · 8 months ago
We have been tracking these errors and working on fixes- recommend 2.0.24 or newer. Instructions to run tools sequentially should no longer be needed with this version and we're continuing to monitor errors.

@blois Thanks for the heads-up, as I didn't see anything about this in the release notes.

I don't see the API errors anymore and blocking hooks are working for me again on 2.0.25 👍

Also I noticed that the hook output (e.g. hookSpecificOutput for PreToolUse decision control) has changed and the blocking reason is now hidden from the user and only visible in transcript mode.

● Write(/srv/hello_world.php)
  ⎿  PreToolUse:Write hook returned blocking error
  ⎿  Error: Hook requested permission behavior: deny

If I want the blocking reason to be shown to both Claude and the user, is the recommendation now to use systemMessage in addition to hookSpecificOutput?

vec715 · 8 months ago

there is a lot of such issues on claude code WEB, i dont have it locally on my windows machine, but on CC remote almost every new chat is having that issue, its crazy

sid374 contributor · 8 months ago

We're continuing to monitor this issue, if you have faced this recently after updating to 2.0.24 would be great if you could comment here and attach your feedback_id after using /bug

vec715 · 8 months ago

I just tried Claude web and got this issue once again, It looks like the web version of CC is almost unusable cuz I'm receiving issues in 9 of 10 cases

burka · 8 months ago

On 2.0.27 and still hitting this so often and unrecoverably.

gitawego · 8 months ago

me too, same issue with 2.0.27

keithworrell · 8 months ago
FYI, I haven't seen this issue since I added this simpler rule to my CLAUDE.md: > On Windows, do not run tools concurrently. There is a bug and you might crash when that happens. Remind me at the beginning of every discussion that I said this so that I remember to remove it later.

That is a big over-correction. The issue appears when two agents try and write to the same file at the same time. The workaround is that you need to instruct your orchestrator on what file locks are and why they are important when prompting agents.

semikolon · 8 months ago
> FYI, I haven't seen this issue since I added this simpler rule to my CLAUDE.md: > > > On Windows, do not run tools concurrently. There is a bug and you might crash when that happens. Remind me at the beginning of every discussion that I said this so that I remember to remove it later. That is a big over-correction. The issue appears when two agents try and write to the same file at the same time. The workaround is that you need to instruct your orchestrator on what file locks are and why they are important when prompting agents.

Could you please tell us how you concluded this? And why it results in the specific error messages that have been experienced by people in these threads? Are you not in fact getting this mixed up with something else?

I have not had this issue ever since adding my claude.md section to avoid concurrent tool use. It seems to be occuring due to concurrent tool use + PostToolUse hooks. But my hooks work fine now.

semikolon · 8 months ago
On 2.0.27 and still hitting this so often and unrecoverably.

Could you tell us more about your environment and when exactly it happens if it still happens? I've been postponing removing my Claude.md preventive instructions until I'm sure this issue will never come up again, but if ppl are still experiencing it, maybe I'm keeping it there for now... Glad I figured out the workaround until it's fixed for good.

marsboy02 · 8 months ago

I also have a same issue in 2.0.5 claude. the result of /context command is this.

Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.88: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01MDFzQfojdXrANWL4mWWNkk. Each `tool_use` block must have a corresponding `tool_result` block in the next message."},"request_id":"req_011CUYmAZ9iCAuuheHGTsmkY"}
ArnoGW1 · 8 months ago
> FYI, I haven't seen this issue since I added this simpler rule to my CLAUDE.md: > > On Windows, do not run tools concurrently. There is a bug and you might crash when that happens. Remind me at the beginning of every discussion that I said this so that I remember to remove it later. That is a big over-correction. The issue appears when two agents try and write to the same file at the same time. The workaround is that you need to instruct your orchestrator on what file locks are and why they are important when prompting agents.

Interesting. I type prompts directly into Claude Code. What's the orchestrator in this setup?

dhust · 8 months ago
We're continuing to monitor this issue, if you have faced this recently after updating to 2.0.24 would be great if you could comment here and attach your feedback_id after using /bug

/bug isn't a command. I'm in vscode.

FesonX · 8 months ago
> We're continuing to monitor this issue, if you have faced this recently after updating to 2.0.24 would be great if you could comment here and attach your feedback_id after using /bug /bug isn't a command. I'm in vscode.

+1, and the only way I can do in vscode, is drop that conversation

BeamNawapat · 8 months ago

has any update?

semikolon · 8 months ago
has any update?

Still experiencing this? What's your environment? Hooks? When does the error occur? After PostToolUse hooks for concurrent tool uses?

halbano · 8 months ago

This is annoying, especially because you are prompted to run a command that doesn't seem to exist, but also because you are still paying 100 bucks every month to experience the bug when you less expect it to happen.

Are there any updates or workarounds to this? In general the workaround to me has been starting a new session, and pasting as much context I can from the failing session

ariccio · 8 months ago

You know what's odd? I see hundreds of comments since my original post but I haven't seen the bug in a few weeks now.

That said, I'm always highly entertained when there's a bug in Claude code, because, y'know, are they giving themselves usage limits? Sonnet 4.5 is good enough that I bet with enough parallel instances and subagents you can find the cause of most of these bugs. The main issue just becomes exponential loss of efficiency as without recursive subagents to decompose massive tasks into hierarchical contexts... While I'm expounding... when do we get 3 and more layer subagents?

burka · 8 months ago

3 and more! :-)

ariccio · 8 months ago
3 and more! :-)

Oh yeah I mean a month or two ago I caught Claude trying to run itself via the command line when already in a subagent, so it not only seems more human-brain-like, but Claude _already_ wants to do it!

semikolon · 8 months ago
This is annoying, especially because you are prompted to run a command that doesn't seem to exist, but also because you are still paying 100 bucks every month to experience the bug when you less expect it to happen. Are there any updates or workarounds to this? In general the workaround to me has been starting a new session, and pasting as much context I can from the failing session

They've basically said it's fixed. Scroll up far enough and you should see it.

kenryu42 · 8 months ago

so Anthropic recently gave us free credit to test out the Claude code web version.
I was using it for a while, and then I hit the "Open in CLI" button. That button copied the claude --teleport command to the clipboard, but when I ran it, I received the similar errors.

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.50.content.0: unexpected
    `tool_use_id` found in `tool_result` blocks: toolu_019LH462QgZAC98M7ibbQJ8H. Each `tool_result` block must have a corresponding
     `tool_use` block in the previous message."},"request_id":"req_011CUr7Tku1wHmUS2JcBrcup"}
default-student · 8 months ago
> This is annoying, especially because you are prompted to run a command that doesn't seem to exist, but also because you are still paying 100 bucks every month to experience the bug when you less expect it to happen. > Are there any updates or workarounds to this? In general the workaround to me has been starting a new session, and pasting as much context I can from the failing session They've basically said it's fixed. Scroll up far enough and you should see it.

Atleast for me this is still an issue in the vscode addon

bcherny collaborator · 8 months ago

Yep, this is fixed. If you hit this again, please:

  1. Make sure you're on the latest version of CLI (claude update) or IDE extension
  2. File a new issue

Thanks for the reports!

icscript · 7 months ago

I have the same issue on Version: 2.0.46 immediately after teleporting 'claude code on the web' session into Ubuntu server inside cloned repo.
Feedback ID: e42d62e3-7543-477a-acea-d8ebe37fa510

Posted new issue as requested here: https://github.com/anthropics/claude-code/issues/11973

github-actions[bot] · 7 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.