[Bug] Anthropic API Error: Missing Tool Result Block
Resolved 💬 3 comments Opened Sep 19, 2025 by blueman82 Closed Sep 25, 2025
Bug Description
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.132: tool_use ids were found without tool_result blocks immediately after:
toolu_015tDcUPgpRyS91d6piGdRC6, toolu_01PiUfRw5VnwhLLLWRnLjheo. Each tool_use block must have a corresponding tool_result block in the next
message."},"request_id":"req_011CTHvWy6hgKoBX73gSDLDW"}
guys when are you going to fix this? It keeps ruining my workflow!
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 1.0.119
- Feedback ID: d684ef2a-b911-4d71-aa84-168c1a005382
Errors
[{"error":"Error: Agent file /Users/harrison/.claude/agents/flag-review-handler-refactor.md has invalid model 'claude-sonnet-4-20250514'. Valid options: sonnet, opus, haiku, sonnet[1m], opusplan, inherit\n at CB5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2371:192)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7749\n at Array.map (<anonymous>)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7679\n at async Promise.all (index 1)\n at async W_0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3704:1318)\n at async W_0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n at async rr5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3735:1293)\n at async nr5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3694:1151)","timestamp":"2025-09-19T12:08:46.013Z"},{"error":"Error: Agent file /Users/harrison/.claude/agents/TODO.md is missing required 'name' in frontmatter\n at CB5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:9300)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7749\n at Array.map (<anonymous>)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7679\n at async Promise.all (index 1)\n at async W_0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3704:1318)\n at async W_0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n at async rr5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3735:1293)\n at async nr5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3694:1151)","timestamp":"2025-09-19T12:08:46.017Z"},{"error":"Error: Missing required \"name\" field in frontmatter\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7863\n at Array.map (<anonymous>)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7679\n at async Promise.all (index 1)\n at async W_0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3704:1318)\n at async W_0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n at async rr5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3735:1293)\n at async nr5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3694:1151)","timestamp":"2025-09-19T12:08:46.017Z"},{"error":"Error: Agent file /Users/harrison/.claude/agents/test-monitor-agent.md is missing required 'name' in frontmatter\n at CB5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:9300)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7749\n at Array.map (<anonymous>)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7679\n at async Promise.all (index 1)\n at async W_0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3704:1318)\n at async W_0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n at async rr5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3735:1293)\n at async nr5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3694:1151)","timestamp":"2025-09-19T12:08:46.018Z"},{"error":"Error: Missing required \"name\" field in frontmatter\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7863\n at Array.map (<anonymous>)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2370:7679\n at async Promise.all (index 1)\n at async W_0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3704:1318)\n at async W_0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n at async rr5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3735:1293)\n at async nr5 (file:///opt/homebrew/lib/node_module
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗