Skip to content

writ sessions

Use writ sessions before you attach a writ to an existing agent session.

Terminal window
writ sessions --agent <agent>

The agent can be claude, codex, cursor, or opencode. The agent must have a healthy Writ connection.

Make one complete tool call in the intended session. Then run the command from the project. Writ lists sessions that used the current connection during the last 24 hours. It prints each provider session ID and the last observed time.

If the list is empty, make a tool call in the intended session and try again.

Writ can also warn about a corrupt fail-closed marker. The warning gives the exact marker path. Stop that provider session before recovery. If the activation record still exists, run normal forced cancellation from the attached project:

Terminal window
writ finish --agent <agent> --cancel --force

Use marker-only recovery when the invalid marker is orphaned and no active activation remains in its associated project record:

Terminal window
writ finish --agent <agent> --cancel --force --marker <exact-path>

The marker-only command removes only the invalid marker. It refuses recovery while the associated record has an active writ. Read the writ finish recovery rules before you use it.

Copy the intended ID into --session:

Terminal window
writ plan task.yaml --agent claude
writ sessions --agent claude
writ start task.yaml --agent claude --session <session-id>

Writ applies the attached writ only to this session. Other sessions keep their normal connection policy. Writ refuses a selected session while an allowed tool call is waiting for its result.