Codex
Codex is OpenAI's coding-agent harness. This entry covers harness behavior rather than behavior of any underlying model.
Summary
Codex is OpenAI's coding-agent harness. This entry covers harness behavior rather than behavior of any underlying model.
Instruction files
AGENTS.md
Repository-level instruction files this harness reads. Treat their effective permissions as part of the setup.
Recommended
- Put durable repository instructions in a scoped
AGENTS.md. - Keep project instructions concrete, current, and compatible with repository tooling.
- Include actual validation commands and boundaries the agent must preserve.
Avoid
- Attributing instruction-file discovery to the model itself.
- Storing stale or mutually conflicting rules in nested instruction files.
Context & tool use
Codex constructs an instruction chain from global and project-scoped files. More local project guidance can refine broader guidance.
Evidence
official
- officialCodex reads AGENTS.md instruction files and applies scoped project guidance before work begins.
Custom instructions with AGENTS.md ↗