DEV Community

aicoding-guide
aicoding-guide

Posted on Originally published at aicoding-guide.com

Does # add to CLAUDE.md in Claude Code? What the current docs say

Originally published at https://aicoding-guide.com.

You saw a tip somewhere that typing # at the start of the Claude Code prompt appends what you type to CLAUDE.md. You tried it, and nothing happened. This article explains what the official documentation actually says.

Here is the short answer. As of September 11, 2026, the official documentation contains no description of # as a special input. The documented ways to add to CLAUDE.md during a session are the /memory command, asking Claude in plain language, and auto memory.

Key point
What you will learn

  • How # is treated in the current docs, and which pages were checked
  • The three documented ways to add content to CLAUDE.md
  • Why "remember this" does not end up in CLAUDE.md

The docs list five input prefixes, and # is not one of them

The interactive mode reference has a "Quick commands" table listing characters that carry special meaning in the prompt. These are the five entries.

Input Meaning What it does
/ (at start) Command or skill Opens the list of built-in commands and skills
! (at start) Shell mode Runs a command directly and adds its output to the session
@ File path mention Triggers file path autocomplete and pulls the file into context
: Emoji shortcode Inserts an emoji from a :name: shortcode
? (on empty input) Help panel Toggles the keyboard shortcut help panel

There is no # row. The commands reference, the memory page, and the best practices page were checked as well, and none of them describes # as an append shortcut.

Whether it ever existed is not something we can confirm
Whether # worked in an earlier version, or whether the tip confuses Claude Code with another product, could not be confirmed in the official documentation. This article sticks to the verifiable fact that the current docs do not mention it. If it happens to work in your installation, treat that as behavior specific to your version.

Three documented ways to add to CLAUDE.md

1. Open the file with /memory

Running /memory in a session lists your memory file locations, including CLAUDE.md and CLAUDE.local.md, and includes entries for files that do not exist yet. Selecting a row opens it in your editor, creating it first if needed.

/memory
Enter fullscreen mode Exit fullscreen mode

GUI editors such as VS Code open the file in a separate window, so you can keep using the session while it is open. Terminal editors such as Vim take over the terminal until you exit.

2. Ask Claude in plain language

This takes the fewest keystrokes. The documentation says that to add instructions to CLAUDE.md, you should ask Claude directly, like "add this to CLAUDE.md", or edit the file yourself via /memory.

Add the rule we just agreed on to CLAUDE.md: run tests with pnpm test, not npm test.
Enter fullscreen mode Exit fullscreen mode

CLAUDE.md is an ordinary Markdown file, so Claude appends to it with its edit tool. Name the section you want it under if placement matters to you.

3. Let auto memory handle it

Auto memory is the mechanism by which Claude writes notes for itself. It is on by default, and files live in ~/.claude/projects/<project>/memory/, with a MEMORY.md index plus one file per topic.

Why "remember this" never lands in CLAUDE.md

This is the part that trips people up. When you ask Claude to remember something, such as "always use pnpm, not npm", that note goes into auto memory, not CLAUDE.md. That is why the file looks unchanged afterwards.

The two systems divide up as follows.

CLAUDE.md Auto memory
Who writes it You Claude
What it holds Instructions and rules Learnings and patterns
Scope Project, user, or org Per repository, machine-local
Loaded into Every session Every session (first 200 lines or 25KB of MEMORY.md)

Rules your team needs go in CLAUDE.md and get committed to version control. Auto memory is machine-local and is not shared across machines or cloud environments, so a shared convention parked there only ever helps you. See Turn off Claude Code auto memory or move it for the settings that control it.

Check that what you added is actually loaded

Appending to a file does not guarantee the session loads it. The command that shows you is /context, not /memory.

/context
Enter fullscreen mode Exit fullscreen mode

Look for the Memory files list in the output. If your file is not there, Claude cannot see it. To check whether your file is in a location that gets loaded, see How to write CLAUDE.md: the three levels and a ready-to-use template. Files in subdirectories load on a different schedule, covered in When does Claude Code load a CLAUDE.md in a subdirectory?.

If you have no CLAUDE.md yet, /init generates a first draft from your project structure. See What Claude Code's /init puts in CLAUDE.md, and what to change afterwards.

Summary

  • The current official documentation does not describe # as a shortcut for appending to CLAUDE.md
  • The documented input prefixes are /, !, @, :, and ?
  • To append mid-session, open the file with /memory or ask Claude to "add this to CLAUDE.md"
  • Asking Claude to "remember this" writes to auto memory, which stays machine-local
  • Confirm the result with /context and check the Memory files list

Top comments (0)