Anthropic's tool use documentation advises: "Write instructive error messages. Instead of generic errors like 'failed', include what went wrong and what Claude should try next."
A billing dispute agent uses a lookup_order tool that catches all exceptions and always returns a tool result with is_error: true and the message "Tool execution failed". Monitoring reveals two distinct failure patterns:
The agent repeatedly retries the identical call until it hits the turn limit.
The agent immediately calls escalate_to_human without attempting any alternative tool.
Which change follows the documented recommendation and gives Claude the information it needs to choose the correct recovery action for each type of error?
Community Discussion
No comments yet. Be the first to start the discussion!
Community Discussion