Codex is OpenAI's coding agent, available as a CLI and in the cloud. It reads AGENTS.md, an open convention that many coding agents support, so one file can steer several tools.
Core concepts
- AGENTS.md as the shared file: Keep one
AGENTS.mdwith setup commands, conventions and testing instructions. If you use more than one agent, this avoids maintaining three copies of the same rules. — AGENTS.md - Cloud tasks and branches: Cloud agents can work on a branch in the background and open a pull request. Treat that PR like any contributor's: read it, run it, then merge. — Codex docs
- Delegating the boring work: Good jobs for agents: upgrade dependencies, add tests, rename files, write migrations. Keep product decisions with you. — Codex docs
- Using several agents safely: Do not let two agents edit the same files at once. Give each a separate branch or a separate area of the app. — Git branching guide
Concept videos
YouTube channels and searches for these topics. On a large screen they open in the reading panel next to the roadmap.
- Codex demos — OpenAI channel
- AGENTS.md explained — YouTube search: AGENTS.md coding agents
Explanation
What belongs in AGENTS.md
Install and run commands, test commands, code style, folder map, and a short list of things the agent must never do. It should read like a README written for a machine.
Reviewing agent pull requests
Check that the diff matches the plan, that tests exist, that no secrets or .env files were added, and that no unrelated files changed.
What Is It?
AGENTS.md is a plain markdown file that tells coding agents how to work in your repository.
Why Should I Care?
One shared file keeps behaviour consistent when you move between Codex, Cursor and Claude Code.
Real World Analogy
AGENTS.md is the house rules sheet on the fridge: whichever contractor walks in, they read the same page.
Visual Mental Model
AGENTS.md -> Cursor / Claude Code / Codex -> branch -> pull request -> your reviewSmallest Possible Example
AGENTS.md
Setup: npm install, npx expo start
Checks: npx tsc --noEmit, npx expo lint, npm test
Style: TypeScript strict, NativeWind classes, hooks in lib/
Never: commit .env, add dependencies without asking, edit ios/ or android/ by handCommon Mistakes
❌ Forgetting to list the test command.
Agents then skip verification. Put the exact commands in the file.
❌ Merging an agent PR because CI is green.
Green CI does not prove the feature works on a phone. Run it.
Build This Mini Project
Write an AGENTS.md, ask an agent to add a unit test for one utility function on a new branch, and review the PR.
Prompts for Cursor, Claude Code & Codex
Paste these into Cursor, Claude Code, Codex, or any coding agent. Replace the bracketed parts with your app details, and keep the agent in plan mode first so you review the approach before it edits files.
Branch-safe task
Work on a new branch named feat/[name]. Implement only: [task]. Run typecheck, lint and tests. Open a summary of changes, listing every file touched and why.Dependency upgrade
Upgrade Expo to the latest SDK following the official upgrade guide. List breaking changes that affect this repo, apply them in separate commits, and run expo-doctor at the end.Rules, databases & blogs to use
- Cursor rules database: turn rules into AGENTS.md sections
- GitHub code quality rule: repo hygiene rule
- Conventional commits rule: clean commit history
