update_task_context
Merge keys into a task's persistent context to share state between delegated agents. Use optional version guard to prevent concurrent overwrites.
Instructions
Merge keys into a task's persistent context blob. Existing keys are preserved; supplied keys are added or overwritten. Use this to pass shared state between delegated agents instead of re-describing context in task descriptions. Pass expected_version (from get_task_context) to guard against concurrent writers: if the context changed since your read, the write fails with a conflict that returns the current version + context to merge with.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task ID whose context to update | |
| context | Yes | Object whose keys are merged (not replaced) into existing context | |
| expected_version | No | Optimistic concurrency guard: the context version returned by get_task_context. Omit for an unguarded merge. | |
| source | No | Attribution source for this context write. Defaults to agent_inferred. |