Codex Hook Kit
Version 1.1.0 · Released October 18, 2026 · MIT

Put a check between
an instruction and an action.

Nine project-scoped hook concepts, ported from the Claude kit by reusing its policy code. The same project conventions, with Codex inputs, decisions and lifecycle handling.

Desktop coverage: actual worker start/stop, goal-tool hooks and owner-prompt lifecycle ran after a live configuration refresh. Project instructions, review reminders and compatibility-worker reports were also delivered. A native Stop automatically produced the delayed report, which reached model context on the next real owner prompt and was consumed. No automatic idle-chat wake is supplied. See the eleven-item disposition and measured results and live refresh procedure.

Owner-policy framing describes how project defaults should be applied; it does not guarantee universal model obedience or erase earlier injected messages. The earlier 156-test baseline preceded final corrections; later focused checks include a 20-test policy-precedence/delivery pass. See the verification record for separate results.

The original nine hooks

Also available: the opt-in completion gate, which runs an agreed acceptance check, checks declared retained code, and bounds corrections without repeating unchanged tests.

CONTEXT

Inject rules

Supply project defaults at session start and with each prompt. Current or later owner instructions supersede conflicting project defaults; genuine platform constraints remain separate.

BEFORE TOOL USE

Deploy gate

Check the configured commit's receipt before a matched deploy.

BEFORE TOOL USE

Brief guard

Require the right sections and reject forbidden brief text.

BEFORE TOOL USE

Read ledger

Check declared read rows, exact targets and optional content hashes before recognized code writes.

BEFORE TOOL USE

Database guard

Require a fresh approval marker for recognized live SQL writes.

TURN END

No idle

Report configured worker folders or opt-in native lifecycle evidence, with adoption history separated.

TURN END

Double-check

Request one review continuation with the configured checklist.

TURN END

Measurement gate

Check freshness or existing artifact/product bindings without starting a test loop.

BACKGROUND REPORT

Delayed report

Save a bounded worker snapshot after a delay and supply it as context on the next owner prompt. No automatic resumption.

Install once. Opt in per project.

Download and extract the v1.1.0 source ZIP above, then open a terminal in the extracted directory. Use Node 22.13 or newer. Windows with Node 24.15.0 and Codex runtime 0.160.0 is the current verification environment; other platforms are not yet tested. Installation preserves unrelated hooks, pins Node and creates transaction backups. Review and trust definitions in Codex before relying on them.

node install.mjs --dry-run
node install.mjs
node init-project.mjs C:/dev/my-project --example agent-build

Registration: CODEX_HOME/hooks.json. Project policy: .codex/hook-kit.json. No project policy means the kit stays silent. The initializer never overwrites an existing policy without --force.

Know what a gate proves.

A file count does not prove someone understood or reused the code. A fresh receipt does not prove the reported result is true. These are observable workflow checks, with documented gaps—not a substitute for review or an access-control sandbox.