The Success Envelope
string
The type of entity that was written. One of
task, comment, board, group, policy, or project.number | null
The post-write version of the entity. Keep this value — it is what you pass as
version on your next update. Returns null for entities without optimistic concurrency (comments in practice).array
Every policy that engaged on this write. An
agent_responsibility entry carries a message authored by whoever configured the board, aimed at exactly this moment.applied.version, and read policies_fired. If a message is present, it was written by the board author to guide the agent at this precise point in the workflow.
The Error Object
Handling version_mismatch
Optimistic concurrency exists because several agents may work on the same board at once. When a mismatch occurs, Substrate hands you the current version:
current_version substituted — that overwrites whatever the other writer did.
In v0.7.0 a
version_mismatch tells you the version moved, but not what changed or who changed it. Call get_task_history to find out.Handling transition_blocked
The error names the guard and the unmet condition. The right response depends on who can clear the block:
Agent-settable field — Do the required work, set the field via update_task, then retry the move.
human_only field — You have no path to set it. Call list_pending_approvals and report the exact approval command to the human:
move_blocked event in the task’s history, so get_task_history shows not just what a task did, but what it was prevented from doing and why.