Install Codex CLI and ship your first AGENTS.md

Read the field note below to see how we apply this pattern in real Codex projects.

verified 2 days ago
Security: unaudited
SERIES Codex in 10 days 01/10DIFFICULTY beginnerTIME 12 minCATEGORY onboardingEdit on GitHub →
Need this in production?

Turn this cable into a shipping system.

We help teams deploy reliable AI workflows with architecture, implementation, and hardening support.

The first Codex week at FRE|Nxt had one repeated failure mode: each thread started with good intent, then drifted because project guardrails were implicit.

We fixed it by standardizing two files before any prompt tuning:

  1. AGENTS.md in the repo root for task and quality expectations.
  2. .codex/config.toml for local defaults and trust-aware project overrides.

Setup snapshot

Install Codex CLI:

npm install -g @openai/codex

Start login:

codex

After login, we created AGENTS.md with three sections:

  • repository architecture assumptions
  • non-negotiable testing/verification steps
  • git hygiene constraints

That was enough to stop most context resets between sessions.

Why this worked

Codex applies layered configuration from user config (~/.codex/config.toml) and project config (.codex/config.toml) with project trust checks. We kept global defaults light and pushed repo-specific behavior into the project layer.

The practical effect: less prompt duplication, fewer accidental workflow violations, and cleaner diffs.

Fast verification checklist

  • codex --help runs without install errors.
  • AGENTS.md exists at the repo root.
  • .codex/config.toml contains only project-specific overrides.
  • First task run follows repository constraints without restating them in the prompt.

More from @frenxt

Share this cable