[Bug] Anthropic API Error: Missing Tool Result Block
Resolved 💬 3 comments Opened Sep 11, 2025 by blueman82 Closed Sep 15, 2025
Bug Description
Too often I'm seeing this issue after hooks are executed. The only workaround is to use the Esc key to go back a few messages and then retry. Please can you provide insight as to why this is happening so often?
Thanks
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.20: tool_use ids were found without tool_result blocks immediately after: toolu_013VyzKJxFZ1JvDBXLZjeEyu. Each tool_use block must have a corresponding
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 1.0.110
- Feedback ID:
Errors
[{"error":"Error: Agent file /Users/harrison/.claude/agents/CHANGELOG.md is missing required 'name' in frontmatter\n at QN5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2411:9275)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2411:7749\n at Array.map (<anonymous>)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2411:7679\n at async Promise.all (index 2)\n at async ky0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3671:1355)\n at async ky0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n at async pm5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3701:1293)\n at async dm5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3661:1151)","timestamp":"2025-09-11T08:42:01.772Z"},{"error":"Error: Agent file /Users/harrison/.claude/agents/TODO.md is missing required 'name' in frontmatter\n at QN5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2411:9275)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2411:7749\n at Array.map (<anonymous>)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2411:7679\n at async Promise.all (index 2)\n at async ky0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3671:1355)\n at async ky0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n at async pm5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3701:1293)\n at async dm5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3661:1151)","timestamp":"2025-09-11T08:42:01.778Z"},{"error":"Error: Agent file /Users/harrison/.claude/agents/README.md is missing required 'name' in frontmatter\n at QN5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2411:9275)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2411:7749\n at Array.map (<anonymous>)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2411:7679\n at async Promise.all (index 2)\n at async ky0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3671:1355)\n at async ky0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n at async pm5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3701:1293)\n at async dm5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3661:1151)","timestamp":"2025-09-11T08:42:01.778Z"},{"error":"MaxFileReadTokenExceededError: File content (48087 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n at rAB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1770:432)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1765:994)\n at async Xf5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3568:11444)\n at async UaB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3568:7657)","timestamp":"2025-09-11T09:23:37.516Z"},{"error":"MaxFileReadTokenExceededError: File content (48544 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n at rAB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1770:432)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1765:994)\n at async cM (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1770:2956)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1784:1010","timestamp":"2025-09-11T09:35:22.809Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at Module.readFileSync (nod
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗