[Bug] Anthropic API Error: Missing Tool Result Blocks

Resolved 💬 2 comments Opened Sep 16, 2025 by blueman82 Closed Sep 16, 2025

Bug Description
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.185: tool_use ids
were found without tool_result blocks immediately after: toolu_01BnqYZKGH1fU1d38UvmrRTK,
toolu_01EU8akVj6jz7wZtUuQQjrPL, toolu_01EiuBzsoQqkwSGqufeCFh5p. Each tool_use block must have a corresponding
tool_result block in the next message."},"request_id":"req_011CTButQUsRJL7DajLGtZJp"}

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 1.0.115
  • Feedback ID: 84fb7a8a-1322-4d19-9a01-26ba30b15cc0

Errors

[{"error":"Error: Agent file /Users/harrison/.claude/agents/TODO.md is missing required 'name' in frontmatter\n    at l15 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:9300)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7749\n    at Array.map (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7679\n    at async Promise.all (index 1)\n    at async Lk0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3693:1318)\n    at async Lk0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n    at async zn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3723:1293)\n    at async Fn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3683:1151)","timestamp":"2025-09-16T09:57:35.299Z"},{"error":"Error: Missing required \"name\" field in frontmatter\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7863\n    at Array.map (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7679\n    at async Promise.all (index 1)\n    at async Lk0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3693:1318)\n    at async Lk0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n    at async zn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3723:1293)\n    at async Fn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3683:1151)","timestamp":"2025-09-16T09:57:35.303Z"},{"error":"Error: Agent file /Users/harrison/.claude/agents/test-monitor-agent.md is missing required 'name' in frontmatter\n    at l15 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:9300)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7749\n    at Array.map (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7679\n    at async Promise.all (index 1)\n    at async Lk0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3693:1318)\n    at async Lk0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n    at async zn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3723:1293)\n    at async Fn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3683:1151)","timestamp":"2025-09-16T09:57:35.303Z"},{"error":"Error: Missing required \"name\" field in frontmatter\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7863\n    at Array.map (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7679\n    at async Promise.all (index 1)\n    at async Lk0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3693:1318)\n    at async Lk0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n    at async zn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3723:1293)\n    at async Fn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3683:1151)","timestamp":"2025-09-16T09:57:35.304Z"},{"error":"Error: Agent file /Users/harrison/.claude/agents/CHANGELOG.md is missing required 'name' in frontmatter\n    at l15 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:9300)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7749\n    at Array.map (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2367:7679\n    at async Promise.all (index 1)\n    at async Lk0.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3693:1318)\n    at async Lk0.parseAsync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:704:4184)\n    at async zn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3723:1293)\n    at async Fn5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3683:1151)","timestamp":"2025-09-16T09:57:35.304Z"},{"error":"Error: Missing requir

Note: Error logs were truncated.

View original on GitHub ↗

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