Parallel Executions & Exceptions — Advanced Tool Use
Parallel Executions & Exceptions
High-Throughput Action Loops
Claude Series 5 models (Fable 5.1, Opus 5.5, Sonnet 5.5, and Haiku 5.5) natively support Parallel Tool Use, allowing the model to trigger multiple tools (e.g., searching 3 distinct databases) in a single turn. If your backend cannot handle concurrency, set disable_parallel_tool_use: true inside the tool_choice object (e.g., tool_choice: { type: "auto", disable_parallel_tool_use: true }) to force sequential execution.
Handling Terminal Failures
When a tool call fails in your code (e.g., a database timeout), you must feed that error back to Claude using the is_error: true property in the tool_result object. This prevents Claude from hallucinating fake data and instead triggers a 'recovery' reasoning path where it might try a different tool or notify the user.
Tool Definition Structure
{
"tools": [
{
"name": "lookup_customer",
"description": "Look up customer account details by ID",
"input_schema": {
"type": "object",
"properties": {
"customer_id": { "type": "string", "description": "Unique customer identifier" }
},
"required": ["customer_id"]
}
}
]
}Claude invoked a tool. Complete the cycle by sending a user turn containing the tool_result content block matching tool_use_id.