File-by-file comparison
Claude Code vs Codex project configuration
Claude Code and OpenAI Codex solve many of the same repository-configuration problems, but their filenames and schemas are not interchangeable. Map the purpose of each layer before you port it.
Configuration map
| Purpose | Claude Code | Codex |
|---|---|---|
| Durable repository guidance | CLAUDE.md, with project and more specific directory guidance | AGENTS.md or AGENTS.override.md, layered toward the working directory |
| Project settings | .claude/settings.json | .codex/config.toml in trusted projects |
| Personal defaults | ~/.claude/CLAUDE.md and ~/.claude/settings.json | ~/.codex/AGENTS.md and ~/.codex/config.toml |
| Repository skills | .claude/skills/<name>/SKILL.md | .agents/skills/<name>/SKILL.md |
| Lifecycle hooks | Hook entries in Claude settings or plugin configuration | hooks.json or inline [hooks] beside active config layers |
| Specialized workers | Custom definitions under .claude/agents/ | Agent roles configured through [agents] and role configuration |
| External tools and data | MCP server configuration | MCP server configuration and app connectors |
CLAUDE.md and AGENTS.md serve a similar purpose
Both are places for durable repository guidance: real commands, non-obvious architecture, conventions, boundaries, and verification expectations. Both support more specific guidance closer to the code it governs.
Renaming a file does not complete a migration. Review content for product-specific commands, tool names, invocation syntax, and assumptions about how nested guidance loads.
Settings must be translated, not renamed
Claude Code uses JSON project settings. Codex uses TOML configuration and loads project-scoped .codex layers only for trusted projects. Model choice, approvals, sandboxing, MCP, hooks, and agent roles therefore need a deliberate mapping.
Start from desired behavior—such as “allow tests locally but keep publishing interactive”—then implement it using the destination product’s current settings model.
Skills are the most portable concept
Both products use SKILL.md-based workflows. Directory locations differ, and product-specific metadata or tool assumptions may still need changes.
- Copy one skill, not the entire library.
- Check its metadata and referenced files.
- Replace product-specific tool names and commands.
- Invoke it explicitly with a small task.
- Test automatic selection separately if you depend on it.
Hooks share a goal, not a configuration format
Both systems can run lifecycle hooks around agent activity. Their event schemas, trust behavior, configuration files, and output contracts differ. Port the policy and rewrite the integration for the destination product.
A practical migration sequence
- Extract durable facts. List commands, architecture boundaries, generated paths, and completion checks independently of either product.
- Create destination guidance. Put only frequently needed facts in
CLAUDE.mdorAGENTS.md. - Translate permissions and sandbox behavior. Rebuild the policy in the destination settings format.
- Port one workflow at a time. Skills are a better first target than hooks or specialized agents.
- Reimplement deterministic controls. Verify hook events, inputs, outputs, and trust behavior from current docs.
- Test in a disposable branch. Exercise allowed, denied, and failing paths before consequential work.
Using both in the same repository
You can keep both configuration systems in one repository. Keep each entry file short and consistent, and avoid silently giving the two agents contradictory commands or definitions of done.
repo/
├── AGENTS.md
├── CLAUDE.md
├── docs/verification.md
├── .claude/settings.json
└── .codex/
├── config.toml
└── hooks.json
A shared human-readable architecture or verification document can reduce duplication, but keep critical commands and safety boundaries visible in each product’s active guidance.
Current documentation
- Anthropic: the
.claudedirectory - OpenAI: custom instructions with
AGENTS.md - OpenAI: Codex configuration basics
References rechecked July 16, 2026. Verify behavior in the version and environment you deploy.
Starting with Claude Code?
Run the free audit or inspect the Lite kit. The paid setup kit is specifically for Claude Code; its settings and hooks are not sold as drop-in Codex configuration.
Audit a repo freeDownload Lite freeConfiguration FAQ
Can I rename CLAUDE.md to AGENTS.md?
You can reuse suitable content, but product-specific commands, directory behavior, tool names, and configuration references may need to change.
Can the same skill work in both products?
Often, but not automatically. Directory locations and product-specific extensions can differ. Test it in each product where it will run.
Can I use the setup kit as Codex configuration?
No. The paid setup kit targets Claude Code. Its general patterns can be adapted, but the included settings, hooks, and agent definitions are not drop-in Codex files.