[BUG] # Memory Mode not intercepted in Claude Code CLI (iTerm)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
I'm currently in the Anthropic Partner Basecamp and going through the steps in https://claude-code-workshop.netlify.app/
In the course content, there is a section that states:
Three ways to edit the CLAUDE.md file Method 1 — Use # Memory Mode (recommended) Press # at the prompt to enter Memory Mode. This lets you write directly to CLAUDE.md without consuming any tokens — Claude doesn't need to process the request. # Always document non-obvious logic changes with comments
Environment
- OS: macOS (Darwin kernel 25.3.0)
- Terminal: iTerm2
- Claude Code version: 2.1.116
- Interface: CLI (launched via claude in terminal)
Expected behavior
Typing or pasting a message prefixed with # at the Claude Code prompt should enter Memory Mode — writing directly to CLAUDE.md without sending the input to the model or consuming tokens.
Actual behavior
The #-prefixed input is passed through to the model as a regular message. The model processes it, consumes tokens, and responds — treating it as a normal prompt.
Observed result: All three variants are received and processed by the model as normal prompts.
What Should Happen?
Expected result: Claude Code CLI intercepts the # prefix and writes the content directly to CLAUDE.md without invoking the model.
Error Messages/Logs
Steps to Reproduce
- Open iTerm2 on macOS and launch Claude Code with claude
- Navigate to a project with a CLAUDE.md file
- At the Claude Code prompt, try each of the following:
- Paste # Always document non-obvious logic changes with comments via Cmd+V
- Type # Always document non-obvious logic changes with comments manually
- Type #Always document non-obvious logic changes with comments (no space)
- Press Enter after each attempt
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.116
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
https://github.com/beck-source/inventory-management - for the app that we're working on in training.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗