# What does "tool_use ids were found without tool_result blocks immediately after" mean?

The message history you sent to the Claude API contains an assistant turn with a `tool_use` block and no matching `tool_result` in the user message right after it. [The API requires](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls) that no message sits between the call and its result, and that the `tool_result` blocks come first in that user message, with any text after them.

The docs name two causes: code inserts a message between the call and its results, or puts text before the `tool_result` blocks. Also check your own code for an interrupted run that never stored the result, history trimming that drops the results message, or parallel tool calls whose results end up in separate user messages.

The request fails the same way on every retry, so a retry loop only repeats it. Fix the history. Return a result for every id, with `is_error` set to `true` for a tool that failed, and trim history in whole call-and-result pairs. For what to put in that error result, see [how an agent should handle errors from an MCP server](/answers/mcp-tool-reliability/how-should-an-agent-handle-errors-from-an-mcp-server).

The error doesn't say which step dropped the result. The trace of that turn does.

---

Published: 2026-11-18

Sources:
- Claude API docs: Handle tool calls: https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls (fetched 2026-11-18)

Source: https://tessary.ai/answers/agent-error-messages/what-does-tool-use-ids-were-found-without-tool-result-blocks-mean
More on Agent error messages: https://tessary.ai/answers/agent-error-messages
From Tessary, agent reliability for AI agents in production: https://tessary.ai
