# Hooks
URL: /documentation/reference/hooks



{/* GENERATED FILE — do not edit. Source: plugins/strata19/hooks/hooks.json. Regenerate: pnpm exec tsx scripts/docs/site/generate-hooks-reference.ts */}

Strata19 installs two hooks. Both are local only: they make no network calls and
no model calls.

| Event          | Script             | What it does                                                                                                                                                                         |
| -------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Stop`         | `done-gate.mjs`    | Runs the same deterministic detectors `strata19.verify_implementation` uses, against the files touched this session. A real finding blocks the stop with a deterministic fix prompt. |
| `SessionStart` | `session-bind.mjs` | Binds the conversation to the host session id the host already carries, so focus and work-claims stay per-conversation instead of colliding across parallel sessions.                |

## Turning the done-gate down [#turning-the-done-gate-down]

`STRATA19_GATE_MODE` controls what the Stop hook does with a finding.

| Mode      | Behaviour                                                             |
| --------- | --------------------------------------------------------------------- |
| `ask`     | The default. Presents the findings and asks before changing anything. |
| `enforce` | Applies the fix directly.                                             |
| `off`     | Disabled.                                                             |

## On Codex, both hooks start inert [#on-codex-both-hooks-start-inert]

Plugin hooks are non-managed on Codex. The user must run `/hooks` once to review
and trust these two hook definitions by content hash before either one runs.
Until that happens session binding degrades to worktree plus process, which is
weaker than the host session id and can collide across parallel sessions.

## Related [#related]

* [Configuration](/documentation/reference/configuration) — `STRATA19_GATE_MODE` and the other settings
* [Detector catalog](/documentation/reference/detectors) — what the Stop hook checks for
* [Troubleshooting](/documentation/reference/troubleshooting) — when a hook does not appear to run
