AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Oct 13, 2026, 10:00 JST

AGENTS.md and CLAUDE.md: one folder, two AI tools, one rulebook

AGENTS.md and CLAUDE.md: one folder, two AI tools, one rulebook

3 Key Points

  1. What happened

    Tiero keeps all instructions in AGENTS.md and makes CLAUDE.md a single line that imports it, so Codex and Claude Code read the same rules without duplicated text.

  2. Why it matters

    Claude Code only reads AGENTS.md by default when no CLAUDE.md exists in the working folder or above it, so a folder with no CLAUDE.md means nested setups can silently skip AGENTS.md.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The setup exists because the two tools do not look for the same file. Codex starts with AGENTS.md in its home directory (default ~/.codex) and then walks from the project root down to the current working folder, joining files from the root side and stopping once the total reaches a default cap of 32 KiB. Claude Code, by contrast, reads CLAUDE.md from the working folder and each folder above it, and a line starting with @path inside CLAUDE.md pulls in another file, following those references up to four levels deep.

The catch is the default condition for AGENTS.md in Claude Code. When any CLAUDE.md exists in the working folder or above it, the default skips AGENTS.md. In nested working folders, where an upper folder often holds a CLAUDE.md, a lower folder's AGENTS.md would stop being read. The fix the author uses is a CLAUDE.md in the company folder that contains the single import line, which restores AGENTS.md regardless of what CLAUDE.md files are added above.

To keep the entry file short, AGENTS.md itself is 13 lines and holds only the workflow and pointers, with the actual rules living in rules/ files and per-role files under team/. The author notes AGENTS.md is read on every task, so a longer entry file leaves less of what the AI can read at once for actual work, and points to the 32 KiB Codex cap and Claude Code's documented 200-line guideline for CLAUDE.md. The same shape applies to skills: both tools use a SKILL.md file but look in different locations, and the author verified on October 12, 2026 that Codex read skills placed under ~/.codex/skills in their environment. To confirm the entry is actually read, the author uses a Codex command that asks it to summarize the current instructions, and a Claude Code command that returns the numbered steps from AGENTS.md.

FAQ
Where do the instructions live?
All instruction text goes in AGENTS.md. CLAUDE.md is reduced to a single line that imports AGENTS.md, so there is only one place to edit.
When does Claude Code read AGENTS.md by default?
Only when the working folder and the folders above it contain no CLAUDE.md. If any CLAUDE.md exists above, the default skips AGENTS.md, so an explicit import line is needed.
Which Claude Code versions behave this way?
The default described applies to Claude Code 2.1.277 and later, and to 2.1.281 and later for some connections such as Amazon Bedrock. Older versions read only CLAUDE.md.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleHarvey to enter Japan in early 2027, CEO says