What /clear keeps and what it drops
Anthropic's docs describe /clear as a new conversation with empty context, while project memory is kept. The conversation goes, but the CLAUDE.md files stay on disk and load when a session starts.
/compact is the option when you want to stay on the same task: it summarizes the conversation instead of dropping it, and the project-root CLAUDE.md is read again afterwards. To go back to an old conversation, /resume opens it again.
Write the repo map once
/init analyzes the codebase and writes a CLAUDE.md with build commands, test instructions and conventions. If the file exists, it suggests improvements instead of overwriting it.
Keep it short and specific. Anthropic writes that files over 200 lines use more context and may reduce how well instructions are followed, and that “run npm test before committing” works better than “test your changes”.
Save the state before you clear
What CLAUDE.md does not cover is where you are right now. Ask Claude to write a short STATE.md before /clear:
- what is done
- what the next step is
- what was decided, and why
- open questions and the files they touch
Why a new session already uses a lot
/context shows what fills the context as a colored grid: the system prompt, tools, MCP servers and memory files like CLAUDE.md. Files you import in CLAUDE.md load together with it.
MCP tools load when they are needed, but their names and server instructions count from the start. Turn off servers you do not use with /mcp.
Questions people ask
Does /clear delete CLAUDE.md?
No. /clear empties the conversation, but CLAUDE.md is a file on disk, and Anthropic writes that project memory is kept. What goes is what you only said in the chat.
What is the difference between /clear and /compact in Claude Code?
/clear starts a new conversation with empty context. /compact summarizes the conversation so far to free up space, so you can stay on the same task. After /compact, the project-root CLAUDE.md is read again.
Why does Claude Code start with so much context already used?
The system prompt, the tools, the MCP servers and CLAUDE.md with what it imports are in the context before you type anything. Run /context to see the breakdown, and turn off MCP servers you do not use with /mcp.
In Marshi
In Marshi, the project remembers for you
Marshi does not run inside your repo. In Marshi, a project keeps its goal, decisions and next steps once you press Save, and Claude Code can connect to the project over MCP and read it.
- Decisions stay on the project. Marshi shows the goal, what was decided and the next steps on a card, and every new chat in the project starts from them once you press Save.
- Your coding tool reads the same project. Claude Code can connect to the project and read its brand, the project and the decisions saved there, so you do not paste them in.

