Adding memory to Goose
.goosehints is what you wrote; the sessions are what happened
Goose keeps every session in a local database under its data directory and can reopen one. What it reads at the start of a new session is .goosehints — a file you maintain by hand — and nothing else: not last week's session, and not the one in Claude Code or Codex where the same problem was already solved on this machine. This page is about adding that.
What Goose already has
Two ways to put text in front of the model, and deja uses both. .goosehints is read into the system prompt when a session starts. MOIM — with GOOSE_MOIM_MESSAGE_FILE set — is a file re-read on every turn and injected as a <turn-context> block, which also survives compaction. MOIM is environment-only; config.yaml is not consulted, so only a wrapper can turn it on.
Adding recall
deja install goose-auto
That adds deja to the extensions block of config.yaml as an MCP server, so the model can call the deja tool itself — search past sessions, read one in full, see a file's history, ask what fixed an error, ask how a command is really run here, store a decision, and a SessionStart hook that refreshes .goosehints with this machine's relevant history before Goose reads it — the same session sees the new content. config.yaml is edited textually rather than round-tripped through a YAML library: it holds provider settings you wrote by hand, and re-serialising would drop your comments and ordering.
For recall on every turn, start Goose through the wrapper:
deja goose
It sets the MOIM file and launches Goose; each turn the block says whether this machine's history answers the prompt, and after compaction the block is still there. Without the wrapper you keep the session-start half and the tools.
What arrives
At session start, a digest of what this machine has done on the project — decisions, the commands that worked, the errors that recurred. On each turn under the wrapper, the history the prompt is actually about, when there is any; silence is the common case. An injection is capped at about 1.5 KB per prompt and 4 KB per tool call — what memory costs has the measured comparison.
The part that is not about Goose
The index covers every agent's transcripts on the machine — twenty-two of them, each in its own format — so a fix found in Claude Code answers a question asked in Goose, 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 Goose session format