> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seriora.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Checking code after a write

> Run your project's own check command after every write and feed the diagnostics back.

seri can run your project's own check command after every successful `write_file` and hand the
diagnostics back to the model in the same turn, so a type error it just introduced is visible
while it is still working on that file.

`write_file` is the only trigger. A file changed by `bash` or `powershell` does not start a
check, because the wrapper has no path to know one was touched.

## Turning it on

This is **off until you set a command.** seri does not look inside your repository for one.

`/config` sets it, and two environment variables do the same thing and win over what `/config`
stored.

| Key                   | Meaning                                                              |
| --------------------- | -------------------------------------------------------------------- |
| `SERI_VERIFY_COMMAND` | the command to run. Unset means no checking, and nothing is spawned. |
| `SERI_VERIFY_ENABLED` | set to `false` to suspend checking without losing the command        |

Both take effect on the next run rather than mid-session.

```text theme={null}
/config
```

## What to expect before you turn it on

* **It runs after every successful write,** so the cost is per write rather than per session.
  Time your own check command and multiply by the number of files a task touches. On seri's own
  repository `bun run --cwd apps/cli typecheck` takes a few seconds, and that is added to every
  file the model writes.
* **It runs in the directory you started seri in,** and the command is split on whitespace, so
  quoted arguments and paths containing spaces are not supported.
* **Diagnostics are advisory.** The write is not rolled back. Use `/undo` for that.
* **It reports whatever your command reports,** usually the whole project, including errors that
  were already there before seri touched anything. Diagnostics in the file just written are
  listed first, and at most 20 are sent to the model, with the true total alongside.

<Note>
  A `code` subagent's writes do not go through this check. The child gets its own tool set, built
  without the verification wrapper. Undo still covers it, through the snapshot taken at the
  dispatch. See [Checkpoints and undo](/guides/checkpoints).
</Note>
