myth/acc
Log in
EN

Guide

AGENTS.md or CLAUDE.md? One set of instructions for every coding agent

How to share one instruction file cleanly across Codex and Claude Code.

Claude Code behavior from Anthropic’s docs, checked 26 October 2026.

The short answer

Codex reads AGENTS.md; Claude Code reads CLAUDE.md (and AGENTS.md since v2.1.277, but only if no CLAUDE.md exists). To share rules cleanly, put shared instructions in AGENTS.md and import them from CLAUDE.md using @AGENTS.md.

What Claude Code reads

The rowClaude Code reads
Only AGENTS.md

Reads AGENTS.md (requires v2.1.277+).

Both AGENTS.md and CLAUDE.md

Reads CLAUDE.md only.

CLAUDE.md importing @AGENTS.md

Reads both, with Claude-only notes below the import.

A Claude Code setting can also opt into reading both files.

Share one file

  1. Put shared rules in AGENTS.md

    Build commands, style rules and test instructions.

  2. Import it from CLAUDE.md

    Add @AGENTS.md on line 1, with Claude-specific guidance underneath.

    @AGENTS.md
    
    ## Claude Code
    Use plan mode for changes that touch more than three files.
  3. Or use a symlink

    Works on macOS/Linux; prefer @AGENTS.md on Windows where symlinks may require admin rights.

    ln -s AGENTS.md CLAUDE.md

Instructions are not memory

Instruction files cover static project rules. Ongoing decisions live in myth/acc’s project memory: a local git-backed Markdown wiki shared across every model and coding tool in the project.

Project memory

Questions, answered

Does Claude Code read AGENTS.md?

Yes since v2.1.277, if no CLAUDE.md exists. When both exist, import AGENTS.md from CLAUDE.md with @AGENTS.md.

Does Codex read CLAUDE.md?

No. Codex reads AGENTS.md, so keep shared rules there and import them into CLAUDE.md.

Should I commit both files?

Yes, when CLAUDE.md simply imports AGENTS.md plus any Claude-specific notes.

Sources

Facts on this page were checked on . Products change: check the vendor’s own page before you decide.

See agents share a project.

Try the real canvas with live demo agents. No account needed.