Skip to content

writ finish

Use writ finish from the project that has the attached writ.

Terminal window
writ finish --agent <agent>

The agent can be claude, codex, cursor, or opencode.

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.

Use --cancel when you do not attest satisfaction:

Terminal window
writ finish --agent claude --cancel

This command records an interruption for an active attached run. It can also clear a stale fail-closed marker when the activation history is missing.

An allowed tool call can be waiting for its result. Stop the provider session before you force cancellation. Then run:

Terminal window
writ finish --agent claude --cancel --force

Writ 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:

Terminal window
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.

Writ names each marker with the agent and the SHA-256 digest of the raw provider session ID:

<agent>-<sha256(session-id)>.json

This 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.

Terminal window
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.