Cavemem gives coding assistants persistent memory across sessions and across tools. Hooks fire at session boundaries (session start, prompt submit, post-tool-use, stop, end), redact private content, compress each observation with a deterministic "caveman grammar" (roughly 75% fewer prose tokens while code, URLs, paths, identifiers, and version numbers are preserved byte-for-byte), and write to a local SQLite store with FTS5. Agents then query their own history over MCP with progressive disclosure: search and timeline return compact results, get_observations fetches full bodies on demand. Search is hybrid -- BM25 keyword plus a local vector index blended by a tunable ranker.
It is local by default: no network calls, no cloud, no daemon to manage (a background worker auto-spawns to build embeddings and serve a token-protected read-only web viewer, then self-exits when idle). Privacy controls include tag stripping at the write boundary, path-glob exclusions, and secret-shaped-string redaction; an optional web-enrichment MCP tool is off by default and not even registered until enabled. Memory can be exported and imported as JSONL for cross-machine transfer.
Capture support varies by client: Claude Code, OpenCode, Codex CLI, GitHub Copilot, and Augment Code both capture and query, while Cursor, Gemini CLI, Antigravity, and IBM Bob are query-only (they can search memory captured elsewhere but have no hooks system to write new observations). It is part of the broader "caveman" ecosystem of token-economy tools but stands alone.
