[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
Parallel Executions & Exceptions
High-Throughput Action Loops
Claude 3.7 Sonnet and Claude 3.5 Sonnet support Parallel Tool Use, allowing the model to trigger multiple tools (e.g., searching 3 distinct databases) in a single turn. While powerful, this can be complex to handle. If your backend cannot handle concurrency, you should set disable_parallel_tool_use: true to force Claude to iterate through actions one-by-one.
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"]
}
}
]
}SYNAPSE VERIFICATION
QUERY 1 // 2
How do you correctly feed a result from your code back to Claude?
Send an email
Inject a 'tool_result' object into a subsequent 'user' message, mapped via 'tool_use_id'
Add to system prompt
Modify API URL