Your coding assistant's goldfish memory, now with rocks
A local SQLite store that compresses session history so Claude, Cursor, and friends can actually remember what you told them last Tuesday.

What it does
cavemem hooks into coding assistants at session boundaries, strips private content, compresses observations with a deterministic “caveman grammar,” and drops everything into local SQLite. Agents query back through three MCP tools — search, timeline, get_observations — with hybrid BM25 + vector ranking. No cloud, no daemon to babysit. A background worker auto-spawns for embeddings and quits when bored.
The interesting bit
The compression is the product. Prose gets squashed to ~75% fewer tokens (“auth mw throws 401 @ session token expires”), but code blocks, paths, and identifiers stay byte-for-byte intact. Round-trip expansion is guaranteed — the stored gibberish rehydrates to readable text for the web viewer at localhost:37777. It’s a deliberately lossy pipe that knows exactly where not to leak.
Key highlights
- Cross-IDE installers for Claude Code, Cursor, Gemini CLI, OpenCode, and Codex — one command each
- Progressive MCP retrieval: compact summaries first, full bodies only on demand via
get_observations - Hybrid search with tunable BM25/vector blend (
search.alpha) - Privacy boundaries:
<private>tags stripped at write time, path globs exclude whole directories - Optional remote embedding providers (Ollama, OpenAI) if local isn’t enough
- Part of a four-repo “Caveman Ecosystem” — output compression, memory, build loops, and a fine-tuned Gemma model
Caveats
- Hook handlers target sub-150ms completion; heavy sessions may stress that budget
- The “caveman grammar” compression is proprietary and not documented beyond examples — you’ll trust the round-trip guarantee or you won’t
- Ecosystem cross-selling is aggressive; each repo stands alone, but the README really wants you to collect all four
Verdict
Worth a look if you bounce between Claude Code and Cursor and want one memory store that follows you. Skip it if you already have a RAG pipeline you like, or if “deterministic gibberish rehydration” sounds like a bug report waiting to happen.
Frequently asked
- What is JuliusBrussee/cavemem?
- A local SQLite store that compresses session history so Claude, Cursor, and friends can actually remember what you told them last Tuesday.
- Is cavemem open source?
- Yes — JuliusBrussee/cavemem is open source, released under the MIT license.
- What language is cavemem written in?
- JuliusBrussee/cavemem is primarily written in TypeScript.
- How popular is cavemem?
- JuliusBrussee/cavemem has 643 stars on GitHub.
- Where can I find cavemem?
- JuliusBrussee/cavemem is on GitHub at https://github.com/JuliusBrussee/cavemem.