A memory system that lets coding agents continue work across sessions
It ends the cycle where an agent re-reads files from scratch and repeats the same mistakes in every new session. Claude-Mem uses a structure where a second agent takes notes while the primary agent works, injecting only the necessary context into the next session. It works with various agents, including Claude Code, Codex, and Cursor, and manages memory automatically after installation without requiring separate operations.
How it maintains memory across sessions
All activity generated when an agent reads files or modifies code is passed to a local worker. An observer agent converts these activities into short observation records and writes a summary when the session ends. When the next session starts, a compressed index of these observation records is injected first, and the system is designed to fetch detailed content only when the agent needs it. This approach reduces token usage while maintaining important context.
Memory search and team sharing features
You can search project history in natural language using the mem-search skill. The search proceeds in three stages: index lookup, timeline review, and detailed information retrieval, selectively loading only the necessary information to improve token efficiency. If you want to share with team members, you can manage task lists and contributors through TeamBrain, while personal notes are kept separately. You can also search this memory in Claude Desktop.
Installation and requirements
It requires Node.js 20.19 or higher, or 22.12 or higher, while Bun and uv are handled automatically during the installation process. Running the npx claude-mem install command detects agents installed on the system and completes the configuration. If you are using Claude Code, you can also install it through the plugin marketplace. Memory is stored by default in the local ~/.claude-mem directory, and cloud synchronization is optional.
Things to check before applying
This tool is distributed under the Apache License 2.0, allowing commercial use. However, memory injection starts from the second session within a project, so it has no effect in the first session. You can run the /learn-codebase command to quickly learn the entire repository. Additionally, content wrapped in <private> tags is not stored, so you should use this feature when handling sensitive information. Usage analytics data collection is enabled by default, so you must run the npx claude-mem telemetry disable command if you want to disable it.