Skip to content

Avoiding version conflicts

Every list item has a version. Modification tools optionally accept expectedVersion (taken from a previous read). If the version no longer matches, the server responds with a version conflict instead of silently overwriting.

This matters when multiple AIs or clients touch the same item.

Supported tools

  • update_list_item
  • complete_list_item
  • delete_list_item

Example

json
{"name":"update_list_item",
 "arguments":{"itemId":"…","status":"done","expectedVersion":7}}

On conflict:

json
{
  "error": "Version conflict: the item was modified by someone else. Re-read it and retry.",
  "expectedVersion": 7,
  "currentVersion": 9
}

→ Re-read the item (version field), then resend using the current version.

Liza Documentation