use cases
Give your coding agent persistent memory with dig
Wire dig into Claude Code, Codex, or any MCP agent so it remembers across sessions — finished sessions are captured automatically and recalled on demand, locally and reversibly.
Your coding agent forgets everything between sessions. dig makes the last session — and every one before it — recallable.
The loop
- Work a session in Claude Code (or Codex, Cursor, any MCP agent).
- It gets captured. The Claude Code plugin ships a
SessionEndhook that renders the finished session and runsdig retaininto a localmemory/knowledge base (double opt-in:DIG_RETAIN_SESSIONS=1and a.digKB at the session directory). - Recall it later. Next session, the agent calls
dig_recalland gets a token-budgeted, provenance-tagged pack of what it knew about the topic — no window overflow.
# the hook does this for you; you can also do it by hand
dig retain --transcript session.jsonl
dig recall "where did we leave the migration" --budget 2000
Why dig for this
- Local. Memory never leaves your machine; zero network calls without a configured model.
- Reversible. Every capture is journaled — audit it, or
dig undo. - Harness-agnostic. The same memory is reachable from every agent over MCP, the daemon, or the AI SDK tools.
Set it up
- Install dig.
- Add the Claude Code plugin (or register
dig mcpin your client). dig inita directory to hold the memory, and setDIG_RETAIN_SESSIONS=1.