Update work graph
update_work_graphAdd or update work units, cancel or reopen them, and record project context. Enforces valid, non-cyclic dependencies and requires rationale for new units after the initial plan.
Instructions
Add or update units (upsert by id), cancel or reopen units, and record project context (summary, key files, commands). The first call submits the initial plan. Rejected as a whole if ids, references or dependencies are invalid or cyclic. Units added after the initial plan need a rationale. Never add work only to use remaining budget.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | Units to add or update (upsert by id). | |
| cancel | No | Remove units from scope. | |
| reopen | No | Return blocked, failed or cancelled units to pending (resets attempts). | |
| sessionId | Yes | Session handle returned by start_session. | |
| projectContext | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| added | Yes | ||
| state | Yes | ||
| updated | Yes | ||
| guidance | Yes | ||
| reopened | Yes | ||
| cancelled | Yes | ||
| sessionId | Yes | ||
| readyUnitIds | Yes | ||
| graphRevision | Yes |