FlexQ

Guide · work calls

Claude Code memory and CLAUDE.md best practices

Claude Code starts every session with a fresh context. What carries over between sessions is its memory: the CLAUDE.md files you write and the auto memory notes Claude writes for itself. This guide sums up how both work and how to write a CLAUDE.md that stays useful.

Checked against Anthropic's Claude Code documentation (How Claude remembers your project) on 25 November 2026 · tested with Claude Code and Codex

Claude Code changes often. If something here differs from the docs, the docs win.

Two kinds of memory

CLAUDE.md filesAuto memory
Who writes itYouClaude
What it holdsInstructions and rulesLearnings and patterns
When it loadsEvery sessionWhen auto memory is on: the first 200 lines or 25KB of MEMORY.md, whichever comes first

Source: CLAUDE.md vs auto memory.

Both are context, not enforced configuration: Claude reads them and tries to follow them. For something that must happen every time, the docs point to hooks instead. Source.

Where CLAUDE.md files live

ScopeLocationShared with
Managed policyAn OS-level path set by IT (for example /Library/Application Support/ClaudeCode/CLAUDE.md on macOS)Everyone in the organization
User~/.claude/CLAUDE.mdOnly you, all projects
Project./CLAUDE.md or ./.claude/CLAUDE.mdThe team, through source control
Local./CLAUDE.local.md (add it to .gitignore)Only you, this project

Source: Choose where to put CLAUDE.md files.

Imports

A CLAUDE.md can pull in other files with @path/to/file. Relative paths resolve from the file that contains the import, not the working directory. Imported files can import others, up to four hops deep. Imports inside code spans and code blocks are ignored. The first time a project imports files from outside the working directory, Claude Code asks you to approve them. Source.

Imports help organize a long file but don't make it cheaper: imported files load together with the CLAUDE.md that imports them. Source.

Auto memory and /memory

CLAUDE.md best practices

To make your instruction files also answer questions on work calls (exact values with sources, decisions with reasons), see Make your CLAUDE.md / AGENTS.md answer questions on calls; this page stays general.

On calls

Your agent's memory knows the project; on a status call you are the one being asked. Have Claude Code or Codex keep the facts you get asked about in a facts file next to CLAUDE.md. FlexQ listens to the call on your computer and shows a short cue from your project folder when someone asks you a question; the facts come from a file your coding agent keeps (project facts file template). See the AI meeting assistant or FlexQ for work calls.

Download FlexQ for macOS or Windows. How it handles your files is set out in the privacy policy.

FAQ

Where is Claude Code memory stored?

CLAUDE.md files live in your project (./CLAUDE.md or ./.claude/CLAUDE.md), in ~/.claude/CLAUDE.md for all your projects, and in ./CLAUDE.local.md for personal project notes. Auto memory lives in ~/.claude/projects/<project>/memory/ on your machine. Source: Anthropic's Claude Code docs, checked 25 November 2026.

What is the difference between CLAUDE.md and auto memory?

You write CLAUDE.md: instructions and rules loaded every session. Claude writes auto memory: notes about your preferences and corrections, loaded when auto memory is on.

How long should a CLAUDE.md be?

Anthropic's docs suggest under 200 lines per file. Move procedures into skills and part-specific instructions into path-scoped rules in .claude/rules/.

How do imports work in CLAUDE.md?

Write @path/to/file anywhere in the file. Relative paths resolve from the importing file, imports can nest up to four hops, and imported files still count toward context.

Does Claude Code read AGENTS.md?

Yes, when there is no CLAUDE.md or CLAUDE.local.md in the working directory or above it. If you have both, add @AGENTS.md to your CLAUDE.md to share one file with other tools.

More

FlexQ for work calls · AI meeting assistant for work calls · CLAUDE.md / AGENTS.md guide · Project facts file template · All guides · Download FlexQ