Urgent.News

What's breaking now, across thousands of outlets.

AI

Claude-Mem: Persistent Long-Term Memory for AI Coding Agents

Solving AI Agent Amnesia: Meet Claude-Mem One of the most persistent hurdles in working with command-line AI coding assistants (such as Claude Code, Antigravity CLI, and OpenCode) is context fragmentation across sessions. When a developer ends a terminal session, the agent's working context is wiped clean. The next day, the developer must re-explain architectural decisions, project conventions,…

Claude-Mem tackles the problem of AI coding agents forgetting context between sessions, a significant issue with command-line AI assistants. This open-source tool, developed by thedotmack, monitors developer interactions, compresses crucial insights, and prepares future sessions with relevant context. Claude-Mem works quietly in the background, extracting semantic summaries of key events like bug fixes, architectural decisions, and dependency discoveries.

When an agent starts a new session, it queries its memory database to recall past project history before writing any code.

The tool offers several key features. First, it passively observes five critical stages of a session (SessionStart, UserPromptSubmit, PostToolUse, Stop, and SessionEnd), documenting successes and failures without needing manual input from engineers. Second, it employs a three-layer retrieval system that saves on token usage, returning compact observation IDs and titles, chronological context, and full technical details only when needed.

Claude-Mem uses a hybrid search method combining SQLite FTS5 and Chroma vector databases, allowing for both keyword searches and semantic matching. It also includes a real-time web viewer and privacy controls, enabling developers to inspect, modify, or exclude sensitive information from memory. Lastly, installing Claude-Mem is straightforward, whether through an automated setup command or by adding it to Claude Code's plugin marketplace.

By addressing context fragmentation, Claude-Mem transforms isolated coding sessions into a cohesive, shared intelligence layer for autonomous terminal agents. For a solution to session amnesia, the Claude-Mem GitHub repository is the recommended starting point.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

More from Wednesday 2 September →