AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Oct 29, 2026, 01:00 JST

Anthropic sets 200-line target for CLAUDE.md files

Send on LINE
Anthropic sets 200-line target for CLAUDE.md files

3 Key Points

  1. What happened

    Anthropic's memory docs target under 200 lines per CLAUDE.md file and warn that longer files consume more context and reduce adherence; files over 4 MiB are skipped, and @ imports organize a long file without reducing context cost.

  2. Why it matters

    A file kept under the target is read in full at the start of every session, so exceeding it risks warnings and weaker adherence to project rules — and reorganizing content into imports alone does not lower what each session loads.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The documentation draws a practical line between keeping facts and moving procedures. Facts Claude should hold in every session — build commands, conventions, project layout, "always do X" rules — stay in CLAUDE.md, while multi-step procedures go to a skill and instructions tied to one part of the codebase go to a path-scoped rule in .claude/rules/. Rules without a paths frontmatter load unconditionally and cost context every time; rules with paths load only when a matching file is read or edited.

The same logic explains why imports are not a shortcut. Imported files load together with the CLAUDE.md that imports them, so moving text into an @-imported file tidies the main file without shrinking what each session carries. Claude Code also counts each file separately against the target, so the aim is per-file, not a 200-line budget across everything.

The AGENTS.md overlap is a second source of drift: writing the same rule in two files invites fixing one and leaving the other stale. The docs lay out three routes — an @AGENTS.md import for Claude-specific additions, a symlink when no Claude-only content is needed, or AGENTS.md alone where every session can read it. Teams that keep a CLAUDE.md must import AGENTS.md for sessions that cannot read it directly.

FAQ
Where should content beyond 200 lines go?
The docs say multi-step procedures belong in a skill, and instructions that matter only for part of the codebase belong in a path-scoped rule under .claude/rules/, which loads only when matching files are touched.
Does using @ imports make a long CLAUDE.md cheaper to load?
No. Imported files load together with the CLAUDE.md that imports them, so imports help organize a long file but do not reduce its context cost.
What happens when I already have an AGENTS.md?
Claude Code can read AGENTS.md as project instructions, but if a CLAUDE.md or CLAUDE.local.md exists in the working folder or above it, only the CLAUDE.md side loads unless it imports AGENTS.md.
Send on LINE

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 articleAI agent pricing as of 2026年10月: from a few thousand yen to millions