Skip to content
Justin Puah edited this page Jul 13, 2026 · 1 revision

Config for OpenAI Codex CLI, wired up as a read-only second-opinion reviewer for Claude Code.

How it fits with Claude Code

Claude Code is the primary driver. Codex is registered as the codex MCP server so Claude can ask it for a cross-model review on demand (see the /codex-review skill and the "Codex second opinion" section in claude/CLAUDE.md). The integration is one-way: Claude → Codex.

Two permission postures, one config file:

Path Posture Where set
Reviewer (Claude calls Codex) read-only, non-interactive -c overrides on the MCP registration: codex mcp-server -c sandbox_mode="read-only" -c approval_policy="never"
Standalone (you run codex) workspace-write, asks first config.toml (approval_policy = "on-request", sandbox_mode = "workspace-write")

Shared conventions (single source)

Your personal coding conventions live in claude/AGENTS.md (sibling to CLAUDE.md), not here. Both tools read the same content:

  • Claude Code: ~/.claude/CLAUDE.md imports it via @AGENTS.md.
  • Codex: it is installed to ~/.codex/AGENTS.md, which Codex reads for every project.

So setup.ps1 -Module codex copies claude/AGENTS.md~/.codex/AGENTS.md. Edit the conventions in claude/AGENTS.md only; re-run the installer to push the copy.

Files

File / Directory Installed to Notes
config.toml ~/.codex/config.toml Model + standalone permissions
claude/AGENTS.md (shared) ~/.codex/AGENTS.md Personal conventions (sourced from the claude module)
skills/<name>/ ~/.codex/skills/<name>/ Global custom skills
templates/work-AGENTS.md — (manual copy) Drop into an Azure work repo root as AGENTS.md

config.toml and the shared AGENTS.md are copied on Windows (like the claude module), so the live ~/.codex copies can drift — re-run setup.ps1 -Module codex to push repo → live.

Skills

codex/skills/ holds global custom skills, in Codex's own skill format (a SKILL.md per skill, optionally with an agents/openai.yaml). The installer junctions each subdirectory into ~/.codex/skills/, mirroring how the claude module junctions claude/skills/. Codex's own built-in skills live alongside at ~/.codex/skills/.system/ and are never touched by this installer.

Unlike Claude, Codex has no separate top-level "agents" concept — an "agent" is just an agents/openai.yaml file nested inside a skill folder, so there's no separate agents junction to wire up; the skills junction covers both.

codex/skills/ is empty for now — add a skill by creating codex/skills/<name>/SKILL.md and re-running setup.ps1 -Module codex.

Install

  1. setup.ps1 -Module codex — installs the Codex CLI (native installer), copies config.toml + AGENTS.md into ~/.codex/, junctions any codex/skills/ into ~/.codex/skills/, and registers the read-only MCP reviewer at user scope in Claude Code.
  2. codex login — interactive ChatGPT-account OAuth (run this yourself; one-time).

Verify:

codex --version
claude mcp list                 # codex should be listed
codex exec "reply with: ok"     # standalone smoke test (after login)

Model

gpt-5.5 (current Codex default). Newer models may require ChatGPT login rather than an API key — codex login (no flags) uses your ChatGPT account, which is what we want.


Source: codex/README.md in the dotfiles repo.

dotfiles wiki

Getting started

Core (Windows)

Cross-platform

Claude Code & AI

Reference

Legacy (Linux)

Troubleshooting

Clone this wiki locally