Tools: CCM Plugin: Claude Code Memory Management

Tools: CCM Plugin: Claude Code Memory Management

Source: Dev.to

CCM Plugin: Session Memory for Claude Code That Works Everywhere ## The Evolution ## From Per-Project to Universal Plugin ## Core Features ## What Could Be Better: Two Things ## 1. Auto-Display on Session Start ## 2. Vector Database Storage ## The Bottom Line ## ClaudeCode #AI #DevTools #Productivity #OpenSource #ClaudeAI #DeveloperExperience #SessionManagement A few weeks ago, I wrote about solving Claude Code's memory problem with a skill/hook/script combination that provided long-term and short-term memory management: AI Memory Problem: Long-term and Short-term Memory with Hooks and Skills That solution worked perfectly—automatic session summaries, context loading on startup, searchable history. But it had one significant limitation: it was per-project. Every project needed its own copy of the scripts, hooks, and skills in its .claude directory. Update a feature? Copy it to 10+ projects. Fix a bug? Update everywhere manually. New project? Copy the whole setup again. That's when I realized: This should be a plugin, not a collection of per-project scripts. The transformation was about making the same solution work generically across all projects: Before (per-project approach): The plugin maintains the same context-aware storage philosophy—sessions are saved to project-specific directories (.claude/sessions/) when you're in a project, or to global storage (~/.claude/sessions/) otherwise. It just detects the context automatically now. For detailed setup and configuration, see the GitHub repo README.md and QA.md. The original design: when you start a new Claude Code session, you immediately see the previous session summary—what you worked on, where you left off, what's next. Current state: Partially works. The summary loads into Claude's context, but Claude doesn't always display it automatically. It worked perfectly with per-project scripts, but became inconsistent after moving to the plugin architecture. According to official docs, SessionStart hooks don't support direct user output. But it worked before the migration. The plugin system is still maturing, and I suspect the hooks API is evolving. My current workaround uses instructions to tell Claude to display the summary, but it's not 100% reliable. Current implementation: Sessions are JSONL files, summaries are Markdown, search uses grep. Potential improvement: Why I haven't done it yet: The current solution works well enough. File-based storage is simple, debuggable, and version-controllable. Token usage hasn't been a bottleneck. I'll revisit if it becomes a problem, but for now, YAGNI (You Aren't Gonna Need It). If you're using Claude Code across multiple projects and want session continuity without manually copying scripts everywhere, CCM might solve your problem. GitHub repo: https://github.com/rexzhen/ccm The repo includes detailed installation instructions, configuration options, troubleshooting guides, and technical implementation details in README.md and QA.md. It's open source. The core functionality—session persistence, AI summaries, automatic context detection—works as designed. The auto-display on session start is the one rough edge, but the plugin delivers what it promises: universal session memory without per-project maintenance. If you figure out how to make SessionStart hooks reliably display output to users in plugin mode, please open an issue. I'd love to close that gap. Do you use Claude Code for multiple projects? How do you handle context continuity across sessions? Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse - Copy scripts/hooks/skills to each project's .claude directory - Maintain multiple copies of the same code - Manual updates across all projects - Single plugin installation in ~/.claude/plugins/ccm/ - Works automatically in all projects - Update once, benefits everywhere - Automatically saves full conversation transcripts on exit - Generates AI-powered summaries (supports Anthropic API and AWS Bedrock) - Loads previous session context on startup - Maintains searchable session history - Context-aware: project-specific or global storage - Configurable limits with automatic cleanup - Smart retention: keeps recent summaries, removes old sessions - /ccm-save - Manual save with custom notes - /ccm-history - Browse and search past sessions - Replace file storage with vector database (ChromaDB, Qdrant, etc.) - Enable semantic search instead of keyword matching - Reduce token usage for context loading - Better relationship mapping between sessions