writ finish
Use writ finish from the project that has the attached writ.
writ finish --agent <agent>The agent can be claude, codex, cursor, or opencode.
Attest satisfaction
Section titled “Attest satisfaction”Run finish without --cancel only when you accept that the selected session
satisfied the writ. Writ writes an attestation with a human actor. This entry
records your acceptance. It does not prove an effect that the hook did not
observe.
If the selected session did not use a tool after writ start, finish
cancels the waiting activation. It does not write a satisfaction attestation.
Cancel without an attestation
Section titled “Cancel without an attestation”Use --cancel when you do not attest satisfaction:
writ finish --agent claude --cancelThis command records an interruption for an active attached run. It can also clear a stale fail-closed marker when the activation history is missing.
Recover after a stopped provider session
Section titled “Recover after a stopped provider session”An allowed tool call can be waiting for its result. Stop the provider session before you force cancellation. Then run:
writ finish --agent claude --cancel --forceWrit records a synthetic missing result for each waiting call. It interrupts
the activation and removes its marker. Do not use --force while the provider
session can still return a result.
An unreadable, invalid, or unsupported-version session-keyed marker stays fail-closed. When Writ can correlate that marker with the current project activation, the same forced cancellation ends the activation and removes the marker.
writ sessions can instead report an exact corrupt marker path that it cannot
decode. Stop the named provider session. Run the normal forced cancellation
from the attached project when its activation record still exists.
Use the marker-only form when the invalid marker is orphaned and no active activation remains in its associated project record:
writ finish --agent claude --cancel --force --marker <exact-path>The --marker form does not change an activation record. It only removes the
exact invalid marker under the Writ state directory. Writ refuses a valid
marker, a path outside that directory, or a marker whose project record still
has an active writ.
Session-keyed markers
Section titled “Session-keyed markers”Writ names each marker with the agent and the SHA-256 digest of the raw provider session ID:
<agent>-<sha256(session-id)>.jsonThis name correlates fail-closed state with one exact provider session without putting the raw session ID in the filename. A marker for a different session is not selected for the active session.
Review the result
Section titled “Review the result”writ review <writ-name>For a started run, the record shows the human attestation or cancellation as its terminal entry. A waiting activation has no run record.