Adding memory to aider

it appends every message to one log and reads none of it back

aider appends every message to a markdown log — ~/.aider.chat.history.md, or whatever $AIDER_CHAT_HISTORY_FILE points at — and that is the whole of what it keeps. A new chat starts from nothing, and nothing in it knows about the Claude Code session in the same repo yesterday. This page is about adding that.

What aider already has

The log, and read-only files. There is no session to resume: --chat-history-file names a transcript aider appends to rather than a conversation it reopens, so there is no id to hand back. There is no MCP client either — there are open requests and an open PR adding one, which is the day this page gains a paragraph — and no catalogue a model picks a skill out of. What aider does have is the useful part: a file passed with --read is re-read from disk on every message, so a file deja keeps current is live context for the whole session.

Adding recall

deja install aider

Three things, all reversible with deja uninstall aider:

  • An entry under read: in ~/.aider.conf.yml, pointing at ~/.config/deja/aider-context.md. Whatever was already in that list stays, including the scalar and flow spellings of it.
  • The context file itself, written during the install rather than on first use: aider refuses to start when a configured read file is missing, and the first session should not be the one that finds that out.
  • The shared skill at ~/.agents/skills/deja-search/SKILL.md, which the other agents on this machine read.

Then start aider through deja, with the arguments you would have given it:

deja aider --model sonnet src/api.py

It refreshes the context file, says what it put there — deja: recalled 7 past sessions into aider's read-only context — and hands over to aider. The wrapper exists because nothing inside aider can do the refresh: /run stops on Add 0.0k tokens of command output to the chat? even when the output is empty, so wiring it to startup would cost a keystroke every session. Plain aider still reads the file; it reads whatever the last deja aider left in it, and that is what deja doctor says on the row for it.

What arrives

A digest of what this machine already knows about the project — the decisions, the commands that worked, the errors that came back — as one read-only file in every message of the session. When there is no history yet the file says so, rather than being absent and stopping aider from starting. What memory costs has the measured comparison.

The part that is not about aider

The index covers every agent's transcripts on the machine — thirty-four of them, each in its own format — so a fix found in Claude Code answers a question asked in aider, including sessions from before any of this was installed. A transcript a client later deletes stays searchable; only deja forget drops one on purpose. Nothing here writes memories, so there is nothing to hallucinate into your history; indexing and search are local, and credentials are stripped as the index is built (privacy).

Getting started · Switching between agents · The aider session format

Found this useful? Star deja-vu on GitHub.