Bug Description
The workflow stops for no reason. When I try to write a follow-up prompt, it reveals the "tool_use ids were found without tool_result blocks" error message. It prevents me from creating a truly autonomous workflow.
Environment Info
Platform: darwin
Terminal: cursor
Version: 1.0.71
Feedback ID: de619269-71e4-4a2d-8057-3df7bf61893e
Errors
[
{
"error" : " Error: Request was aborted.\n at new sW (unknown:1:28)\n at new qY (/$bunfs/root/claude:876:1853)\n at new sJ (/$bunfs/root/claude:876:2641)\n at _createMessage (/$bunfs/root/claude:884:7955)\n at processTicksAndRejections (native:7:39)" ,
"timestamp" : " 2025-08-08T05:16:28.686Z"
},
{
"error" : " Error: Request was aborted.\n at new sW (unknown:1:28)\n at new qY (/$bunfs/root/claude:876:1853)\n at new sJ (/$bunfs/root/claude:876:2641)\n at makeRequest (/$bunfs/root/claude:893:3652)\n at processTicksAndRejections (native:7:39)" ,
"timestamp" : " 2025-08-08T05:23:21.851Z"
},
{
"error" : " Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)" ,
"timestamp" : " 2025-08-08T05:24:27.196Z"
},
{
"error" : " Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)" ,
"timestamp" : " 2025-08-08T05:24:33.294Z"
},
{
"error" : " Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)" ,
"timestamp" : " 2025-08-08T05:24:38.025Z"
},
{
"error" : " Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)" ,
"timestamp" : " 2025-08-08T05:24:42.410Z"
},
{
"error" : " Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)" ,
"timestamp" : " 2025-08-08T05:25:21.031Z"
},
{
"error" : " Error: 400 {\" type\" :\" error\" ,\" error\" :{\" type\" :\" invalid_request_error\" ,\" message\" :\" messages.28: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_018Ynj1mexLmRjfnRN5A3LHY. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\" }}\n at new sW (unknown:1:28)\n at new qY (/$bunfs/root/claude:876:1853)\n at new ZW0 (unknown:1:28)\n at generate (/$bunfs/root/claude:876:2310)\n at makeRequest (/$bunfs/root/claude:893:5330)\n at processTicksAndRejections (native:7:39)" ,
"timestamp" : " 2025-08-08T05:31:57.165Z"
}
]
Analysis
Environment Coverage
Platform/Terminal/Version combinations affected:
macOS : Apple Terminal (v1.0.62-64), Cursor (v1.0.67), iTerm.app (v1.0.51-59), VSCode
(v1.0.35-61), IntelliJ (v1.0.62), Warp (v1.0.53-55), ghostty (v1.0.53)
Linux : GNOME terminal (v1.0.62-70), Konsole (v1.0.61), VSCode (v1.0.35-53), WSL-Archlinux
(v1.0.64)
Windows : WSL Ubuntu + ZSH (v1.0.55), VSCode Integrated Terminal via WSL
Trigger Scenarios
When the error occurs:
During API request timeouts (6/10 retry attempts)
After workflow interruptions or unexpected CLI termination
When processing files (PDF, markdown, large files >25,000 tokens)
During tool use operations that get interrupted
After auto-upgrading to newer versions (specifically v1.0.55)
When sessions exceed ~2,400 tokens during compaction
During endpoint testing with Swagger
After git push operations with long request URLs
Key Insights
Core Issue : API validation error requiring each tool_use block to have immediate corresponding
tool_result block
Version Range : Affects versions from 0.2.14 through 1.0.71+ (widespread across all recent versions)
Root Cause : Recent API changes made tool_use/tool_result block ordering requirements stricter
Session Recovery : Error makes conversations unrecoverable, requiring complete restart
Pattern : Consistently results in 400 Bad Request with identical error message
Platform Impact : Primarily affects macOS users but occurs across all platforms
Keychain Issues : Frequently accompanied by macOS keychain access failures
Token Limits : Related to MaxFileReadTokenExceededError (41,425 tokens vs 25,000 limit)
Timing Sensitivity : Often occurs when messages are sent at critical moments during tool execution
Message Ordering : Issue stems from non-standard ordering of tool_use and tool_result blocks in API messages
Workarounds
For Users:
Session Recovery : Edit ~/.claude/projects/[PROJECT]/[LATEST-SESSION-STORE].json and remove problematic message lines
Export/Restart : Export chat → clear conversation → restart CLI → reload exported file
Use offset/limit parameters for large files
Use GrepTool instead of reading entire files
VPN if ISP blocking suspected
For Developers:
Reference Issues
Most Comprehensive Issues:
Duplicate Issues (46):
Claude Code: Session-Destroying Failures from Compaction Timeouts #2423
Missing Tool Result Block for Tool Use ID #2630 (tool ID: toolu_01AxtNfsQwHEvRUTRnvcyxTn)
Bug Report tool_use ids were found without tool_result blocks immediately after #2697 (tool ID: toolu_01G2Q9aJ8Jgeu5B9pMBxB3Jn)
Feature Request: Checkpoint Rollback Mechanism for Conversation Recovery
This title captures the core feature request of adding a way to roll back to previous conversation states, particularly to help recover from tool use errors or other blocking issues #2704
Issue Title: Git Push Failure: Request URL Exceeds Length Limit
This title:
- Identifies the specific problem (Git push failure)
- Highlights the technical root cause (URL length limit)
- Uses clear, technical language
- Provides immediate context for dev #2712 (tool ID: toolu_01UKxg45kCnpK3zszmhfPmB6)
HTTP 400 Bad Request in Claude Code API Call #3549
Missing Tool Result Block for Tool Use ID toolu_01T4rbEocUEcU3L1i8PmXfFF #3564
Missing Tool Result Block for Tool Use ID toolu_0175bkViAT1GJvptv8DpEgbp #3608
[BUG] ⎿ API Error: 400 invalid_request_error tool_use ids were found without tool_result` #3632
Missing Tool Result Block for Tool Use ID #3636
[BUG] Critical: Tool call pair maintenance. #3637
Missing Tool Result Block for Tool Use ID toolu_015m4ArUNHceJXtPrpCNnK7L #3754 (tool ID: toolu_01T4rbEocUEcU3L1i8PmXfFF)
Invalid Tool Use Request in Anthropic API Call #3860 (tool ID: toolu_0175bkViAT1GJvptv8DpEgbp)
[BUG] API Error: 400 tool_use ids were found without tool_result blocks immediately after: toolu_..... Each tool_use block must have a corresponding tool_result block in the next message. #3886 (tool ID: toolu_01LsN9eeWJqu83ZEn9MMz6kD)
Missing Tool Result Block for Tool Use ID toolu_01BFX9m1YmC5UoetsCDqPfQu #3902 (feedback ID: 9d56e0c7-a321-45b7-a1ac-430f18f51f6e; tool IDs: toolu_015m4ArUNHceJXtPrpCNnK7L, toolu_01NQv98A7JdU62r8UxsPZecG)
Missing Tool Result Block in API Request #3916 (feedback ID: 275e8e43-5c64-4003-97b3-82f72f7e9f76; tool IDs: toolu_01BFX9m1YmC5UoetsCDqPfQu, toolu_013YTebuvpj8eXVbJNPq3BUB)
Missing Tool Result Block for Tool Use ID toolu_01LDzXQkQWhwYy68hj2GGXva #3977 (feedback ID: 5c88895e-4454-444f-9f7b-709497747321; tool ID: toolu_01LDzXQkQWhwYy68hj2GGXva)
Missing Tool Result Block for Tool Use ID toolu_01NX4cDJoa6Pv3PiMxrgrgKH #4454 (feedback ID: 27071de8-b2ef-4271-a795-5513badf7a26)
Missing Tool Result Block for Tool Use ID toolu_01FCHoHXsqvL3aD5eKGMbqhk #4466 (feedback ID: 6ec710d1-c771-450d-ab57-5469a0ed1841; tool ID: toolu_01FCHoHXsqvL3aD5eKGMbqhk)
CLI State Corruption After Unexpected Interruption #4522 (feedback ID: 236ad358-9502-4227-82c8-b655ac6863ef)
Missing Tool Result Block for Tool Use ID toolu_01EPeY4jhznE8ipJCLiFTXiP #4563 (feedback ID: 08fb3c9a-4031-4c13-9316-2c9cced75b7e)
Missing Tool Result Block for Tool Use ID toolu_01FWRC6QMpe6bYVfV92CFSwq #4638 (feedback ID: bf371c61-3e3a-46c5-9a01-4ca383fa56f6)
Bug Report #4664 (feedback ID: f9ed41a6-451c-49dd-8f25-0fdb3bc7a897)
Missing Tool Result Block for Tool Use ID #4798 (feedback ID: 22514987-f0c6-49ec-86d4-8259b159da01)
Missing Tool Result Blocks for Tool Use IDs #4825 (feedback ID: 028bb608-0413-42b9-92cb-4735616132aa; tool IDs: toolu_016V22G6g4bAjj63qYouNsy5, toolu_01FWRC6QMpe6bYVfV92CFSwq, toolu_01EPeY4jhznE8ipJCLiFTXiP)
Missing Tool Result Blocks for File Processing Tool Calls #4842 (tool IDs: toolu_01LRM9xs9ZGG4pcrUhcobks4, toolu_01LviFawtYc6VkX3LXTUQGqm)
Missing Tool Result Block for Tool Use ID toolu_01AbmHJypDhKqBF7NKdRPJ6d #5060 (tool ID: toolu_01AbmHJypDhKqBF7NKdRPJ6d)
Missing Tool Result Block for Tool Use in Anthropic API Request #5246 (tool ID: toolu_0164aoqd28of7CZLGvm6ftFU)
Anthropic API Timeout Causing Unrecoverable State with Orphaned Tool Use Blocks #5317 (tool ID: toolu_01X1RwkGwrnZScGu9jcYSWgE)
Missing Tool Result Block for Tool Use ID #5412 (feedback ID: e0ebdd7d-45c9-440b-b9f5-ddbffd1c02dc, tool ID: toolu_01Kjp7i9iF3xJ3z9aH4pSaRw)
Missing Tool Result Block for Tool Use ID toolu_015UYDCWdHa5hzUsT5ZKYu4X #5421 (feedback ID: b38531f3-761e-4413-a70a-4d99fcb8ef56, tool ID: toolu_015UYDCWdHa5hzUsT5ZKYu4X)
Tool Use Sequence Interrupted: Missing Tool Result Block #5424 (feedback ID: c2aec1a9-6adc-42db-bf98-d193be52208c, tool ID: toolu_015ZXgypVKGqFDCB2TtgNgSA)
PDF Tool Use Failure: Missing Tool Result Blocks #5450 (feedback ID: 4d022565-35cf-49b6-b5b5-18c851762c62, tool IDs: toolu_01FCH49ioQnBrfftPQx5k1ZQ, toolu_01NeL74QdYMQm8DFGz5Pxj3A, toolu_01XirfUjk9RBjbf7UYmQEQPF)
Missing Tool Result Block in Anthropic API Conversation #5457 (feedback ID: 8df7365b-ee0e-43f7-82d4-e5cf57e3b1f0, tool ID: toolu_01LXaVjS1uzmJHt3mAgzCAFB)
Tool Call Failures Preventing Agent Execution #5468 (feedback ID: 81e1d09b-9465-436f-9626-79e5e3d7029d, tool ID: toolu_01K8QZqobexTyG9nJacRS8CB)
Missing Tool Result Block for Tool Use in Sub-Agent Workflow #5470 (tool ID: toolu_01RcEBxtdXQbxB4P61SPVLSx)
Missing Tool Result Block for Tool Use ID toolu_01PV1SAMEMizf5NAi6LXoTfn #5476 (feedback ID: 51414647-3863-4f43-93d4-4fc0289c238c, tool ID: toolu_01PV1SAMEMizf5NAi6LXoTfn)
Missing Tool Result Block for Tool Use ID toolu_01TtqtoE6BkdCjrQPZtqCDbJ #5479 (feedback ID: ecd3ffc7-daad-4d38-b3e6-163d0a58ec6c, tool ID: toolu_01TtqtoE6BkdCjrQPZtqCDbJ)
Missing Tool Result Block for Tool Use in incorrect and unprompted Concurrent Agents Execution #5509 (feedback ID: 6379df44-7b45-4b2c-adc5-9f7265fc1fce, tool ID: toolu_01EqqrC85cWcn92HsggWCakB)
Bug Report tool_use ids were found without tool_result blocks #5594 (tool ID: toolu_01WNUbHpQy2RWWdoBF8JnF3r)
Missing Tool Result Block for Tool Use ID toolu_019aLkVUFjyvChUtaKKnfbm6 #5599 (feedback ID: a8872815-f182-4a9e-8327-baa359a493de, tool ID: toolu_019aLkVUFjyvChUtaKKnfbm6)
API Error 400: tool_use blocks without corresponding tool_result blocks #5662 (tool ID: toolu_01JX7gsswzmXeYhXg6F8wGRy)
[BUG] tool_use ids were found without tool_result blocks immediately after #5705 (tool ID: toolu_019MgEXFFrY5MHhv9PqJDRQe)
Missing Tool Result Block for Tool Use ID toolu_013UyW5GhFet72wyp1nt5NrC #5713 (feedback ID: 2cd49952-e215-4e23-9f7e-ecbbcb0e2d6b, tool ID: toolu_013UyW5GhFet72wyp1nt5NrC)
API Error 400 (invalid_request_error) on follow-up message during parallel sub-agent plan execution #5747 (contains details and comprehensive reproduction steps; tool ID: toolu_01Qu2dmLfdZPZRMYT4ntdMgG)
Tool Use Block Missing Corresponding Tool Result Block API Error: 400 #5765 (feedback ID: 64b3c820-a92f-4f83-bd5e-59a2645e0503, tool ID: toolu_014fEC2oCHupbJiNAK43yLQp)
Tool Use Request Missing Corresponding Tool Result Blocks #5928 (feedback ID: 6808c3d8-7d28-4016-b90e-628b676b4666, tool ID: toolu_01VMttWDJu2L9onCw1ddoLQJ)
Missing Tool Result Block in Anthropic API Request #6348 (feedback ID: bfd09f21-abd5-4541-b003-1becd0001964, tool ID: toolu_01QuCm4cWTJYDtxkqiqheNe3)
Related Issues (9):
Bug Description
The workflow stops for no reason. When I try to write a follow-up prompt, it reveals the "
tool_useids were found withouttool_resultblocks" error message. It prevents me from creating a truly autonomous workflow.Environment Info
Errors
[ { "error": "Error: Request was aborted.\n at new sW (unknown:1:28)\n at new qY (/$bunfs/root/claude:876:1853)\n at new sJ (/$bunfs/root/claude:876:2641)\n at _createMessage (/$bunfs/root/claude:884:7955)\n at processTicksAndRejections (native:7:39)", "timestamp": "2025-08-08T05:16:28.686Z" }, { "error": "Error: Request was aborted.\n at new sW (unknown:1:28)\n at new qY (/$bunfs/root/claude:876:1853)\n at new sJ (/$bunfs/root/claude:876:2641)\n at makeRequest (/$bunfs/root/claude:893:3652)\n at processTicksAndRejections (native:7:39)", "timestamp": "2025-08-08T05:23:21.851Z" }, { "error": "Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)", "timestamp": "2025-08-08T05:24:27.196Z" }, { "error": "Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)", "timestamp": "2025-08-08T05:24:33.294Z" }, { "error": "Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)", "timestamp": "2025-08-08T05:24:38.025Z" }, { "error": "Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)", "timestamp": "2025-08-08T05:24:42.410Z" }, { "error": "Error: Error POSTing to endpoint (HTTP 404): Session not found\n at send (/$bunfs/root/claude:903:25507)\n at processTicksAndRejections (native:7:39)", "timestamp": "2025-08-08T05:25:21.031Z" }, { "error": "Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.28: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_018Ynj1mexLmRjfnRN5A3LHY. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n at new sW (unknown:1:28)\n at new qY (/$bunfs/root/claude:876:1853)\n at new ZW0 (unknown:1:28)\n at generate (/$bunfs/root/claude:876:2310)\n at makeRequest (/$bunfs/root/claude:893:5330)\n at processTicksAndRejections (native:7:39)", "timestamp": "2025-08-08T05:31:57.165Z" } ]Analysis
Environment Coverage
Platform/Terminal/Version combinations affected:
(v1.0.35-61), IntelliJ (v1.0.62), Warp (v1.0.53-55), ghostty (v1.0.53)
(v1.0.64)
Trigger Scenarios
When the error occurs:
Key Insights
tool_result block
Workarounds
For Users:
~/.claude/projects/[PROJECT]/[LATEST-SESSION-STORE].jsonand remove problematic message linesFor Developers:
tool_useblock is i #473)Reference Issues
Most Comprehensive Issues:
tool_useblock is i #473 (oldest/most comprehensive with detailed workarounds and community discussion)Duplicate Issues (46):
tool_useids were found withouttool_resultblocks immediately after #2697 (tool ID: toolu_01G2Q9aJ8Jgeu5B9pMBxB3Jn)ids were found withouttool_result` #3632tool_useids were found withouttool_resultblocks immediately after: toolu_..... Eachtool_useblock must have a correspondingtool_resultblock in the next message. #3886 (tool ID: toolu_01LsN9eeWJqu83ZEn9MMz6kD)tool_useids were found withouttool_resultblocks #5594 (tool ID: toolu_01WNUbHpQy2RWWdoBF8JnF3r)invalid_request_error) on follow-up message during parallel sub-agent plan execution #5747 (contains details and comprehensive reproduction steps; tool ID: toolu_01Qu2dmLfdZPZRMYT4ntdMgG)Related Issues (9):