🤖 AI Hot

Deja Vu: Open-Source Coding Agent Memory via SSH

A
Alex Chen

Coding agents have a memory problem. Claude Code, Codex, opencode — they are all stateless by default. Every session starts from scratch. You tell an agent about your project structure, your preferences, your coding conventions. It does the work. Tomorrow you open a new session and explain everything again.

Deja Vu is an open-source project that tries to fix this. It indexes your agent conversations, stores them locally, and — in the latest release from July 14, 2026 — syncs them across machines via SSH. No cloud service, no API tokens, no vendor lock-in. Just a binary, a local index, and scp.

I set it up over the weekend. Here is how it works and whether it is worth adding to your workflow.

What Deja Vu Actually Does

Deja Vu sits between you and whatever coding agent you use. It watches the conversation files that agents like Claude Code and Codex write to disk — markdown transcripts, JSONL logs, plain text session records — and builds a searchable index from them.

When you start a new coding session, you can query Deja Vu for context from previous sessions. “What testing framework are we using?” “Show me the last conversation about the authentication module.” “What did we decide about the database schema?” Instead of re-explaining or scrolling through old logs, the agent retrieves the relevant context and picks up where you left off.

The project supports three agent tools right now:

  • Claude Code: reads the .claude session directory
  • Codex (OpenAI): reads Codex’s session logs
  • opencode: reads opencode’s conversation files

Each agent stores its conversations differently — Claude uses markdown in ~/.claude/, Codex uses a structured JSON format, opencode uses plain text. Deja Vu abstracts over these differences and normalizes everything into a uniform embedding-based search index.

The SSH Sync: Memory Without a Server

The July 14 release added something that changes the value proposition: SSH-based sync between machines. Previous versions of Deja Vu were single-machine only. Your laptop remembered your conversations. Your desktop did not.

The SSH sync works like this: Deja Vu exports indexed conversations as batches of JSONL files, redacts any sensitive content (API keys, tokens, personal paths) on the way out, and uses your existing SSH configuration to push them to a remote machine. On the remote machine, a companion deja binary imports them into its local index. Import is idempotent — you can push the same batch multiple times without duplicating entries.

There is no server. There is no cloud. SSH and scp are the only external dependencies. If you already have SSH keys set up between your machines, you already have everything Deja Vu needs for cross-machine sync.

This is a deliberate choice by the maintainer (a developer named vshulcz on GitHub). The README explicitly positions the project against cloud-dependent memory solutions: “Your data stays where you put it. No API keys to manage. No vendor to trust.”

For developers who work across a laptop and a desktop — or a personal machine and a work machine — this means your agent’s memory follows you without touching a third-party server.

How to Set It Up: A Beginner Guide

If you have never set up an agent memory tool before, Deja Vu is about as simple as these things get. The entire setup is three steps and requires no API keys.

Step 1: Install Deja Vu

Clone the repo and build:

git clone https://github.com/vshulcz/deja-vu.git
cd deja-vu
make build

This produces a single deja binary. Put it somewhere on your PATH — ~/.local/bin/deja is the default the SSH sync looks for on remote machines. The build takes about 30 seconds on a modern machine. Go dependency management means there are no system-level dependencies beyond Go itself.

Step 2: Index Your Existing Conversations

Point Deja Vu at your agent directories:

# Index Claude Code conversations
deja index --source claude --path ~/.claude/

# Index Codex conversations
deja index --source codex --path ~/.codex/

# Index opencode conversations
deja index --source opencode --path ~/.opencode/

The indexer is fast — processing a few hundred conversation files takes seconds. It extracts the text, chunks it into searchable segments, generates embeddings using a local model (all-mpnet-base-v2, about 420MB on first download), and stores everything in ~/.dejavu/index.db.

Step 3: Test a Query

deja search "how do we handle authentication"

This returns the most relevant conversation snippets, ranked by semantic similarity. You can pipe the output into your agent’s context or read it directly in the terminal.

Setting Up SSH Sync

The SSH sync requires the deja binary on both machines. On the remote machine, copy the binary to ~/.local/bin/deja (the default lookup path) or to any directory on the remote’s PATH.

Then export your index:

deja export --format jsonl > ~/agent-memory-export.jsonl

And push to a remote machine:

deja sync --host desktop --path ~/agent-memory-export.jsonl

This uses ssh desktop and scp under the hood. The desktop hostname comes from your ~/.ssh/config. If you can ssh desktop successfully, sync works.

On the remote machine, import the batch:

deja import ~/agent-memory-export.jsonl

For ongoing sync, you can wire both the export and import commands into cron. Export hourly from your primary machine, import hourly on your secondary. The idempotent import means duplicate runs are harmless.

What Deja Vu Gets Right

The project makes three design choices that more ambitious tools often miss:

Local-first by default. The index lives on your filesystem. The embeddings are computed locally. There is no API endpoint to call, no service to authenticate against. This means zero latency for queries and zero dependency on external infrastructure.

SSH as the sync primitive. SSH is the most battle-tested secure transport protocol in computing. Using it instead of building a custom sync service means Deja Vu inherits decades of security hardening for free. Your data is encrypted in transit using your existing SSH keys. No new attack surface, no new credentials to manage.

Agent-agnostic design. Deja Vu does not care which coding agent you use. It reads whatever conversation format the agent writes to disk and normalizes it. If a new agent appears next month, adding support is a matter of writing a new parser — the search and sync infrastructure stays the same. This matters because the coding agent space is fragmenting rapidly. Claude Code, Codex, opencode, Aider, Continue, Cursor Agent — nobody knows which tools will survive. Betting on a single agent’s ecosystem is risky. Betting on a shared memory layer that works across agents is safer.

The Limitations You Should Know About

Deja Vu is a young project. The GitHub repo has a single maintainer, fewer than 200 stars, and sparse documentation beyond the README. The release cadence is irregular — the gap between the initial release and the July 14 SSH update was several months.

The embedding model (all-mpnet-base-v2) is solid for English text but does not handle code-specific semantics well. If you ask “how do we handle database connections,” it will find conversations about databases. But it will not distinguish between “we use SQLAlchemy with async sessions” and “we use raw psycopg2 with connection pooling” unless those exact phrases appear in the conversation. The retrieval is semantic but not code-aware.

The redaction of sensitive content on export is basic: it strips patterns that look like API keys and tokens, but it will miss anything that does not match the regex. If your conversations contain proprietary code or business logic, the redaction will not catch it. The README acknowledges this and recommends treating exported batches as sensitive data.

SSH sync also means you are responsible for key management. If you lose your SSH key or your remote machine is compromised, your agent memory is exposed. Cloud-backed alternatives like claude-mem handle key rotation and access control automatically. Deja Vu pushes that responsibility to you.

How It Compares to Alternatives

There are several agent memory projects emerging, each with a different philosophy:

  • claude-mem (cmem.ai): A cloud-based memory service that takes notes during agent sessions and syncs them via a private MCP link. More polished, better documentation, but your data lives on their servers
  • Duet (duet.so): A shared workspace for multiple agents that self-organizes and can pull fresh data on schedule. Broader scope — it is more of a workspace platform than a memory layer
  • Custom MCP servers: Some developers build their own MCP servers that hook into their agent’s context. Fully customizable but requires ongoing maintenance

Deja Vu is the most minimalist of the bunch. It does one thing — index and search agent conversations — and does it without external dependencies. For developers who value simplicity and data control over features and polish, it is the right tradeoff. For teams that need collaboration features, access control, or admin dashboards, claude-mem or Duet are better fits.

Who Should Use Deja Vu

Deja Vu makes sense for individual developers who:

  • Use coding agents regularly and are tired of re-explaining context
  • Work across multiple machines and want their agent memory to follow them
  • Care about keeping their data local and avoiding cloud services
  • Are comfortable with terminal tools and SSH configuration
  • Do not need team collaboration features

It does not make sense for:

  • Teams that need shared agent memory with access control
  • Developers who only use a single machine and do not need cross-device sync
  • Anyone who wants a polished GUI or managed service
  • Enterprise environments with compliance requirements that a one-maintainer open-source project cannot meet

The Bottom Line

Deja Vu solves a real problem with a design philosophy I want more tools to adopt: local-first, SSH for transport, no cloud dependency. The execution is early-stage — the documentation is thin, the codebase is small, and the feature set is narrow. But the core idea is sound, and the SSH sync in the July 14 release moves it from “interesting experiment” to “tool I might actually use daily.”

If you use Claude Code or Codex regularly and find yourself pasting the same context into every session, spend the 30 minutes to set Deja Vu up. The time you save in the first week of not re-explaining your project will pay for the setup time several times over. Whether the project survives long-term depends on the maintainer’s stamina and whether the community contributes — but the concept it proves (agent memory without a cloud service) is going to stick around regardless.

Sources

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen