dream-pass
Reviewed
at commit 465d8d4
New version, not yet reviewed
A dreaming pass over Claude's memory folder: merges duplicates, rewrites stale entries, removes dead ones and tidies MEMORY.md, with a backup and undo
0 upvotes
Log in to upvote or save- Made by
- Ray Amjad
- Pinned commit
-
465d8d43ae7a4de21f3d3ed51e57958a3e54e7e6 - What we checked
-
Tidies Claude's memory folder: it merges duplicates, rewrites stale entries, removes dead ones and rewrites MEMORY.md, using extra Claude requests on your own account. It runs on /dream, every 20 turns behind a Haiku check, and before compaction, and it also reads what you typed in your last few sessions to settle conflicts. Each run first copies the folder to .dream-backup, and /dream undo restores it.
Review details
Static review of the source at the pinned commit; not run. Registers session.start (registers /dream), turn.complete (every N turns: free index checks, then a Haiku gate via $.model.complete), session.compact (starts a dream before compaction, never delays it), command.run (/dream, undo, where, show), tool.call for Write and Edit (denies Claude's own writes inside the memory folder only while a dream is running) and ui.render (band above the prompt with Open, Undo, Hide, and a pane). A dream reads every .md file in the memory folder (the memoryDir option, DREAM_PASS_MEMORY_DIR, the autoMemoryDirectory setting, else ~/.claude/projects/<project>/memory) and, from the neighbouring session transcripts (*.jsonl), only the user-typed lines of up to 10 origin sessions and the 5 most recent sessions (400 characters per line, 1500 per session), and sends them to a $.model.fork or $.model.complete on the user's account. The JSON reply is filtered: only plain file names ending in .md inside the folder, existing files for rewrites and removals, new files for additions. Writes use $.fs.write; deletions and renames use rm -f and mv, and on Windows fixed PowerShell scripts with paths passed through environment variables; grep -E or PowerShell reads the transcripts, kill -0 checks Claude Code's auto-dream lock. Backups and a DREAM.md log are written under .dream-backup/<timestamp>. Memory files and transcripts are marked as data in the prompt. Model-written memory text is applied as returned, so a poor consolidation is possible but undoable. No network calls besides the model, no npm dependencies.
- What it uses
-
- Reads your prompts: no
- Sees tool calls: yes
- Blocks or changes tool calls: yes
- Reads or writes files: yes
- Runs programs on your machine: yes
- Calls the model (uses tokens): yes
- Sends data over the network: no
- Stores data: yes
- Shows something on screen: yes
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/dream-pass/)