Command reference Β· Codex CLI
/init
Generates an AGENTS.md scaffold for the current project.
AGENTS.md holds project rules and context that Codex reads each session β comparable to CLAUDE.md in Claude Code.
π THE SAME TASK (βEDIT PROJECT CONFIG/INSTRUCTIONSβ) ON OTHER PLATFORMS
β WHEN TO USE IT?
Set up a new project for Codex
/init
β WHEN NOT TO?
AGENTS.md already exists and is maintained
/init writes a fresh scaffold and may overwrite existing project notes.
Better: edit the existing AGENTS.md directly
SOURCES
- Codex CLI docs: Slash Commands β developers.openai.com