Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.narrative.io/llms.txt

Use this file to discover all available pages before exploring further.

Surface: GET /agents/runs/{id}, error.type = "AgentLoopFinalizeInvariantViolated"

When this error occurs

FinalizeAgentRunActivity enforces several invariants that should be impossible to violate given correct upstream code (e.g. attempting to finalize a run with a non-terminal status, mismatch between the requested terminal status and the populated TerminalFields). This error means one of those invariants tripped. It is always a server-side bug, not a caller-recoverable condition.

How to fix

Report the log_id and the run id to support. The workflow logs include the activity input that triggered the assertion. Re-running the same conversation with a fresh run id will typically work — the bug is deterministic on the inputs that triggered it.