HTTP status: 409Documentation 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
conversation version mismatch: expected 2, current 5.
When this error occurs
POST /agents/conversations/{id}/runs was called with an expected_version that no longer
matches the conversation’s current head. This is an optimistic-concurrency
guard: the API rejects the run before starting a workflow that would conflict at finalize time.
It happens when another writer (a previous run, or a concurrent caller) advanced the conversation
between the time you read version and the time you posted the new run.
How to fix
- Re-read the conversation via
GET /agents/conversations/{id}to get the currentversion. - If you were resuming from a
requires_actionrun, also re-read the latest assistant turn viaGET /agents/conversations/{id}/messages?since={your_known_version}to learn whether the pending tool calls have changed. - Retry the run with the fresh version.
Race-free continuation pattern
For tool-output resumes, always refetch the conversation’sversion immediately before posting —
don’t rely on a value cached from earlier in the conversation’s lifecycle.
