troubleshooting-tool-use changedagents-and-tools/tool-use/troubleshooting-tool-use
Nearest release: v2.1.328, published 7 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+20added
Lines−7removed
From line
4
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits10to this page, all time
### A server tool call has no result block
The whole hunk
from line 4, old and new numbered
/
from line 4
44description: Fix the most common tool-use errors with symptom-to-fix diagnostic tables.
55---
66
7Symptom-to-fix tables for the most common tool-use errors. Each fix cross-references the page that owns the feature.
7Find the symptom or error you see, and then apply the fix listed for it.
88
99## Claude calls the wrong tool
1010
from line 37
3737
3838## Errors at request time
3939
40| Error | Cause | Fix |
41| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
42| `tool_use ids were found without tool_result blocks immediately after` | Missing `tool_result` for some `tool_use` IDs, or `tool_result` is not the first content block in the user message | Return one `tool_result` for every `tool_use` block in the assistant response. Put `tool_result` blocks before any text. See [Handle tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls) and [Parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use). |
43| `was found without a corresponding <name>_tool_result block` | The previous assistant turn has a `server_tool_use` block with no result block (most often, Claude called it alongside a client tool), and either your next user message ended that turn (for example, with text after the `tool_result` blocks) or the resume request no longer defines that server tool (the message then ends with `but no <name> tool was provided`) | Send a user message containing only the `tool_result` blocks for the client `tool_use` IDs and keep the same `tools` array. See [Stop reasons and fallback](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#tool-use). |
44| `Unsupported regex feature in pattern field: ...` | A `pattern` in a strict tool’s `input_schema` uses a regex feature that strict mode can’t compile, such as a backreference, a lookaround, a word boundary, or a large `{n,m}` range | Simplify the pattern. Anchored patterns with basic quantifiers, character classes, and groups are supported; see [JSON Schema limitations](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#json-schema-limitations). |
45| `All tools have defer_loading: true` | No tools visible to the model | At least one tool must be immediately loaded. The tool search tool itself must never have `defer_loading: true`. |
40The Error column shows part of each message, and `...` stands for text that varies.
41
42| Error | Cause | Fix |
43| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44| `tool_use ids were found without tool_result blocks immediately after` | Missing `tool_result` for some `tool_use` IDs, or `tool_result` is not the first content block in the user message | Return one `tool_result` for every `tool_use` block in the assistant response. Put `tool_result` blocks before any text. See [Handle tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls) and [Parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use). |
45| `was found without a corresponding ... block` | The follow-up request keeps a waiting server tool from running | See [A server tool call has no result block](https://platform.claude.com/docs/en/agents-and-tools/tool-use/troubleshooting-tool-use#a-server-tool-call-has-no-result-block). |
46| `Unsupported regex feature in pattern field: ...` | A strict tool’s `pattern` uses a regex feature that strict mode can’t compile, such as a backreference, a word boundary, or a large `{n,m}` range | Simplify the pattern. See [JSON Schema limitations](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#json-schema-limitations). |
47| `Invalid regex in pattern field: ...` | A strict tool’s `pattern` has a lookahead, a lookbehind, or a syntax error | Remove any lookahead or lookbehind and fix any syntax errors. See [JSON Schema limitations](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#json-schema-limitations). |
48| `All tools have defer_loading: true` | No tools visible to the model | At least one tool must be immediately loaded. The tool search tool itself must never have `defer_loading: true`. |
49
50### A server tool call has no result block
51
52A [server tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools) is still waiting to run when its `server_tool_use` or `mcp_tool_use` block has no result block. The error `was found without a corresponding ... block` means the follow-up request keeps the waiting tool from running. The error message and the previous `stop_reason` show why. Use the first case that matches:
53
54* **The message ends with ``but no `<name>` tool was provided`` or `is not available after the last message`:** Here, `<name>` is the tool’s name, such as `web_search`. The request no longer defines the tool. Send the same `tools` array as before, and the same `mcp_servers` for an MCP tool.
55* **The previous `stop_reason` was `tool_use`:** Your user message had content after the `tool_result` blocks. Send only the `tool_result` blocks, one for each client `tool_use` block.
56* **The previous `stop_reason` was `pause_turn`:** You added a user message. Remove it so that the request ends with the paused response as an `assistant` message.
57
58For the full steps, see [When a server tool is still waiting](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#when-a-server-tool-is-still-waiting) and the [`pause_turn` stop reason](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#pause-turn).
4659
4760## Error: thinking blocks cannot be modified
4861
No line in this hunk matches that.