The Practice Room / Codex / Episode 3
What goes in an AGENTS.md file?
Codex forgets everything about your project the moment you close the window.
It forgets when you close the window
Codex keeps nothing about your project once the window shuts. Every session starts from nothing unless you have written things down in one file, and the file has a name Codex goes looking for.
That name is AGENTS.md. Claude Code calls its version CLAUDE.md. Same idea, different name, and Codex will even offer to convert one into the other.
Do it yourself
- Open Codex in your folder.
- Type /init and press enter.
- Codex describes it plainly: create an AGENTS.md file with instructions for Codex.
- It reads the folder, then writes that one file.
- Read it back: type type AGENTS.md and press enter.
What closing the window costs you
It is not memory, and it does not learn. It is a note it reads before it starts.
The two halves
What it wrote by itself is the top. That is Codex describing what it worked out about your folder, and it is usually close enough to leave alone.
Underneath is the part that is yours. You tell it who you are and what you are building. You tell it how you want things done, and what it must never touch. Everything you are tired of repeating goes in there once, and it reads it every time.
The honest part
Written down does not mean always obeyed. The file shifts the odds heavily in your favour and it does not guarantee anything. It drifts, and you check.
The same caution applies to CLAUDE.md, which is worth saying because people assume a file they wrote has the force of a setting. It has the force of an instruction to someone capable who is reading quickly.
Check yourself
What is the file called, and why that name?
AGENTS.md. Codex looks for that specific name when it opens in a folder.
What does Claude Code call its version?
CLAUDE.md. Codex will offer to convert between them.
Which half of the file is yours to write?
The bottom. The top is what Codex worked out about the folder on its own.
You wrote never touch the pricing file and it touched the pricing file. What now?
That is drift, and it is expected. The file makes it far less likely, not impossible. You check.
When it goes wrong
type AGENTS.md says no such file. You are in a different folder than the one /init wrote into. Type cd on its own to check where you are standing.
Nothing you wrote is being followed. Confirm the file is in the folder you are opening Codex in. These files are per folder.
You have both files and they disagree. Pick one as the real one and keep the other short, or let Codex convert so they match.
Words used here
System prompt • Context window • Codex and Claude Code compared
Go deeper
agents.md is the open format these files follow, which is why more than one tool reads them.
What she says in the film
Codex forgets everything about your project the moment you close the window.
Unless you write it down in one file, and the file has a name it looks for.
Open Codex in your folder and type /init.
Codex describes it plainly. Create an AGENTS.md file with instructions for Codex.
It reads the folder, then writes that one file.
Read it back with type, space, AGENTS dot M D.
What it wrote is what it worked out on its own. Underneath is the part that is yours.
You tell it who you are and what you are building.
You tell it how you want things done, and what it must never touch.
Everything you are tired of repeating goes in there once, and it reads it every time.
One note, because people do ask. Claude Code calls its version CLAUDE.md.
Codex will even offer to convert one into the other. Same idea, different name.
And the honest part. Written down does not mean always obeyed. It drifts, and you check.
That is your Codex tip for today.
No permission required.

Book a session and we do it together on a call.
Book an hourAsk what did not make sense
Comments go through our own form and are read before they appear. Links are not allowed; describe it in words.
More from Codex.

Codex, installed in one line
Codex is OpenAI's assistant. It does the same kind of work Claude Code does.

Can Codex in the terminal generate images?
Last time we installed Codex. Today it makes something different.

Codex makes a set of pictures, from the terminal
Ask once, name the style first, and Codex writes every picture into the folder as its own file. They match bec…
Get the next walkthrough.
One email when something goes up. The argument, the film and the term, nothing else. One click to leave.
Have a question now? Ask Mstimaj, she knows the archive.