Skip to content
← Back to the foundry
OSS 02Open source · v0.4.0

deja: memory for AI coding agents

AI coding agents forget everything when a session ends, so they rediscover the same missing env var, flaky import and broken command every week, and you pay for the same tokens each time.

  1. Command fails
  2. Fix recorded
  3. Pinned to file hashes
  4. Recalled at the next failure
0
dependencies · extra model calls

The problem. Claude Code and Codex start every session from zero. The same errors get debugged again and again, and generic memory tools store transcripts rather than the thing you actually need: what fixed it.

What it does. deja hooks into the agent's session. When a command fails and later passes, it records the error and exactly what changed in between. The next time that error appears, in any session or repo, the fix is shown right next to the failure. It also learns the test, build and lint commands that really work in a repo, and briefs the agent at session start.

Never confidently wrong. Every memory is pinned to the content hash of the files it describes. When the code changes, the memory is flagged as possibly stale instead of steering the agent the wrong way.

Light to run. Zero npm dependencies: Node's built-in SQLite with full-text search, no background worker, no port, no vector database and no LLM calls of its own. It adds about 1,100 tokens to a typical session. A data pack records tables and lineage from SQL, PySpark, dbt and Airflow code, and deja ui opens an offline HTML browser of everything it remembers.

Engineering. Works in Claude Code and OpenAI Codex with one shared memory, tested on macOS, Linux and Windows in CI. MIT licensed.

TypeScriptNode.jsSQLite FTS5MCPClaude Code hooksCodex
GitHub ↗