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

Claude Code Published:

You typed # expecting it to append to CLAUDE.md, and nothing happened. Here is what the official docs actually say, and the three documented ways to add to CLAUDE.md.

Verified on Sep 11, 2026 These tools change quickly. Please also check the latest official documentation.
Contents
  1. The docs list five input prefixes, and # is not one of them
  2. Three documented ways to add to CLAUDE.md
    1. 1. Open the file with /memory
    2. 2. Ask Claude in plain language
    3. 3. Let auto memory handle it
  3. Why "remember this" never lands in CLAUDE.md
  4. Check that what you added is actually loaded
  5. Summary

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.

InputMeaningWhat it does
/ (at start)Command or skillOpens the list of built-in commands and skills
! (at start)Shell modeRuns a command directly and adds its output to the session
@File path mentionTriggers file path autocomplete and pulls the file into context
:Emoji shortcodeInserts an emoji from a :name: shortcode
? (on empty input)Help panelToggles 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

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.

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.mdAuto memory
Who writes itYouClaude
What it holdsInstructions and rulesLearnings and patterns
ScopeProject, user, or orgPer repository, machine-local
Loaded intoEvery sessionEvery 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

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

FAQ

What happens when I type # at the start of the prompt in Claude Code?
The current official documentation does not describe # as a special input. The documented prefixes are / for commands, ! for shell mode, @ for file references, : for emoji shortcodes, and ? for the help panel.
How do I append one line to CLAUDE.md mid-session?
Run /memory and pick the file to open it in your editor, or ask Claude directly with something like "add this to CLAUDE.md". Both are documented.
Where does Claude store things I ask it to remember?
In auto memory at ~/.claude/projects/<project>/memory/, not in CLAUDE.md. Say explicitly that you want it in CLAUDE.md if that is where it belongs.

Primary sources

This article was drafted by AI from official documentation and reviewed by the site operator before publishing. Found a mistake? Let us know via the contact page.