claude-code - 💡(How to fix) Fix [Bug] Anthropic API Error: 400 Tool Use Concurrency Issue from claude code (iTerm2 CLI) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53766Fetched 2026-04-28 06:47:48
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×5

Error Message

[ { "error": "Error: EISDIR: illegal operation on a directory, read '/Users/<USER>/workspace/<ORG_TOOLS>/<TICKET>-local-prod-mgmt'\n at WKH (/$bunfs/root/src/entrypoints/cli.js:1561:144)\n at processTicksAndRejections (native:7:39)", "timestamp": "2026-04-27T05:04:58.728Z" }, { "error": "Error: File does not exist. Note: your current working directory is /Users/<USER>/workspace/<ORG_TOOLS>/<TICKET>-local-prod-mgmt.\n at call (/$bunfs/root/src/entrypoints/cli.js:4727:7630)\n at processTicksAndRejections (native:7:39)", "timestamp": "2026-04-27T05:07:09.861Z" }, { "error": "Error: ENOENT: no such file or directory, scandir '/Users/<USER>/Users/<USER>/workspace/<SERVICE_REPO>'\n at async Hs4 (/$bunfs/root/src/entrypoints/cli.js:621:11190)\n at async kK9 (/$bunfs/root/src/entrypoints/cli.js:621:11692)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8268:14295)", "timestamp": "2026-04-27T06:06:21.216Z" }, { "error": "Error: ENOENT: no such file or directory, scandir '/Users/<USER>/Users/<USER>/workspace/<SERVICE_REPO>'\n at async Hs4 (/$bunfs/root/src/entrypoints/cli.js:621:11190)\n at async kK9 (/$bunfs/root/src/entrypoints/cli.js:621:11692)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8268:14295)", "timestamp": "2026-04-27T06:06:21.281Z" }, { "error": "Error: ENOENT: no such file or directory, scandir '/Users/<USER>/Users/<USER>/workspace/<SERVICE_REPO>'\n at async Hs4 (/$bunfs/root/src/entrypoints/cli.js:621:11190)\n at async kK9 (/$bunfs/root/src/entrypoints/cli.js:621:11692)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8268:14295)", "timestamp": "2026-04-27T06:06:32.666Z" }, { "error": "Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.<N>: tool_use ids were found without tool_result blocks immediately after: <TOOL_USE_ID>. Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"<REQUEST_ID>"}\n at generate (/$bunfs/root/src/entrypoints/cli.js:11:52701)\n at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n at processTicksAndRejections (native:7:39)", "timestamp": "2026-04-27T06:07:30.676Z" }, { "error": "Error: API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.\n at bf7 (/$bunfs/root/src/entrypoints/cli.js:4732:1096)\n at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8402:15580)\n at async l (/$bunfs/root/src/entrypoints/cli.js:8203:552)\n at processTicksAndRejections (native:7:39)", "timestamp": "2026-04-27T06:08:11.563Z" } ]

Code Example

[
  {
    "error": "Error: EISDIR: illegal operation on a directory, read '/Users/<USER>/workspace/<ORG_TOOLS>/<TICKET>-local-prod-mgmt'\n    at WKH (/$bunfs/root/src/entrypoints/cli.js:1561:144)\n    at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-27T05:04:58.728Z"
  },
  {
    "error": "Error: File does not exist. Note: your current working directory is /Users/<USER>/workspace/<ORG_TOOLS>/<TICKET>-local-prod-mgmt.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4727:7630)\n    at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-27T05:07:09.861Z"
  },
  {
    "error": "Error: ENOENT: no such file or directory, scandir '/Users/<USER>/Users/<USER>/workspace/<SERVICE_REPO>'\n    at async Hs4 (/$bunfs/root/src/entrypoints/cli.js:621:11190)\n    at async kK9 (/$bunfs/root/src/entrypoints/cli.js:621:11692)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8268:14295)",
    "timestamp": "2026-04-27T06:06:21.216Z"
  },
  {
    "error": "Error: ENOENT: no such file or directory, scandir '/Users/<USER>/Users/<USER>/workspace/<SERVICE_REPO>'\n    at async Hs4 (/$bunfs/root/src/entrypoints/cli.js:621:11190)\n    at async kK9 (/$bunfs/root/src/entrypoints/cli.js:621:11692)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8268:14295)",
    "timestamp": "2026-04-27T06:06:21.281Z"
  },
  {
    "error": "Error: ENOENT: no such file or directory, scandir '/Users/<USER>/Users/<USER>/workspace/<SERVICE_REPO>'\n    at async Hs4 (/$bunfs/root/src/entrypoints/cli.js:621:11190)\n    at async kK9 (/$bunfs/root/src/entrypoints/cli.js:621:11692)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8268:14295)",
    "timestamp": "2026-04-27T06:06:32.666Z"
  },
  {
    "error": "Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.<N>: `tool_use` ids were found without `tool_result` blocks immediately after: <TOOL_USE_ID>. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"<REQUEST_ID>\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52701)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-27T06:07:30.676Z"
  },
  {
    "error": "Error: API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.\n    at bf7 (/$bunfs/root/src/entrypoints/cli.js:4732:1096)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8402:15580)\n    at async l (/$bunfs/root/src/entrypoints/cli.js:8203:552)\n    at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-27T06:08:11.563Z"
  }
]
RAW_BUFFERClick to expand / collapse

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

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.112
  • Feedback ID: 443f3edd-e4e2-4c17-b959-d453d12c7152

Errors

[
  {
    "error": "Error: EISDIR: illegal operation on a directory, read '/Users/<USER>/workspace/<ORG_TOOLS>/<TICKET>-local-prod-mgmt'\n    at WKH (/$bunfs/root/src/entrypoints/cli.js:1561:144)\n    at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-27T05:04:58.728Z"
  },
  {
    "error": "Error: File does not exist. Note: your current working directory is /Users/<USER>/workspace/<ORG_TOOLS>/<TICKET>-local-prod-mgmt.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4727:7630)\n    at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-27T05:07:09.861Z"
  },
  {
    "error": "Error: ENOENT: no such file or directory, scandir '/Users/<USER>/Users/<USER>/workspace/<SERVICE_REPO>'\n    at async Hs4 (/$bunfs/root/src/entrypoints/cli.js:621:11190)\n    at async kK9 (/$bunfs/root/src/entrypoints/cli.js:621:11692)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8268:14295)",
    "timestamp": "2026-04-27T06:06:21.216Z"
  },
  {
    "error": "Error: ENOENT: no such file or directory, scandir '/Users/<USER>/Users/<USER>/workspace/<SERVICE_REPO>'\n    at async Hs4 (/$bunfs/root/src/entrypoints/cli.js:621:11190)\n    at async kK9 (/$bunfs/root/src/entrypoints/cli.js:621:11692)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8268:14295)",
    "timestamp": "2026-04-27T06:06:21.281Z"
  },
  {
    "error": "Error: ENOENT: no such file or directory, scandir '/Users/<USER>/Users/<USER>/workspace/<SERVICE_REPO>'\n    at async Hs4 (/$bunfs/root/src/entrypoints/cli.js:621:11190)\n    at async kK9 (/$bunfs/root/src/entrypoints/cli.js:621:11692)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8268:14295)",
    "timestamp": "2026-04-27T06:06:32.666Z"
  },
  {
    "error": "Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.<N>: `tool_use` ids were found without `tool_result` blocks immediately after: <TOOL_USE_ID>. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"<REQUEST_ID>\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:52701)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-27T06:07:30.676Z"
  },
  {
    "error": "Error: API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.\n    at bf7 (/$bunfs/root/src/entrypoints/cli.js:4732:1096)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:8402:15580)\n    at async l (/$bunfs/root/src/entrypoints/cli.js:8203:552)\n    at processTicksAndRejections (native:7:39)",
    "timestamp": "2026-04-27T06:08:11.563Z"
  }
]

Note: Content was truncated.

extent analysis

TL;DR

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

Guidance

  • The error messages indicate issues with file directories and concurrency, suggesting that the system is experiencing problems with simultaneous tool usage.
  • The specific error "API Error: 400 due to tool use concurrency issues" points towards a synchronization problem that can be mitigated by running the /rewind command as suggested.
  • Verify that the /rewind command successfully recovers the conversation by checking for any further error messages after executing the command.
  • If issues persist, consider checking the file system for any inconsistencies or permissions problems that might be contributing to the errors.

Notes

The provided information does not specify the exact cause of the concurrency issues, so the effectiveness of the /rewind command may vary. Additionally, the truncated content might hide other relevant details.

Recommendation

Apply the workaround by running the /rewind command as it is explicitly suggested by the error message as a recovery method for the conversation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING