AI Skill Certs
Claude Code Configuration & Workflows·Task 3.1·Bloom: apply·Difficulty 2/5·10 min read·Updated 2026-06-07

The Claude Code Memory Command: Debugging Which CLAUDE.md Files Are Loaded

Configure CLAUDE.md files with appropriate hierarchy, scoping, and modular organisation

SUBy Solomon UdohReviewed by Solomon UdohAI-assisted · human-reviewed
In short
The Claude Code memory command, /memory, lists every CLAUDE.md, CLAUDE.local.md, and rules file currently loaded in your session, lets you open any of them, and toggles auto memory. It is the primary tool for debugging configuration: if a file you expected is missing from the list, Claude cannot see it, which explains inconsistent behaviour far more reliably than guessing.

What the Claude Code memory command does

The Claude Code memory command, written /memory, is the diagnostic window into your configuration. When you run it inside a session, it lists every memory file Claude has actually loaded, the user CLAUDE.md, the project and directory CLAUDE.md files, any CLAUDE.local.md, and the files in .claude/rules/, and lets you open any of them directly in your editor. It also exposes a toggle for auto memory, the separate system in which Claude writes its own notes across sessions. For configuration debugging, the listing is the part that matters.

Why does a command just for listing files deserve its own knowledge point? Because the most common configuration failures are not subtle content problems; they are a file that you believe is active but that Claude never loaded. Without /memory you are reduced to guessing why behaviour seems off. With it, you replace speculation with a fact: here is precisely what Claude is reading right now. That shift, from guessing to inspecting, is the entire point of this apply-level skill.

/memory command
A Claude Code slash command that lists all CLAUDE.md, CLAUDE.local.md, and rules files loaded into the current session, opens any of them in your editor, and toggles auto memory. Its primary use is verifying that the configuration you expect is actually active when behaviour is inconsistent.

The one question /memory answers

Strip everything else away and /memory exists to answer a single question: is the configuration I think is loaded actually loaded? That sounds modest until you realise how many problems are really this question in disguise. Claude is not following your testing rule, your indentation standard seems ignored, a teammate gets different output, in a large fraction of these cases the instruction is simply not present in the session at all.

The reasoning chain is short and reliable. Run /memory. Scan the list for the file you expected. If it is there, the file is loaded and any remaining problem is about content, the instruction is vague, or it conflicts with another file, so you work on wording. If it is not there, you have found your bug without touching a single instruction: Claude cannot follow guidance it never received. The fix then becomes a location question rather than a prompting question.

Why a file might be missing from the list

When /memory shows that an expected file is absent, there are a handful of usual explanations, and each maps cleanly back to the configuration hierarchy. The most frequent is the launch directory: because Claude loads project and directory files by walking up from where you started it, launching from the wrong folder, a parent above the repo, or a sibling, means the project CLAUDE.md is simply out of the walk and never loaded. Another is a misplaced file: an instruction sitting in a location that is not one of the recognised scopes, so it is never picked up. A third is a personal versus shared mix-up, expecting a teammate's user-level rule to be present when it lives only on their machine.

In every case the value of /memory is the same: it converts a vague feeling that 'configuration is not working' into a concrete observation about which files are and are not loaded, and that observation points straight at the cause.

/memory
lists loaded config
absent file
= location or launch dir bug
inspect
not guess
The /memory debugging loop
Loading diagram...
Run /memory first. A listed file points you at content; a missing file points you at where the file lives or where Claude was launched.

Using /memory on a real inconsistency

The command earns its place the moment you stop theorising and just look. The example below is the canonical shape: identical-seeming setups behaving differently, resolved in seconds by inspection.

Worked example

A developer has two checkouts of the same project, repo-a and repo-b. In repo-a, Claude reliably follows the team's commit-message convention; in repo-b it does not, even though the developer is sure both have the same project CLAUDE.md. They are tempted to rewrite the convention to be 'stronger'. What should they do first?

Resist the urge to rewrite anything. Rewriting a rule that is not even loaded just produces a stronger rule Claude still cannot see. The first move is to gather a fact, so run /memory in each session.

In repo-a, /memory lists the project CLAUDE.md, confirming the commit convention is present, which is consistent with the good behaviour. In repo-b, /memory does not list the project CLAUDE.md at all. That single observation reframes the whole problem: this was never a question of how forcefully the rule is worded, because in repo-b the rule is absent from the session.

Now the cause is a short hunt rather than a guess. The developer checks where Claude was launched and discovers they opened repo-b from a parent directory one level above the actual repository root, so Claude's upward walk never reached the project file. Relaunching from inside the repository root makes the file appear in /memory, and the commit convention is suddenly honoured, with no change to its wording. Had /memory instead shown the file present in repo-b, the conclusion would have flipped: the rule is loaded, so the remaining work is to sharpen its wording or remove a conflicting instruction. Either way, the command turned a frustrating mystery into a two-minute diagnosis.

Common misreadings to avoid

Both errors below lead people to skip the one step that would have told them the answer.

Misconception

The /memory command edits the model's long-term memory of me, like personalising the AI.

What's actually true

/memory is a configuration inspector, not a personalisation panel. It lists and opens the CLAUDE.md, CLAUDE.local.md, and rules files loaded in the session and toggles auto memory. It is about seeing which instruction files are active, not training the model on you.

Misconception

When Claude ignores a rule, the fix is to reword the rule more forcefully until it complies.

What's actually true

If the file is not loaded, no amount of rewording helps, because Claude never sees it. Run /memory first to confirm the file is actually loaded. Only once you have verified it is present does the problem become one of wording or conflicting instructions.

What the listing actually tells you

It helps to know what you are looking at when the command prints its output. The listing covers the configuration files Claude has loaded for the session: your user CLAUDE.md, the project and any directory CLAUDE.md files reached by walking up from the launch directory, any CLAUDE.local.md, and the topic files under .claude/rules/. Each entry can be opened directly in your editor from the command, so you are never more than a keystroke away from confirming not just that a file loaded but what it says. Alongside the file listing, the command also exposes the auto memory toggle, which is a separate system where Claude writes its own running notes; for configuration debugging you can usually ignore that and focus on the file list.

The two failure shapes the listing distinguishes are worth naming precisely. A presence failure is when an expected file is missing from the list entirely, which means Claude never loaded it and the cause is structural: wrong location, or the session launched from a directory that does not reach the file. A content failure is when the file is present but its instruction still is not followed, which means the wording is too vague, or it conflicts with another loaded file, or it is simply not specific enough to act on. The reason /memory is so valuable is that it tells you, in seconds and without ambiguity, which of these two very different problems you actually have, so you do not spend an afternoon rewording a file that was never loaded.

When the file is loaded but behaviour is still off: /context and /doctor

The /memory command answers the presence question, but two sibling commands extend the same inspect-first habit for the harder case where a file is loaded and the problem lies elsewhere. The first is /context, which shows everything occupying the current session's context window broken down by category: system prompt, memory files, skills, MCP tools, and conversation messages. Reach for it when configuration is loaded yet Claude still seems to lose track of it, because a crowded or near-full window can crowd out instructions in a way a plain file listing would never expose.

The second is /doctor, which validates your configuration files and surfaces invalid keys or schema errors. A CLAUDE.md can appear correctly in /memory while a neighbouring settings.json carries a mistyped key that silently breaks behaviour, and /doctor catches exactly the syntactic faults a file list cannot. When even that comes back clean, the documented way to isolate a stubborn problem is to strip configuration back to nothing: point CLAUDE_CONFIG_DIR at an empty directory and launch from a folder with no .claude directory, .mcp.json, or CLAUDE.md, then reintroduce each layer until the behaviour reappears.

Together these form a short diagnostic ladder. Use /memory to confirm what loaded, /context to see how it fits within the window, and /doctor to catch malformed settings, and you have ruled out the structural causes before you ever touch the wording of an instruction.

Building the inspect-first habit

The deeper skill this knowledge point teaches is a disposition, not a command: when configuration behaves unexpectedly, gather a fact before forming a theory. It is genuinely tempting to skip straight to a fix, to assume the rule needs strengthening, the model needs constraining, or the whole setup needs rebuilding, because acting feels like progress. But every one of those moves is a bet placed before the evidence is in, and when the real problem is a file that never loaded, each bet is wasted effort that leaves the actual cause untouched.

Inspecting first inverts that. Running /memory costs almost nothing and routinely collapses a vague, frustrating problem into a precise one: either the file is there, so work on its content, or it is absent, so work on its location. Architects who build this habit debug configuration in minutes; those who guess can spend hours rewording instructions that Claude was never going to see. The certification treats this as a hallmark of competence, which is why questions in this area so often reduce to one decision, do you inspect, or do you guess, and reward the candidate who reaches for the evidence the tool is designed to provide.

For configuration that loads conditionally, the same inspect-first instinct still applies, just with one extra wrinkle: a path-scoped rule or a nested subdirectory file may only appear once Claude has actually touched a matching file, so confirm you are in the right context before concluding a rule is missing. The principle is unchanged, look at what is loaded rather than theorise about it, but the timing of when a file shows up can itself be the clue that explains the behaviour.

A two-minute routine you can reuse

Make the command part of a fixed routine and configuration problems stop eating your time. The moment something seems off, run /memory, scan for the file you expected, and let its presence or absence decide your next move. If the file is missing, check where you launched Claude and whether the file sits in a recognised scope; if it is present, open it and look for vague wording or a conflicting instruction in another loaded file. The whole loop takes a couple of minutes and replaces an open-ended hunt with a definite answer you can act on.

What makes the routine reliable is that it never assumes; it observes. Configuration is one of the few places in agent work where you can see your inputs directly, and this command is the window onto them. Use it early and you rarely guess wrong; skip it and you can spend far longer fixing a problem you never correctly identified, because every fix you try is aimed at a cause you only assumed.

How this shows up on the exam

Domain 3 is worth 20 percent of the exam, and this apply-level knowledge point is tested as a methodology question: faced with inconsistent or surprising Claude Code behaviour, what is the correct first action? The answer the examiners are looking for is to inspect, run /memory to verify which configuration is actually loaded, rather than to immediately rewrite prompts, lower a model setting, or assume the assistant is simply unreliable. Carrying that instinct is also exactly what you need for the next knowledge point, where you use this same inspection to diagnose why two developers on one team behave differently.

Check your understanding

A developer reports that Claude Code is 'randomly ignoring' the project's CLAUDE.md in one session but not another. As the team's Claude Code expert, what is the single best first step to diagnose the issue?

People also ask

What does the /memory command do in Claude Code?
It lists all CLAUDE.md, CLAUDE.local.md, and rules files loaded in your current session, lets you open any of them in your editor, and provides a toggle for auto memory. It is how you confirm which instructions Claude actually has.
How do I see which CLAUDE.md files are loaded?
Run /memory in a session. It prints the loaded configuration files; if a file you expected is not listed, Claude is not reading it, which usually means it is in the wrong location or you launched Claude from a different directory.
Why is Claude Code ignoring my CLAUDE.md?
Either the file is not loaded, which /memory reveals by its absence from the list, or it is loaded but the instruction is too vague or conflicts with another file. Confirm load status with /memory before rewriting anything.

Watch and learn

Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.

Official · Anthropic AcademyOpen full lesson in Academy

Troubleshooting skills

Why watch: Verifying what configuration is actually loaded with /memory is a key step in diagnosing skill problems.

More videos for this concept

References & primary sources

Adaptive study

Master this concept with Archie

Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.

Start studying