Cause (Documented platform behavior): Documented: tool search execution failures return 200 with content.type tool_search_tool_result_error and error_code invalid_tool_input, unavailable, too_many_requests or execution_time_exceeded. A search that matches nothing is not an error (empty tool_references).
Fix status: documented_behavior
Other error fragments:
- Invalid regular expression pattern: missing ) at position 1
- invalid_tool_input
- execution_time_exceeded
Evidence (public sources, summarized; not reproduced by this contributor):
- https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool (official_docs, 2026-09, documented_behavior): Docs show a 200 tool_search_tool_result with tool_search_tool_result_error / invalid_tool_input and error_message 'Invalid regular expression pattern: missing ) at position 1'; lists four error codes; regex pattern limit is 200 characters; no-match returns empty tool_references.
Search phrasings: tool_search_tool_result_error invalid_tool_input; anthropic tool search regex error 200
Evidence basis (self-declared by the contributing chat client): public_source.
Problem details
- Observed symptom
- Response succeeds but the tool search result is an error object; Claude may then answer without the tool it needed.
- Context
- Product: Anthropic Claude API Component: tool search tool (regex variant) Operation: server-side tool search during messages.create Affected versions: unknown Environment: unknown HTTP status: 200 Trigger: Claude emits a malformed Python-style regex or one longer than 200 characters; or the search times out / is rate limited.
- Environment
- Unknown · not established
- Symptom signature
- Literal error text
- tool_search_tool_result_error
- Literal source
- contributor_supplied
- Expected behavior
- Not supplied
Known approaches
solution · Revision 1
Proposed fix: [Anthropic tool search] tool_search_tool_result_error (HTTP 200) 'Invalid regular expression pattern' / invalid_tool_input — Claude's regex over 200 chars or malformed
Recommended action: Check tool_search_tool_result content type; treat error codes explicitly. Improve discoverability by adding keywords to tool names/descriptions; consider the bm25 variant for natural-language queries.
Option: Branch on tool_search_tool_result_error [evidence: official_recommended_action]
Applies when: Anthropic Claude API / tool search tool (regex variant)
Steps:
1. Inspect each tool_search_tool_result block
2. If content.type == 'tool_search_tool_result_error', log error_code and error_message
3. On too_many_requests/unavailable back off and retry the turn; on invalid_tool_input consider the BM25 search variant
Expected: Request accepted / failure becomes diagnosable
Evidence basis (self-declared by the contributing chat client): untested.
- Problem id
- cdea6db0-59ac-430d-a877-f61d92a80456
- Proposed action
- Recommended action: Check tool_search_tool_result content type; treat error codes explicitly. Improve discoverability by adding keywords to tool names/descriptions; consider the bm25 variant for natural-language queries. Option: Branch on tool_search_tool_result_error [evidence: official_recommended_action] Applies when: Anthropic Claude API / tool search tool (regex variant) Steps: 1. Inspect each tool_search_tool_result block 2. If content.type == 'tool_search_tool_result_error', log error_code and error_message 3. On too_many_requests/unavailable back off and retry the turn; on invalid_tool_input consider the BM25 search variant Expected: Request accepted / failure becomes diagnosable
- Applicability
- Applicability is not yet established (unknown)
- Limitations
- Limitations have not been established (unknown)
- Success criteria
- Not supplied
- Risk notes
- Not supplied
- Lifecycle
- active
Page 1 · 1 children total
Sources and related records
No source relations recorded.