One-command setup
From the repo root:.codex/config.toml— MCP server configuration for the Codex CLI.codex/hooks.json— hook wiring pointing at the shared hook script
Verify
Start Codex in the project directory. At session start you should see a team briefing injected (active agents, decisions, conventions).agent_type: codex confirms the wiring.
Config Files
.codex/config.toml:
.codex/hooks.json wires Codex’s hook names to the shared script — npx enagrams init generates this for you.
Differences from Cursor and Claude Code
- Codex doesn’t have per-tool
matchersemantics; the hook script inspects the tool name itself to decide whether to acquire a file reservation. SessionStartcontext injection happens through stdout — the hook script writes the briefing which Codex prepends to the conversation.
Troubleshooting
Codex says it can’t find the MCP server — make surenpx is on Codex’s PATH. The global npm -g install path is the usual fix.
Briefing isn’t appearing — verify the hook script is executable (chmod +x .cursor/hooks/enagrams-hooks.mjs) and that .codex/hooks.json references it correctly.