← ClaudeAtlas

codex-frameworklisted

Reference knowledge for OpenAI Codex CLI compatibility — how Codex discovers AGENTS.md instructions and .agents/skills so a Forge (Claude Code) project can interoperate with Codex without duplicating agent definitions. Use when a user asks to "add Codex support", make the repo "work with Codex CLI" / "work with both Claude Code and Codex", share governance state between the two tools, or when comparing AGENTS.md vs CLAUDE.md discovery. REFERENCE ONLY — never auto-creates AGENTS.md or .agents/ files.
nxtg-ai/forge-plugin · ★ 5 · AI & Automation · score 76
Install: claude install-skill nxtg-ai/forge-plugin
# Codex CLI — Reference Knowledge > **REFERENCE ONLY.** Do NOT create `AGENTS.md`, `AGENTS.override.md`, `SKILLS.md`, or `.agents/` > on your own initiative. NXTG-Forge delivers agents and skills through the **Claude Code plugin** > system, not Codex-style files. Only scaffold Codex files when the user **explicitly** asks to add > Codex support (see the worked example below). ## How Codex CLI discovers instructions (AGENTS.md) Codex builds one instruction chain per run by **concatenating** files from two layers, joined by blank lines — it does NOT pick a single "winning" file: 1. **Home layer** (`~/.codex`, or `$CODEX_HOME`): reads `AGENTS.override.md` if present, else `AGENTS.md`. First non-empty file at this level only. 2. **Project layer**: from the project root (usually the git root) walking **down** to the current working directory, in each directory it takes at most one of: `AGENTS.override.md`, then `AGENTS.md`, then any name in `project_doc_fallback_filenames` (config-driven). All matched files are concatenated root-first. A nested `AGENTS.md` in a subdirectory **adds to** (does not replace) the root one — closer files come later in the concatenation, so they refine rather than override. Rough Claude Code analogues (not 1:1 — see Gotchas): - `CLAUDE.md` ↔ `AGENTS.md` (repo-wide instruction file) - `.claude/agents/*.md` ↔ persona/role blocks written inline in `AGENTS.md` - `.claude/skills/*/SKILL.md` ↔ `.agents/skills/*/SKILL.md` ## How Codex discove