agent-dreaming
A nightly memory review for Claude Code, Codex CLI and Antigravity (Gemini CLI's sessions are
read too).
Agents that remember things also remember wrong things: a guess stored as a fact, two retellings of one fact, a note
about a project that ended a month ago. agent-dreaming compares what your agents stored with what you actually said
to them, and once a day asks you a handful of short questions about it. The nightly pass only reads and writes
nothing outside ~/.dreaming. Memory changes only through the memory tools your agent already has: a technical fact
the agent has checked itself (a version, a path, a config), a duplicate that adds nothing, and everything else only
when you answer.

It has three parts:
- The pass (
dreamem run) is deterministic: no model, no network, a few seconds. It reads your Claude Code
transcripts, Codex, Antigravity and Gemini CLI sessions, the facts of
holographic-memory or of the reference MCP memory server,
and Claude Code's own memory notes (subagents' too), and writes its questions under ~/.dreaming. Nothing else.
- The summary: in Codex and Antigravity the next session starts with one line — "Dreaming 2026-10-30: 3 memory
questions wait…" — counts only, never the text of a fact. Claude Code has no such line since 0.8.0 (see
Limits): ask for the review, or look at
dreamem status.
- The review (
/agent-dreaming:dream in Claude Code, $dreaming in Codex, the skill dreaming in Antigravity):
the agent first closes what a read-only check settles — a version, a path, a config, the state of a server, a
duplicate that adds nothing — and says what it checked; it puts the rest to you one at a time, carries out exactly
your answers, and ends with a short summary of what it closed, merged and left to you.
How a night and a review go

- A session starts (Codex, Antigravity). Two hooks run. The quick one prints the summary line of the last finished night, once a
day (again the same day only when a newer night is there). The background one runs
dreamem run --if-due: if no
pass succeeded today and it is past your dream_time, the pass runs while you work. Nothing runs while no agent
is open; a hook that fails prints nothing and never breaks a session. In Claude Code a daily task of the
computer runs the same dreamem run --if-due instead (dreamem install claude-code sets it up).
- The pass takes a lock, reads the last 30 days of your messages, screens them (below), compares them with the
facts and notes, and publishes the night in one step:
questions.json, report.md and summary.json. A pass
killed half-way leaves the previous night whole.
- The review. When you say "dream" (or start the skill), the agent runs
dreamem show and asks the first
question in your language, quoting the texts whole. Up to 7 questions a session; the rest wait. Before that it
closes the technical ones itself (dreamem decide … --verified "what it checked"): see
What the agent closes itself.
- Your answer is recorded with
dreamem decide. Most answers print one memory call — memory_end,
memory_change, memory_merge… — and the agent first checks with memory_stats that this session talks to the
same store the night read. Then it makes exactly that call and reports back with dreamem applied (or
dreamem failed, and the question comes back with the current text). An answer about a Claude Code note prints
an edit instead: the agent runs dreamem verify (is the file still the one you were shown?) and only then
changes or deletes the note with its file tools.
- Next night, an unanswered question is asked again; an answered one rests.
Examples
What you say in a Claude Code session, and what follows: