<private> tags to mark content you don’t want persisted in Claude Mem’s observation database. Claude can see and use the content during the current session, but it will never be saved as an observation or stored in any search index.
How it works
Wrap any content in<private> tags:
No configuration required. Private tag stripping is always active.
Use cases
Sensitive credentials or connection details
API keys
Temporary session context
Large debug output
Exploratory notes
What gets filtered
Private content is stripped from every storage path:| Storage path | What happens |
|---|---|
| User prompt storage | Tags stripped before saving to the user_prompts table |
| Tool inputs | Parameters passed to tools are filtered before observation creation |
| Tool responses | Output from tools is filtered before observation creation |
| Search indices | Private content never reaches the database or Chroma embeddings |
What does not get filtered
- Session summaries — generated only from non-private observations
- Claude’s responses — not captured by Claude Mem at all
Tag behavior
| Behavior | Details |
|---|---|
| Multiline | Tags can wrap multiple lines |
| Multiple tags | You can use several <private> sections in one message |
| Nested tags | Inner tags are included in outer tag removal |
| Always active | No configuration or setup needed |
Architecture: edge processing
The<private> tag uses an edge processing pattern — content is filtered before it ever reaches the worker service or database:
UserPromptSubmithook — strips tags from user prompts before saving to theuser_promptstablePostToolUsehook — strips tags from serializedtool_inputandtool_responseJSON before observation creation
The implementation strips tags from the serialized JSON representations of tool inputs and responses, not from the original conversation UI text. Your typed prompt is stored separately in the
user_prompts table, where tags are also stripped before storage.Verifying that tags work
Submit a prompt with<private> content, then check the database directly:
<private> tags themselves should also be absent.
Best practices
- Don’t over-tag — Claude’s understanding of your project builds from observations. Excessive private tagging reduces the quality of future context.
- Use proper secrets management —
<private>prevents storage, but sensitive data like production credentials should still be handled through dedicated secrets tooling. - Check the log if unsure —
~/.claude-mem/silent.logrecords tag-stripping activity and any errors.
Troubleshooting
Tags not being stripped
Tags not being stripped
Partial content stored
Partial content stored
If content appears partially in observations:
- Ensure tags are properly closed with
</private> - Check for typos in the tag name
- Verify the content is inside a tool execution, not only in your prompt text
Silent log shows type errors
Silent log shows type errors
If you see entries like this in This is usually harmless — it indicates defensive type checking is working correctly. If you see it frequently, please report it at github.com/thedotmack/claude-mem/issues.
~/.claude-mem/silent.log:Search tools
Search and retrieve past observations
Configuration
System settings and environment variables