HTTP status: 400Documentation Index
Fetch the complete documentation index at: https://docs.narrative.io/llms.txt
Use this file to discover all available pages before exploring further.
Error message
missing/unexpected clauses may be omitted if that side is empty.)
When this error occurs
When resuming arequires_action run, every entry in
pending_tool_calls from the prior run must have a matching entry in the new run’s
payload.outputs, and there must be no extra entries beyond those. The API enforces a strict
1:1 match.
The two cases:
- Missing — a pending client tool call has no corresponding output. The model can’t continue without all results.
- Unexpected — an output references a
tool_use_idthat is a client call but isn’t in the current pending set. Usually means resuming with a payload that targets an olderrequires_actionstate.
How to fix
GET /agents/runs/{prior_run_id}and copy the entirepending_tool_callsarray verbatim.- Produce exactly one
outputs[]entry perpending_tool_calls[]entry — sametool_use_id, same count. - Refetch
expected_versionbefore posting to avoidversion_conflict.
is_error: true and a short message — the model can then choose how to proceed.
