Get it for macOS

Keep every Claude Code project's memory consolidated overnight, as Claude Code's own auto-dream would if it ran in bb. Each dream is a hidden thread that can read anything but write only that project's memory files, and a project's first dream is a dry run you review as a diff, then apply or discard. The memory is backed up before every change, and the Dream page shows each project's memory, why it is or is not due, the dry runs waiting for you and the history of dreams. The schedule is off until you turn it on. Each dream is one model run on your Claude Code account; requires bb 0.49 or later, macOS or Linux, and Claude Code signed in on the machine dreams run on.


Overview

View source

Auto-dream never runs in bb, because bb runs Claude Code as SDK sessions; Dream runs the same four-phase pass from bb, for every project with a checkout on the machine you choose.

The schedule ships off. Nothing dreams until you turn it on in the plugin's settings.

What a dream does

Each dream is a hidden Claude Code thread given Claude Code's dream prompt: orient, gather recent signal, consolidate, and prune and index, keeping MEMORY.md an index under 200 lines and about 25 KB. It also follows Claude Code's rules for memories that contradict CLAUDE.md: it deletes or rewrites what CLAUDE.md supersedes, annotates and reports what looks newer, and never edits CLAUDE.md or AGENTS.md. The thread is stopped and archived when it ends, and its summary goes into the Dream page's history.

  • The thread can read anything, but may write only .md files in that project's memory folder. Its shell is limited to ls, find, grep, cat, stat, wc, head and tail, plus rm -f of memory files. Anything else is denied without asking.
  • A project's first dream is a dry run on a copy. You apply its proposal or discard it; after that, dreams edit in place, or stay dry runs for every dream with the Always dry run setting.
  • The memory folder is backed up before every change, the 20 newest kept per project, and any backup can be restored.
  • It checks memories against the newest copy of the project's main branch your repository already has, not a checkout that may be months old, without fetching or touching the checkout.
  • When it deletes or renames a memory it fixes the links to it, and any link it leaves pointing at nothing is listed with the run.
  • It uses Claude Code's own lock file, so it does not dream a memory that a native dream is working on.
  • One push notification after a dream that changed files, with the project and the counts. Nothing when nothing was due or changed.

When a project is due

Every night between 01:00 and 06:00, the most overdue project first, one at a time, until none is due or the window closes. A project is due after 72 hours and 5 sessions on at least 2 days since its last dream (a project that never dreamed counts all its sessions), and only when nobody worked in it in the last 30 minutes. Sessions are counted across the project's checkout, its bb worktrees and Claude Code's own worktrees. Projects without memory files are skipped, and each project has its own switch. Every number is a setting.

Memory folders

Each project's memory folder is found as Claude Code finds it, custom autoMemoryDirectory settings included. Dream points out, without touching anything, an old default folder that still holds files beside a custom one, and, in a git repository, a custom folder set only in settings.local.json, which its worktrees do not see unless a .worktreeinclude copies it.

Using it

The Dream page, whose sidebar entry counts the dry runs waiting for you, lists each project with its memory folder, last dream, sessions since, why it is or is not due, and buttons to dream now, make a dry run, or apply or discard a waiting one, plus the history of dreams with their summaries. The settings choose the window, the thresholds, the machine dreams run on and the model, with bb's own model picker. The bb dream command does the same from a shell: status, run, stop, apply, discard, restore, backups and history.

Costs and requirements

Each dream is one model run on your Claude Code account; Opus 5.5 at high reasoning to start with. Needs bb 0.49 or newer, Claude Code signed in on the dream machine, and macOS or Linux.

More from Gustavo Ambrozio

ChatGPT Realtime ConnectionRun Voice Mode's voice chats on your ChatGPT subscription instead of a separately billed OpenAI API key. It hands Voice Mode the ChatGPT sign-in that the Codex CLI already keeps on the machine running the bb server, reads it again for every chat, and never renews or rewrites it. Only the plugins you allow, Voice Mode to begin with, receive the token; the bb app, the command line and agents in threads never do. This is an undocumented use of the subscription that OpenAI could stop accepting at any time, nobody has checked whether OpenAI's terms allow it, and voice chats count against your ChatGPT plan. Requires bb 0.46 or later, Voice Mode 0.1.9 or later, and the Codex CLI signed in with Sign in with ChatGPT on a plan that includes Codex.26Diff ReviewComment on a thread's changes line by line, then send the comments to its agent, which fixes the code and answers each one. A Review tab beside the thread shows the diff of its uncommitted, staged or unstaged changes, its branch, one commit or a range, and each comment follows its code as the code moves. The same tab reviews a GitHub pull request: answer its threads, mark files viewed in step with GitHub, and submit your comments as one review, posted as the GitHub CLI's signed-in account. An AI review leaves comments of its own, @reviewer answers a question inside a comment thread, and Fix in a new thread hands the comments to another agent; these runs start as threads under the one being reviewed, in the permission mode set in the settings (bb's Approve for me by default, or Accept edits), and in full permission mode with a provider that lacks that mode, such as opencode. Follows the review loop of the open-source diffity, credited in the plugin's third-party notices. Needs bb 0.48 or later with bb's Git plugin on, and the signed-in GitHub CLI (gh) for pull request review only; it is built on experimental bb plugin APIs that may change between bb releases.NewFirstMate CrewHand one agent your to-do list and it runs a crew of worker threads, each in its own git worktree, until the work lands. The first mate is a pinned thread in bb's own chat that writes each worker's instructions, supervises it, and brings back branches, pull requests, findings and only the decisions that are yours. A FirstMate tab shows the crew as a board of Queued, Working, Blocked, Parked, Done, Failed and Idle, with Steer, Interrupt, Relaunch and End on every card. A built-in watch tells the first mate within about five minutes when a pull request is merged, reviewed or changes check status. Requires bb 0.47 or later, git, and the logged-in gh CLI for the pull request watch; a capable model such as Claude Sonnet is recommended for the first mate.14GitHub BoardSee your GitHub issues, pull requests and discussions on one board, and hand any of them to an agent thread. Four columns cover what you wrote, what is open on repositories you own and what is assigned to you, and an issue that a pull request closes folds into that pull request's card. Pull request cards show CI checks and branch status, with an Update branch button wherever you can push. A detail panel shows the body, comments and images, and labels are added or removed from a right-click menu. Send to chat opens bb's new-thread composer on a card, with a prompt you set per column and per project, in the bb project that has the repository checked out. Add to chat puts the same prompt, the card's column template with the chat's project override, at the end of a chat's draft without sending it, from a menu of the chats on screen and your recent threads. Requires bb 0.47 or later, and the GitHub CLI (gh) installed and signed in on the machine running the bb server.10

More in Memory & Context 21

Control durable knowledge or standing context available to agents.

View all