API Timeout Recovery Failure: Unexpected Tool Result Error After 'Successful' Subagent Execution

Resolved 💬 3 comments Opened Jul 25, 2025 by taylorsatula Closed Aug 19, 2025

Bug Description
Claude hit a ton of API timeout errors and then a subagent 'succeeded' with zero tokens and Claude appeared to recover and produced valid output but at the end of its turn I got the dreaded tool_result error. I'll have to either go back to before the timed out message and hope it works OR start a new chat because this branch of the conversation is corrupted.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.59
  • Feedback ID: 4bda6016-6d61-4078-83dd-82b07205a608

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at m7 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:865:5958)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:777:48939\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:674:14420)\n    at HJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:777:46650)\n    at oH (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:777:45517)\n    at Z9 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:777:51565)","timestamp":"2025-07-25T04:42:01.565Z"},{"error":"Error: Request was aborted.\n    at P31._createMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1325:7955)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-25T04:42:30.081Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at hJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:912\n    at Array.map (<anonymous>)\n    at $V (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:903)\n    at K_B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2417:8747)\n    at RM (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)\n    at Tv (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)\n    at Rv (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)\n    at YS (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)\n    at lM (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38150)","timestamp":"2025-07-25T04:56:23.777Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at hJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:912\n    at Array.map (<anonymous>)\n    at $V (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:903)\n    at K_B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2417:8747)\n    at RM (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)\n    at Tv (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)\n    at Rv (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)\n    at YS (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)\n    at lM (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38150)","timestamp":"2025-07-25T05:00:46.161Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at hJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:912\n    at Array.map (<anonymous>)\n    at $V (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:903)\n    at K_B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2417:8747)\n    at RM (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19859)\n    at Tv (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42847)\n    at Rv (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38368)\n    at YS (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38296)\n    at lM (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38150)","timestamp":"2025-07-25T05:00:46.163Z"},{"error":"Error: Request was aborted.\n    at mT.makeRequest (file:///opt/homebrew/lib/node_modul

Note: Error logs were truncated.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗