When an operation fails with on_error: "abort" (the default), the tool stops and the model is handed an error result. The model then writes what the agent says next, so what the caller hears is decided by the agent’s prompt. This page covers what the model is told, every way an operation fails, and where to find out what happened. For on_error itself, see the operation tree.

What the model is told

A model with no instruction for a failure improvises, and “you’re all set for Thursday” is a plausible improvisation. Write the failure case into the prompt for every tool that matters, saying what the agent must not claim and where it can go instead:
A tool that ends the call or hands off tells the model nothing, failed or not.
A failure handled by on_error: "continue" leaves no record on a live call: no tool.failed webhook and no failed tool card, because the tool as a whole succeeded. Only a test run shows it. Use continue only on operations you do not need to hear about.

Operation errors

Background tool failures

A long_running_task tool that has already handed the turn back still reports its failure: the error becomes the tool’s result, the agent tells the caller, tool.failed fires, and the tool card on the call turns red. A failure inside the first second is reported in the same turn, like any tool. A background tool is cancelled when the call ends or the agent hands off, leaving its side effects half applied, with no warning. Work that must complete belongs behind a webhook and your own queue.

Where to look

1

The call's transcript

Each tool call shows the arguments the model chose and what came back. A failed call is marked failed with its error, “The model was told” shows the exact result the model got, and a badge flags required arguments the model sent empty — fix that in the tool’s description, not the tree. See calls.
2

The call's events

tool.started and tool.ended carry timing and outcome; on a background tool tool.ended has background: true and tool.reply says whether the agent voiced the result. tool.step_limit_reached means the agent wanted more tool calls in one turn than allowed.
3

A test run

Reproduce the failure with POST /v1/tools/{tool_id}/run: every step’s resolved request, response, published values and error_type. See testing and publishing.
4

Webhooks

tool.invoked carries the tool name and arguments; tool.failed carries the error, for an aborted tree or arguments that did not match the schema. See webhooks.
console output from a code operation is not visible on a live call except as the ten lines appended to a failure. Debug scripts in a test run.

Symptom to cause

Next

Debugging agents

The wider playbook for odd, slow or silent agents.

Testing and publishing

Reproduce a failure against the draft.