Skip to main content

How it hooks in

Setup writes ~/.codex/hooks.json with entries for UserPromptSubmit, Stop, SessionStart, SessionEnd, PreCompact and PostCompact, each running payback hook codex <event>.

The one-time approval

Codex runs a hook only after you’ve approved it. Open Codex in any project and run /hooks, then approve the payback hooks. Codex stores a hash of each hook’s text and remembers it.
Codex asks again only if a hook’s text changes; it does not change on ordinary updates.
Until the hooks are approved, payback status shows “Codex · approve the hooks once with /hooks”.

What is captured

The same as every agent: see What is recorded.

Turning it off

payback pause stops every agent; payback uninstall removes payback’s entries from hooks.json.