r/opencodeCLI • u/VShulcz • 16h ago
Cross-agent session memory for opencode (SQLite + Claude Code/Codex/Cursor in one 477-token MCP tool)
I built an opencode plugin and local Go index (deja-vu, MIT) so opencode searches its own SQLite alongside Claude Code, Codex, Cursor, Gemini CLI, and 47 other harnesses on the same machine without a background daemon.
Install directly into opencode:
opencode plugin add opencode-dejaWhen benchmarking 7 memory tools against 19,195 real transcripts already on disk, deja-vu cold-built in 13.6 s (vs 3m 56s for agentsview and ~3 h for MemPalace) and loads 1 stdio MCP tool at 477 schema tokens (vs 8,183 across 45 tools in MemPalace or 2,307 across 15 in claude-mem). On interleaved opencode runs in a 329-file Go repo, median spend fell from 103,443 to 52,815 tokens and 7.1 vs 17.8 tool calls (53,558 vs 126,222 overall in Study 1).
Caveat: noisy recall raised average spend in a control run (124,960 vs 119,140), and pure lexical matching drops to 43.3% hit@1 on keyword-free preference paraphrases vs 88.9% overall on LongMemEval-S 470q unless optional deja embed is on.
Source, CLI installer, and Windows winget/scoop commands are in the repo: https://github.com/vshulcz/deja-vu
2
u/songokussm 10h ago
Very interested. I have tried about 20 memory tools and when testing their usage was much higher then just using md files.
My current system is a set of 8 md files. Each one gives the model the current status of the app. Like how it's written, how to test, how major parts work, what not to change, etc. there is an archive folder for milestones and past work that is not accessed but default and only when requested.
How does your to solve the usage issue and how is it better then just using md files?