Skip to content

writ issue

Use writ issue when you want Writ to run the model loop and managed tools. Use writ start to keep using an existing connected agent.

Terminal window
writ issue <file>

The command validates the file, engages the holder model, and runs the loop. The registrar examines each action against the terms. The command shows the record while the run continues.

If the writ omits iterations, cost, or wall_clock, this managed adapter adds operational limits of 25 iterations, $1.00, and 15 minutes. An omitted bound remains authored-unbounded. The operational limit is not an authored clause.

Flag Purpose
--set <name>=<value> Give a placeholder a value. Use the flag more than one time for more than one placeholder.
--config <path> Use the engagement configuration at this path.

You must configure the engagement first. The registrar cannot engage a model without a holder, a price, and an API key.

Writ reads the API key from the environment variable that key_env names. Set WRIT_HOME to a directory outside the project. The command stops before it opens the managed workspace or record when the Writ home is the project root or is inside it.

writ issue compares a Git tree before and after each managed write, edit, or shell action. This comparison supplies verified worktree effects for edit bounds, path checks, and revert remedies.

The boundary has these rules:

  • It includes tracked files, untracked files, and ignored files.
  • It includes the local .writ directory.
  • It excludes the repository .git metadata directory.
  • It rejects a snapshot that contains a nested Git repository or a gitlink.

The Writ home rule does not exclude another project .writ directory from this comparison.

Do not rely on a worktree bound, invariant, or revert remedy to control a change to .git metadata.

Verification reads ignored files, including ignored secrets. It writes the snapshot objects to a private temporary Git object database. It does not write these verification objects to the repository object database. Writ removes the temporary database after the action. It keeps only the in-memory preimage that a possible revert needs. It releases that preimage after acceptance or revert.

Terminal window
writ issue bug-fixer.yaml \
--set failing_test=tests/test_sync.py::test_retry \
--set failing_test_file=tests/test_sync.py

The command stops with an error when a placeholder has no value. Read more about placeholders.

Do not put secrets in a writ document or a placeholder value.

Cause Exit code
The satisfaction clauses pass. 0
A bound stops the run, or a remedy stops the run. 1
The file is not valid. 2
The configuration is wrong. 3

The command stops with an error in these two cases:

  • The writ contains an mcp grant. An mcp grant works only in MCP proxy mode.
  • The writ contains a reserved field: issued_by, requires, yields, or holder_must. Delegation ships in version 2.

The command also stops when a term needs something that the configuration does not have:

  • A judgment clause needs a judge.
  • A clause or a grant that needs assent needs an assent transport.

Review the run:

Terminal window
writ review bug-fixer

The record shows each action and each check, including the actions that the registrar denied. Read more about the record.