Context
A newer Codex version now emits this deprecation warning when reading the repo-local Codex config:
[features].codex_hooks is deprecated. Use [features].hooks instead.
Enable it with --enable hooks or [features].hooks in config.toml. See https://developers.openai.com/codex/config-basic#feature-flags for details.
This is a friction-to-gold maintenance item: the warning is small, but it hits every Codex session that has copied the repo template into the ignored local config and makes the harness bootstrap surface look stale.
The Problem
The committed Codex template still advertises the old feature flag:
[features]
codex_hooks = true
Local evidence:
.codex/config.template.toml:86-87 still uses codex_hooks = true.
- The ignored operator-local
.codex/config.toml currently mirrors the same old key.
- The current OpenAI Codex Config Basics docs list
hooks as the supported feature flag and document codex --enable hooks / [features].hooks as the enable path.
Duplicate sweep:
- Knowledge Base ticket sweep for
Codex codex_hooks deprecated features hooks config template ticket found older Codex template setup context (#10485 / #10552) but no matching deprecation ticket.
- Repo content sweep found PR #10728, which introduced
codex_hooks when that was current, but no active issue to migrate the flag.
- Live GitHub issue search for
codex_hooks, features.hooks, and Codex hooks found no duplicate issue.
The Architectural Reality
Codex-specific runtime configuration is intentionally harness-scoped:
.codex/config.template.toml is the tracked onboarding template.
.codex/config.toml is ignored and customizable per checkout.
.codex/hooks.json is the hook definition that injects .codex/CODEX.md as trusted project-local Codex context.
.codex/CODEX.md documents the hook injection model but does not own the feature-flag key itself.
The source-of-authority is external but official: OpenAI Codex Config Basics documents the [features] table and lists hooks as the lifecycle-hook feature flag. The repo should track that public config surface before the deprecated alias disappears.
The Fix
Update the committed Codex template and any tracked Codex setup note that names the deprecated key:
- Replace
[features].codex_hooks = true with [features].hooks = true in .codex/config.template.toml.
- If any tracked Codex-facing prose names
codex_hooks, update it to hooks and preserve the existing explanation that .codex/config.toml is ignored/local.
- Do not edit or commit the ignored
.codex/config.toml; local operators can copy/merge the template or update their private config manually.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
| Codex feature flag for project-local hooks |
OpenAI Codex Config Basics feature-flag table |
Use [features].hooks = true in the repo template |
Existing ignored local configs may keep working via deprecated alias until Codex removes it, but will warn |
.codex/config.template.toml; optional Codex setup prose if needed |
`rg -n "codex_hooks |
Acceptance Criteria
Out of Scope
- Changing
.codex/hooks.json behavior.
- Changing the hook script implementation.
- Editing operator-local ignored
.codex/config.toml in a tracked PR.
- Reworking Codex Desktop onboarding beyond the feature-flag rename.
Avoided Traps
- Do not remove hooks because the feature default is currently documented as true. The repo template deliberately makes hook dependence explicit for fresh checkouts and self-documents the harness contract.
- Do not commit ignored local config. The template/custom split is the point of the Codex setup.
- Do not treat this as a Neo framework hook issue. This is Codex harness configuration, not Neo reactive lifecycle hooks.
Related
Origin Session ID: d60db68f-8ff0-48a6-b168-237ca9dca2a0
Retrieval Hint: query_raw_memories("Codex codex_hooks deprecated features hooks config.template hooks.json CODEX.md")
Context
A newer Codex version now emits this deprecation warning when reading the repo-local Codex config:
This is a friction-to-gold maintenance item: the warning is small, but it hits every Codex session that has copied the repo template into the ignored local config and makes the harness bootstrap surface look stale.
The Problem
The committed Codex template still advertises the old feature flag:
[features] codex_hooks = trueLocal evidence:
.codex/config.template.toml:86-87still usescodex_hooks = true..codex/config.tomlcurrently mirrors the same old key.hooksas the supported feature flag and documentcodex --enable hooks/[features].hooksas the enable path.Duplicate sweep:
Codex codex_hooks deprecated features hooks config template ticketfound older Codex template setup context (#10485 / #10552) but no matching deprecation ticket.codex_hookswhen that was current, but no active issue to migrate the flag.codex_hooks,features.hooks, andCodex hooksfound no duplicate issue.The Architectural Reality
Codex-specific runtime configuration is intentionally harness-scoped:
.codex/config.template.tomlis the tracked onboarding template..codex/config.tomlis ignored and customizable per checkout..codex/hooks.jsonis the hook definition that injects.codex/CODEX.mdas trusted project-local Codex context..codex/CODEX.mddocuments the hook injection model but does not own the feature-flag key itself.The source-of-authority is external but official: OpenAI Codex Config Basics documents the
[features]table and listshooksas the lifecycle-hook feature flag. The repo should track that public config surface before the deprecated alias disappears.The Fix
Update the committed Codex template and any tracked Codex setup note that names the deprecated key:
[features].codex_hooks = truewith[features].hooks = truein.codex/config.template.toml.codex_hooks, update it tohooksand preserve the existing explanation that.codex/config.tomlis ignored/local..codex/config.toml; local operators can copy/merge the template or update their private config manually.Contract Ledger Matrix
[features].hooks = truein the repo template.codex/config.template.toml; optional Codex setup prose if neededAcceptance Criteria
.codex/config.template.tomluseshooks = trueunder[features].codex_hooks..codex/config.tomlremains untracked and is not committed.rg -n "codex_hooks" .codex AGENTS.md learn/agentosor a narrower equivalent proving tracked references are migrated.Out of Scope
.codex/hooks.jsonbehavior..codex/config.tomlin a tracked PR.Avoided Traps
Related
codex_hooksflag.Origin Session ID: d60db68f-8ff0-48a6-b168-237ca9dca2a0
Retrieval Hint:
query_raw_memories("Codex codex_hooks deprecated features hooks config.template hooks.json CODEX.md")