<aside> 🎯

Standing instructions your coding agent reads every session

Steps 07–10 had you paste protocol URLs (the Project Initiation, Roadmap & Backlog, and QA protocols, and the Evals & Observability practices) into your coding agent; this step writes them, with who you are and how you work, into a file it reads at the start of every session.

</aside>

Last reviewed: 20 September 2026 · product details checked against vendor pages on that date · "Where it isn't available" rechecked 3 October 2026

<aside> ⏱️

Estimated time: ~15 minutes to read. ~30 minutes to set up your first AGENTS.md. Prerequisite: Step 10, Know if it's working: Evals & Observability. This is Step 11, the last numbered step.

</aside>

<aside> 📱

Reminder. This page covers the filesystem side of personalization: the Markdown files your local coding agent reads. The app side is Step 04, Personalize your AI: instructions, memory and skills. In Claude the two sides don't share instructions, so if you use both, you maintain both and keep your name, role, and working style the same in each (skills enabled on your account are the exception: they now sync into terminal sessions). In ChatGPT they are one store: in Codex, OpenAI says, your custom instructions "are stored in your global AGENTS.md file".

</aside>

The file to write is AGENTS.md. Your agent reads it silently before doing anything else, so it starts every session knowing the basics. Claude Code also has a file of its own, CLAUDE.md; much of what follows is about making the two get along.


AGENTS.md: the file every agent reads

AGENTS.md is plain Markdown with no required fields: you write, under ordinary headings, what you would tell a new colleague on day one. It is an open format, now stewarded by the Agentic AI Foundation under the Linux Foundation, which lists it among its projects; the format's own site counts over 60,000 open-source projects using it (checked 20 September 2026).

Codex reads it and, by default, no other instruction file. Claude Code has its own, CLAUDE.md, and since version 2.1.277 (18 September 2026) reads AGENTS.md too, by default only when no CLAUDE.md, .claude/CLAUDE.md, or CLAUDE.local.md sits in your working directory or above it. Write the substance in AGENTS.md, and add a CLAUDE.md only when you have something to say to Claude alone.

I use Codex and Claude Code about equally for coding, and in my own document workspaces the contract lives in AGENTS.md.


Where the files live: user, project, managed

Instructions sit at up to three levels, and most setups use the first two.

Level What goes in it Claude Code Codex
You, in every project What is true of you whatever you're working on: name, role, writing style, default tech preferences, standard protocols. ~/.claude/CLAUDE.md ~/.codex/AGENTS.md
One project What's specific to that project: purpose, architecture, conventions, paths to key files, gotchas. AGENTS.md in the project root (or ./CLAUDE.md, or ./.claude/CLAUDE.md) AGENTS.md in the project root, and in any folder between the root and where you are working
Your organization Standards your IT team deploys to every machine; you cannot exclude them. macOS: /Library/Application Support/ClaudeCode/CLAUDE.md · Linux and WSL: /etc/claude-code/CLAUDE.md · Windows: C:\Program Files\ClaudeCode\CLAUDE.md No managed AGENTS.md is documented. Admins constrain Codex through requirements.toml instead, which is configuration (see below).

The user-level file is who you are; the project file is what this project is. Both agents concatenate the files, broadest first, rather than letting one replace another, so a project rule wins only because it is read last. Where two rules flatly contradict, Anthropic says Claude "may pick one arbitrarily", so state each rule once.


What Claude Code does with AGENTS.md and CLAUDE.md

By default Claude Code reads one family of files or the other, not both. Anthropic's table, in its own words:

Your repository has Claude reads
An AGENTS.md, and no CLAUDE.md or CLAUDE.local.md in your working directory or above it Your AGENTS.md
An AGENTS.md and a CLAUDE.md or CLAUDE.local.md in your working directory or above it Your CLAUDE.md files only
A CLAUDE.md that already imports AGENTS.md Your CLAUDE.md, with AGENTS.md included through the import

The third row is how you give Claude instructions of its own without hiding the shared file: the import first, the Claude-only material below it.