Skip to content

docs(codex): document hook-trust gate + how to approve - #74

Merged
AkashGoenka merged 1 commit into
mainfrom
docs/codex-hook-trust
Jul 13, 2026
Merged

AkashGoenka merged 1 commit into
mainfrom
docs/codex-hook-trust

Conversation

@AkashGoenka

Copy link
Copy Markdown
Owner

Why

Codex (0.144.x) gates non-managed hooks behind a per-hook trust review. Until approved, hooks are skipped silently — no error, no log. So after coldstart init on a Codex repo, the notebook/navigation hooks appear wired but never fire, with nothing to explain why. This cost a full debugging session to diagnose. init cannot pre-trust them — there is no supported non-interactive path (openai/codex#21615).

Verified end-to-end on Codex 0.144.0-alpha.4: once trusted via the terminal codex startup prompt ("Hooks need review → Trust all and continue"), recall (UserPromptSubmit) and capture (Stop, flushed at session exit) both fire and a note was written. The Desktop GUI never surfaced the trust prompt in this build; the terminal is the reliable surface.

What

Documentation/UX only — no behavior change to the indexer:

  • src/init.ts — setupCodex prints a post-init note when hooks are wired: how to approve (the "Hooks need review" prompt / launch codex from a terminal if the app doesn't surface it) or --dangerously-bypass-hook-trust for codex exec automation.
  • site/docs.html — a "Codex hook trust" paragraph in the setup section covering the same, plus that project trust (trust_level) is a separate gate from hook trust, and the #21615 limitation.

Surface-neutral wording (doesn't assume terminal CLI vs Desktop).

Test

  • npm run build passes.
  • Ran coldstart init --client codex in a scratch repo; note renders correctly.

🤖 Generated with Claude Code

Codex gates non-managed hooks behind a per-hook trust review; until
approved they are skipped silently (no error), so a freshly `init`-ed
repo's notebook/navigation hooks never fire. `init` cannot pre-trust
them (no supported non-interactive path — openai/codex#21615).

Add a post-init note in setupCodex and a docs.html paragraph explaining:
approve via the "Hooks need review → Trust all and continue" prompt
(launch `codex` from a terminal if the GUI app doesn't surface it), or
pass `--dangerously-bypass-hook-trust` for `codex exec` automation.
Also clarifies project trust (trust_level) is a separate gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@AkashGoenka
AkashGoenka merged commit c84469d into main Jul 13, 2026
2 checks passed
@AkashGoenka
AkashGoenka deleted the docs/codex-hook-trust branch July 13, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant