set_state
Patches named Linear ticket description sections to reflect current state, reconciles comments, and gates Done when checks with evidence.
Instructions
Change what the ticket says is true by patching named description sections (Observed, Cause, Fix, Done when). The description is current state; comments are the log. Pass reconciled_through (a comment id) to record that the description now reflects the thread through that comment, with accounts_for saying how each skipped comment was handled. Tick a Done when item only once its check has run, and cite what showed it after the item text: "- [x] · ", where evidence is a commit SHA, a PR (#123), a file:line, a link, a CI run, "Observed 2" for a line under Observed, or command → result. A merge, a deploy, or being told something shipped is not the check; if nobody has run it, leave it open and say so. Removing or rewording an unticked Done when item needs descope_reason and descope_risk, and your user is asked to approve it from those two alone, so write them for someone without the ticket open. In Claude Code the call may come back asking you to put a question to your user with AskUserQuestion first; do exactly that, then retry with the sign_off token it gives.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | Yes | description_sha of the description this patch was written against: from get_issue, or from your last write to this ticket. The write is refused, with what changed, if the description has moved since. | |
| issue | Yes | Issue identifier (e.g. ENG-123) or UUID | |
| patch | No | Description sections to change. Impact is the one plain-language line at the top saying who notices this work (mode replace). Observed lines must be "YYYY-MM-DD · <source: command, SHA or query> · <what it showed>". Done when lines must be checklist items ("- [ ] <check that proves it>"). Open questions changes only through comment kinds ask and answer. | |
| sign_off | No | The token from a set_state refusal that asked you to put a sign-off question to your user. Retry the same call with it after they answer. | |
| accounts_for | No | With reconciled_through: for each comment the marker moves past, whether it was folded into this call's patch or changes nothing (with a reason). Typed comments that already changed the description count on their own. {comment: "*"} covers every comment not named. | |
| descope_risk | No | Required with descope_reason: what stops being checked if your user approves, and what could get through because of it. At most 100 characters; they see it on one line as "If you accept". | |
| descope_reason | No | Required when the patch removes or rewords an unticked Done when item: why that check no longer applies. At most 100 characters; your user sees it on one line as "Why the agent wants it", and it is recorded as a comment. Keep the detail in Observed. | |
| reconciled_through | No | Id of the newest comment the description now reflects |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||