# claude-mem | Alex Newman | Knowledge Base | Instagit

A Claude Code plugin that automatically captures everything Claude does during your coding sessions, compresses it with AI (using Claude's agent-sdk), and injects relevant context back into future sessions.

GitHub Stars: 28.4k

Repository: https://github.com/thedotmack/claude-mem

---

## Articles

### [Claude-Mem Session Import and Export Data Flow: A Complete Technical Guide](/thedotmack/claude-mem/claude-mem-data-flow-import-export-sessions)

Explore the Claude-Mem session import export data flow. Learn how worker HTTP APIs query SQLite via TypeScript CLI scripts for seamless backups and migrations. Understand the technical process.

- Tags: how-to-guide
- Published: 2026-02-19

### [How Claude-Mem Context Injection Selects Observations for AI Prompts](/thedotmack/claude-mem/claude-mem-context-injection-observation-selection-prompts)

Discover how Claude-Mem context injection selects observations for AI prompts by filtering SQLite records with whitelists, recency, and count for efficient prompt generation.

- Tags: deep-dive
- Published: 2026-02-19

### [How Claude-Mem Health Monitoring Detects and Recovers From Worker Failures](/thedotmack/claude-mem/claude-mem-health-monitoring-detect-recover-worker-failures)

Discover how Claude-Mem health monitoring uses PID files, health probes, and version checks to detect and recover from worker failures, ensuring system reliability.

- Tags: internals
- Published: 2026-02-16

### [How to Extend the Claude-Mem Database Schema with New Migrations](/thedotmack/claude-mem/claude-mem-extend-database-schema-new-migrations)

Extend the Claude-Mem database schema safely with new migrations. Learn how to create, register, and record migration versions for your project at thedotmack/claude-mem.

- Tags: how-to-guide
- Published: 2026-02-16

### [How Claude-Mem Handles Version Mismatch Between Plugin and Worker Service](/thedotmack/claude-mem/claude-mem-handle-version-mismatches-plugin-worker)

Claude-Mem automatically detects and resolves version mismatches between its VS Code plugin and worker service by comparing package versions and initiating a restart.

- Tags: internals
- Published: 2026-02-16

### [How CursorHooksInstaller Integrates Claude-Mem Memory with the Cursor IDE](/thedotmack/claude-mem/claude-mem-cursorhooksinstaller-integrate-cursor-ide)

Discover how CursorHooksInstaller integrates Claude-Mem memory into the Cursor IDE. Learn about MCP server configurations, CLI hooks, and auto-updating context files for session data.

- Tags: how-to-guide
- Published: 2026-02-16

### [Claude-Mem Graceful Shutdown: A Multi-Step Strategy to Prevent Data Loss During Restarts](/thedotmack/claude-mem/claude-mem-graceful-shutdown-prevent-data-loss)

Discover Claude-Mem's 8-step graceful shutdown strategy. Learn how it prevents data loss by closing connections flush sessions write databases and terminate processes before exiting.

- Tags: how-to-guide
- Published: 2026-02-16

### [How the Pagination Helper Optimizes Large Result Sets in Claude-Mem](/thedotmack/claude-mem/claude-mem-pagination-helper-optimize-large-results)

Discover how the Pagination Helper optimizes large result sets in Claude-Mem. Learn its LIMIT + 1 fetch strategy and constant-time database work for efficient SQLite tables.

- Tags: deep-dive
- Published: 2026-02-16

### [How to Configure Custom AI Providers (Gemini, OpenRouter) in Claude-Mem](/thedotmack/claude-mem/claude-mem-configure-custom-ai-providers-gemini-openrouter)

Easily configure custom AI providers like Gemini and OpenRouter in Claude-Mem. Set your provider and API keys in settings.json for a personalized AI experience.

- Tags: how-to-guide
- Published: 2026-02-16

### [How ModeManager Loads and Applies Different Operational Modes in Claude-Mem](/thedotmack/claude-mem/claude-mem-modemanager-load-apply-operational-modes)

Discover how Claude-Mem's ModeManager loads and applies operational modes by resolving inheritance and merging configurations for context-aware prompt generation.

- Tags: internals
- Published: 2026-02-16

### [How ChromaServerManager Handles Vector Database Initialization and Connection Pooling in Claude-Mem](/thedotmack/claude-mem/claude-mem-chromaservermanager-vector-db-initialization-pooling)

Discover how ChromaServerManager initializes vector databases and manages connection pooling in Claude-Mem using a singleton pattern and keep-alive sockets.

- Tags: internals
- Published: 2026-02-16

### [SSEBroadcaster for Real-Time UI Updates: Architecture and Implementation in Claude-Mem](/thedotmack/claude-mem/claude-mem-ssebroadcaster-architecture-real-time-ui)

Discover the SSEBroadcaster architecture in Claude-Mem for real-time UI updates. Learn how it efficiently broadcasts JSON payloads to synchronize UIs instantly without polling.

- Tags: architecture
- Published: 2026-02-16

### [Retry Logic and Stale Message Recovery in Claude-Mem's PendingMessageStore](/thedotmack/claude-mem/claude-mem-pendingmessagestore-retry-stale-message-logic)

Discover Claude-Mem's retry logic and stale message recovery for reliable SQLite message queue processing. Learn about configurable limits and automatic detection.

- Tags: internals
- Published: 2026-02-16

### [How the Event-Driven SessionManager Handles Session Lifecycle Events and Message Queuing in Claude-mem](/thedotmack/claude-mem/claude-mem-sessionmanager-event-driven-handling)

Learn how the event-driven SessionManager in claude-mem handles session lifecycle events and zero-latency message queuing. Discover how it persists data and wakes async generators for real-time processing.

- Tags: internals
- Published: 2026-02-16

### [Database Schema for Full-Text Search Using FTS5 in Claude-Mem](/thedotmack/claude-mem/claude-mem-database-schema-fts5-full-text-search)

Explore the Claude-Mem database schema for FTS5 full-text search. Discover how three mirrored FTS5 virtual tables enable fast O(log N) keyword lookups for efficient searching.

- Tags: internals
- Published: 2026-02-16

### [How to Implement New MCP Tools in the Claude-Mem Plugin Framework](/thedotmack/claude-mem/claude-mem-implement-new-mcp-tools-plugin-framework)

Learn to implement new MCP tools in the Claude-Mem plugin framework. Define tool schemas and create HTTP endpoints to handle your tool's business logic.

- Tags: how-to-guide
- Published: 2026-02-16

### [How SearchOrchestrator Coordinates Multi-Strategy Search in Claude-Mem](/thedotmack/claude-mem/claude-mem-searchorchestrator-coordination-search-strategies)

Discover how SearchOrchestrator coordinates multi-strategy search in Claude-Mem, intelligently routing queries to SQLite Chroma or Hybrid search for optimal performance.

- Tags: deep-dive
- Published: 2026-02-16

### [How Claude-Mem's Lifecycle Hooks Capture and Store Observations: A Deep Dive](/thedotmack/claude-mem/claude-mem-lifecycle-hooks-capture-store-observations)

Discover how Claude-Mem's lifecycle hooks capture and store observations. Learn about session initialization, prompt forwarding, and atomic SQLite transactions for efficient memory management in thedotmack/claude-mem.

- Tags: deep-dive
- Published: 2026-02-16

### [Claude-Mem Private Tag Stripping: How It Implements User-Controlled Privacy](/thedotmack/claude-mem/claude-mem-privacy-control-private-tag-stripping)

Learn how Claude-Mem uses <private> tag stripping at the hook layer to give you full control over data privacy, preventing sensitive content from ever reaching storage.

- Tags: security
- Published: 2026-02-16

### [Session Auto-Recovery Mechanism in Claude Code: Runtime and Startup Protection](/thedotmack/claude-mem/claude-mem-session-auto-recovery-crashed-processes)

Discover Claude Code's session auto-recovery mechanism. Learn how it restarts crashed generators with exponential back-off and recovers pending work on startup to prevent message loss.

- Tags: internals
- Published: 2026-02-16

### [Claude-Mem 3-Layer Progressive Disclosure Workflow: Implementation Guide](/thedotmack/claude-mem/claude-mem-3-layer-progressive-disclosure-workflow-implementation)

Implement Claude-Mem's 3-layer progressive disclosure workflow and cut token usage by 90%. Discover lightweight search indexing, timeline expansion, and batched retrieval for efficient Claude integration.

- Tags: how-to-guide
- Published: 2026-02-16

### [How Claude-Mem Combines SQLite FTS5 and Chroma Vector Embeddings for Hybrid Search](/thedotmack/claude-mem/claude-mem-hybrid-search-sqlite-fts5-chroma-vector-embeddings)

Discover how Claude-Mem merges SQLite FTS5 metadata filtering with Chroma vector embeddings for powerful hybrid search. Learn its four-step algorithm for precise, contextually relevant results.

- Tags: how-to-guide
- Published: 2026-02-16

### [How WorkerService Handles Background Initialization Without Blocking HTTP Requests in Claude-Mem](/thedotmack/claude-mem/claude-mem-workerservice-background-initialization-non-blocking-http)

Learn how Claude-Mems WorkerService initializes in the background without blocking HTTP requests. Discover its elegant solution for deferred startup.

- Tags: internals
- Published: 2026-02-16

### [How to Set Up thedotmack/claude-mem Locally: Complete Installation Guide](/thedotmack/claude-mem/how-to-setup-thedotmack-claude-mem-locally)

Install thedotmackclaude-mem locally with our complete guide. Follow simple steps to run npm install and start the daemon on port 37777 for seamless local development.

- Tags: getting-started
- Published: 2026-02-16

### [Main Entry Point for thedotmack/claude-mem: Architecture and Execution Guide](/thedotmack/claude-mem/where-is-main-entry-point-for-thedotmack-claude-mem)

Discover the main entry point for thedotmack/claude-mem at src/services/worker-service.ts. Learn how the async main function orchestrates initialization for the Claude-Mem project.

- Tags: architecture
- Published: 2026-02-16

### [What Programming Language Is thedotmack/claude-mem Written In?](/thedotmack/claude-mem/what-programming-language-is-thedotmack-claude-mem-written-in)

Discover the programming language behind thedotmack/claude-mem. This project is primarily written in TypeScript, compiling to ES2022 for Node.js and Bun runtimes. Learn more.

- Tags: getting-started
- Published: 2026-02-16

### [How to Run Tests in thedotmack/claude-mem: A Complete Guide](/thedotmack/claude-mem/how-to-run-tests-in-thedotmack-claude-mem)

Learn how to run tests in thedotmack/claude-mem. Execute the full Bun test suite with npm run test or target specific layers like sqlite with npm run test:sqlite.

- Tags: how-to-guide
- Published: 2026-02-16

