Mover

Claude Code drifts from the plan: why it happens

Claude Code drifts from the plan because Anthropic's documentation says Claude treats CLAUDE.md and auto memory as context, and that more specific, concise instructions are followed more consistently. Anthropic memory docs

This page reads that documentation as it stood on 7 October 2026 and sets out what it says about how instructions load, how long they should be and what can enforce them. It also notes what two Reddit threads are asking. Anthropic memory docs

Why does Claude Code drift?

Each Claude Code session begins with a fresh context window. Two mechanisms carry knowledge from one session to the next: CLAUDE.md files, which you write, and auto memory, which is notes Claude writes itself based on your corrections and preferences. Anthropic memory docs

ItemCLAUDE.md filesAuto memory
Who writes itYou Anthropic memory docsClaude Anthropic memory docs
What it containsInstructions and rules Anthropic memory docsLearnings and patterns Anthropic memory docs
Loaded intoEvery session Anthropic memory docsEvery session, first 200 lines or 25KB Anthropic memory docs

Anthropic says both are loaded at the start of every conversation and that Claude treats them as context. For blocking an action regardless of what Claude decides, the same page points to a PreToolUse hook. Anthropic memory docs

The page does not use the word drift. Reading its description of context-level instructions as a cause of drift is this page's inference, and the source does not say it in those terms.

Does a longer CLAUDE.md help?

Anthropic's memory page, read on 7 October 2026, sets a target of under 200 lines per CLAUDE.md file. Anthropic memory docs

The same page says longer files consume more context and reduce adherence. Imports help organize a long file but do not reduce its context cost, because imported files also load at launch. Anthropic memory docs

Anthropic's alternative for instructions that matter to only part of a codebase is a path-scoped rule, which loads only when Claude works with matching files. Anthropic memory docs

The page also asks for instructions concrete enough to verify. Its examples pair "Use 2-space indentation" with the vaguer "Format code properly", and "Run npm test before committing" with "Test your changes". A plan phrased as the first kind of line gives Claude something checkable. Anthropic memory docs

For wording and structure, how to write a CLAUDE.md or AGENTS.md is the next read.

How can you block an action?

Anthropic's answer is a PreToolUse hook. The memory page says Claude treats CLAUDE.md and auto memory as context, and that to block an action regardless of what Claude decides, a PreToolUse hook is the tool to use. Anthropic memory docs

That separates two jobs. A line in CLAUDE.md guides behaviour, and a hook stops a specific action. The source does not say how to write a hook, so Claude Code hooks explained is the place to continue.

The docs also say when a line belongs in CLAUDE.md in the first place. Add one when Claude makes the same mistake a second time, when a code review catches something Claude should have known, or when you type the same correction you typed last session. Anthropic memory docs

How do you check what loaded?

Anthropic's instruction for confirming a project CLAUDE.md loaded is to run /context in a session and check the list under Memory files. Anthropic memory docs

Location matters for when a file loads. CLAUDE.md and CLAUDE.local.md files in the directory hierarchy above the working directory are loaded at launch, and files in subdirectories load on demand. A rule kept in a subdirectory file is therefore not guaranteed to be in context from the start of a session. Anthropic memory docs

The page's contents list troubleshooting entries titled "Claude isn't following my CLAUDE.md" and "Instructions seem lost after /compact". The text we read stops before those entries, so this page does not report what they say. For the compaction case, see why Claude Code forgets the plan after compaction. Anthropic memory docs

What do people report?

Two Reddit threads in r/ClaudeAI relate to the question. One is titled "Claude told me CLAUDE.md doesn't follow you across devices. Can anyone confirm?" Reddit: CLAUDE.md across devices

The other is titled "Claude Code agents surfacing unverified MEMORY.md content" and adds that two compounding changes in versions 2.1.139 to 2.1.141 may explain the drift. That is the poster's suggestion. We read the thread title only, and Anthropic's memory page does not mention those versions. Reddit: unverified MEMORY.md content

No count of posts was made for this page, so these two titles show what some users ask and nothing about how common either problem is.

Common questions

Does Claude Code enforce CLAUDE.md?

Anthropic's memory page says Claude treats CLAUDE.md files as context, and that a PreToolUse hook is the way to block an action regardless of what Claude decides. Anthropic memory docs

How long should a CLAUDE.md be?

Anthropic's memory page says to target under 200 lines per CLAUDE.md file, and says longer files consume more context and reduce adherence. Anthropic memory docs

Does CLAUDE.md follow you across devices?

The excerpt of Anthropic's memory page that we read does not address devices. It lists scopes: a project CLAUDE.md is shared with team members via source control, and ~/.claude/CLAUDE.md holds personal preferences for all your projects. Anthropic memory docs The question itself comes from a Reddit thread. Reddit: CLAUDE.md across devices

How we checked

We read Anthropic's page "How Claude remembers your project" on 7 October 2026. The text available to us ran through the CLAUDE.md writing guidance and did not include the body of the troubleshooting entries. We also read the titles of two Reddit threads in r/ClaudeAI, linked above, and not the replies.

No forum count was made for this page. The Reddit titles are quoted as signals of what people ask, and they carry no measurement.

Last verified 7 October 2026. Checked against Anthropic's memory page on 7 October 2026.

Sources

  1. Anthropic, how Claude remembers your project checked 7 October 2026

From the publisher

Mover (our product)

Mover is a $49 one-time planning tool that runs inside Claude Code or Codex, keeps your plan in plain files on your own computer, loads it into each session, and says so when your work drifts from it.

Mover is a $49 one-time planning tool that runs inside Claude Code or Codex, keeps your plan in plain files on your own computer, and says so when your work drifts from it. It is the wrong choice if you want something that keeps running while your computer is off.

One payment. 30-day money-back guarantee.