amend_plan
Change a submitted plan while holding its live thread claim: add, cancel, or rewire child tasks atomically; cancellations require a reason, and claimed or finished children are refused.
Instructions
Change a plan you already submitted, holding the plan thread's live claim (pass its lease_id). cancel names children to cancel; add gives new children (the shape submit_plan takes, depends_on may name any child of the plan); rewire sets a child's depends_on afresh. Cancel and add the same key to replace a child: its dependents wait for the new one. A cancelled child's dependents stop waiting for it. Only children that are open and unclaimed can be cancelled or rewired: a claimed or finished one is refused, as is a fourth amendment of the same plan (error code -32010). reason is kept on each cancelled child. Everything happens in one transaction, or nothing does. Added children are held for review when the plan is held or one of them needs a threat model.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"thread_id": "<thread_id>",
"lease_id": "<lease_id>"
},
"name": "amend_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | ||
| cancel | No | keys of unclaimed children to cancel | |
| reason | No | why the plan changed; kept on each cancelled child | |
| rewire | No | ||
| lease_id | Yes | the fencing token from your claim on the plan thread | |
| thread_id | Yes | the plan thread you hold the claim on |