# Codex hooks: enforce policy at lifecycle boundaries

Codex hooks run deterministic commands at 11 lifecycle events, with distinct contracts for tool policy, approval decisions, context injection, and completion gates.

- Published: 2026-06-23
- Category: platform-engineering
- Tags: codex, coding-agents, extensibility, hooks, patterns
- HTML: https://harnez.ai/posts/hooks-complete-tutorial/

This Markdown sibling contains the article metadata and canonical link. Use the HTML URL for the complete rendered article.
