The Decoder / One term

What is a CLAUDE.md file?

A CLAUDE.md is a plain text file Claude Code reads at the start of every session: your standing instructions for a project or for yourself. Codex reads AGENTS.md for the same job, and Claude Code reads that too.

By Mstimaj Numbers checked 6 November 2026 Updated 6 November 2026 Level AI Fluency Tool Claude

Sign in to save your place and mark this done. Free, no card.

A single sheet of paper with a few handwritten lines, pinned above a dark desk where a terminal window glows

It is a note you leave for Claude that it reads every time it starts. Every session begins with a blank memory, so anything you would otherwise repeat, how the project is built, what to never touch, how you like things done, goes in this file once. There is a project one in the folder, a personal one in your home directory, and a private per-project one. The command /init writes a first draft for you.

Key facts

  • 3places it can live: the project folder, your home directory, or a private CLAUDE.local.md
  • 200lines, the size the documentation says to stay under, because longer files are followed less
  • 1command that drafts it for you: /init
  • 1equivalent file in Codex, AGENTS.md, which Claude Code also reads
  • code.claude.com, How Claude remembers your project (locations table, /init, size guidance, imports, AGENTS.md); help.openai.com on /init writing an AGENTS.md in Codex; both read 6 November 2026

Why does Claude need a file like this?

Because it forgets. Each Claude Code session begins with a fresh context window, in the documentation’s words. Whatever you explained yesterday about how the project works is gone this morning. CLAUDE.md is the fix: a file in the folder that is loaded into every conversation before you type anything. Think of it as the note taped to the machine for whoever uses it next, except the next user is always the same assistant with no memory of the last time. The documentation is clear that Claude treats the file as context, not as enforced rules, and that the more specific and concise the instructions, the more consistently they are followed.

Where does it go, and who sees it?

Three places, for three audiences. A project CLAUDE.md sits at the root of the folder, or inside a .claude subfolder, and is shared with anyone who has the code: build commands, coding standards, what the folders mean. A user CLAUDE.md lives at ~/.claude/CLAUDE.md and applies to every project you open, for your personal preferences. A CLAUDE.local.md at the project root is for private, per-project notes you do not want committed, and you add it to .gitignore. Files above the working directory load at launch; files in subdirectories load when Claude works in them.

The three Claude files, and the Codex file Claude also reads
File Where For Who sees it
CLAUDE.md ./CLAUDE.md or ./.claude/CLAUDE.md Team instructions for this project Everyone with the code
CLAUDE.md ~/.claude/CLAUDE.md Your preferences, every project Only you, all projects
CLAUDE.local.md ./CLAUDE.local.md, gitignored Private notes for this project Only you, this project
AGENTS.md ./AGENTS.md The same job, for Codex Everyone with the code; Claude reads it too

What should I write in it?

What Claude could not discover by reading the code. How to run the tests. Which folder is generated and must never be hand-edited. The naming rule the team uses. The thing that went wrong last month and must not happen again. Not the obvious: Claude can see that the project is in Python. Run /init first and it drafts a starting file from what it finds in the codebase, then add the parts it could not know. Keep it under about 200 lines; the documentation says longer files consume more context and reduce adherence. For a long set of rules, import other files with @path/to/file or split rules by file type.

Two sizes the documentation names, in lines TWO SIZES THE DOCUMENTATION NAMES, IN LINES Target, per CLAUDE.md 200 lines Auto memory loaded each session (first lines) 200 lines
The target per CLAUDE.md, and how much of Claude's own auto memory loads each session.

Is it the same as AGENTS.md in Codex?

Same idea, different name. Codex reads a file called AGENTS.md from the project folder, and its own /init command writes one. Claude Code can read a repository’s AGENTS.md in place of CLAUDE.md, so a project that already has one for Codex does not need a second file to work with Claude. If you use both tools, that is the file to maintain. The content advice is identical: concrete, short, and about the things the tool cannot work out for itself.

Ask 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.

Comments are read before they appear.

The newsletter

Get the next term.

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.