OpenAI Codex
Get a push when a Codex CLI turn completes.
Before you start
- Shared
trigv-notify.shscript TRIGV_API_KEYexported in your environment- Codex CLI with hooks support
Step 1 — Enable hooks
Edit ~/.codex/config.toml and add:
Code
[features]
hooks = true Step 2 — Add a Stop hook
Append to the same file:
Code
[[hooks.Stop]]
[[hooks.Stop.hooks]]
type = "command"
command = "bash -c 'TRIGV_LEVEL=success ~/.local/bin/trigv-notify.sh \"Codex: turn complete\" \"Open terminal to review\" >/dev/null 2>&1 || true'"
statusMessage = "Notifying Trigv" Step 3 — Trust and test
- In Codex CLI, run
/hooksto review new hook definitions. - Approve/trust the hook when prompted.
- Run a Codex task and wait for completion — check your phone.
Troubleshooting
- Test
trigv-notify.shmanually first. - Hooks must not print to stdout — the command above redirects output.
- See Codex hooks docs.