C22 Updated 2026-06-20
Pillar 2 - Memory in any agent via MCP

CLAUDE.md is Not Memory

CLAUDE.md and other static context files are useful boot instructions, but they do not replace durable, source-aware, inspectable agent memory.

CLAUDE.md is boot context, not memory. It can tell Claude Code how to work in a repository, but it does not create source-linked writes, retrieval traces, supersession, tenant scope, or deletion handles. Use static files for durable instructions and memory for facts that change or accumulate.

Last updated: June 20, 2026.

What is CLAUDE.md good for?

CLAUDE.md is good for stable repository instructions: commands, conventions, workflow rules, style expectations, and warnings. Claude Code’s memory docs describe project memory files as a way to share instructions with Claude across sessions (Claude Code memory docs). That is useful and worth doing.

The mistake is treating that file as the whole memory system. A static file cannot automatically know which decision happened yesterday, which source supports a claim, or which user asked for deletion.

What is agent memory good for?

Agent memory is good for durable facts and source-linked recall. It can store decisions, preferences, source artifacts, corrections, and transcript turns under a scope. It can retrieve them when relevant and keep them out of the prompt when irrelevant.

LangChain’s memory concepts separate short-term thread state from long-term memory. CLAUDE.md is closer to static instruction context. It is not a long-term memory write path.

Where does CLAUDE.md break at scale?

Static context files break in predictable ways:

FailureSymptomMemory fix
StalenessOld instructions remain after a workflow changesSupersede old facts with source lineage
BloatFile grows until agents ignore partsRetrieve only relevant memory
No write pathDecisions in chats never land in the fileSync transcripts or save memory
No source lineageA rule exists but no one knows whyLink memory to source artifacts
No delete handleA sensitive fact is hard to targetStore delete handles and tombstones
Single-client shapeThe file serves one tool’s conventionExpose memory through MCP, REST, or CLI

Anthropic’s context engineering guidance reinforces the deeper point: current context should be engineered. Static files are one input, not the whole context system.

How should you split static instructions and memory?

Use this rule:

  • Put stable operating instructions in CLAUDE.md or AGENTS.md.
  • Put source-backed project facts in memory.
  • Put one-off scratch state in the current context.
  • Put large documents in source storage and retrieve them when needed.
  • Put corrections into memory with supersession metadata.

For example, “run tests before closing issue work” belongs in a static instruction file. “Issue #680 cannot publish benchmark numbers” belongs in memory and issue context. “The current command is still running” belongs only in working context.

How do you make CLAUDE.md and memory work together?

Keep CLAUDE.md small and directional. It should tell the agent to use memory for prior decisions rather than trying to contain all prior decisions itself. Example:

Before implementing, use Answer Engine memory to retrieve recent decisions for this repo and issue.
Do not rely only on this file for prior context.

Then configure the memory server through MCP:

{
  "mcpServers": {
    "answer-engine": {
      "command": "npx",
      "args": ["answer-engine-mcp"],
      "env": {
        "ANSWER_ENGINE_API_KEY": "ae_live_your_key_here",
        "ANSWER_ENGINE_API_URL": "https://engine.answeragent.ai",
        "ANSWER_ENGINE_LIBRARY": "personal-memory"
      }
    }
  }
}

The MCP introduction explains why this is client-portable. The same memory server can serve more than one agent surface.

How do you migrate static context into memory?

Do not blindly import the entire file as one memory. Split it into source-backed rules and decisions:

  1. Keep current stable rules in the file.
  2. Move historical decisions into source artifacts or memory records.
  3. Add links from memory records back to issues, docs, commits, or transcripts.
  4. Mark obsolete rules superseded instead of leaving both versions active.
  5. Test a fresh session with one known project question.

If a rule changes often, memory plus source lineage is usually better than editing a giant static context file.

Read Give your coding agent memory of your codebase, Claude Code loses context after compaction, and Context Engineering vs Memory.

Sources

Fig. 9 FAQPage schema / visible answers
FIG. 9

FAQ

Is CLAUDE.md agent memory?

No. CLAUDE.md is a static instruction file. Agent memory is a durable data layer with writes, retrieval, source lineage, scope, inspection, and deletion behavior.

Should I still use CLAUDE.md?

Yes. Use it for stable repo instructions and workflow rules, then use memory for decisions, source-backed facts, and cross-session recall.

What breaks when CLAUDE.md grows too large?

It becomes stale, hard to inspect, expensive to include, and unable to represent source-linked decisions or deletion requests precisely.

How do I combine static files and memory?

Keep static instructions small, sync important transcripts or documents into memory, and retrieve source-linked facts when the agent needs them.

NEXT

Build memory you can inspect.

Answer Engine gives agents a persistent, tenant-isolated memory layer via MCP, with source-aware recall and roadmap-labeled inspection work.