BUILD / run-dream-in-grok-build

Run /dream memory consolidation in Grok Build

/dream folds recent Build memory observations into topic files — one subject per file, such as topics/testing.md. Official Memory in Grok Build says Dream also runs on its own periodically in the background. The command only appears when cross-session memory is enabled (Modes and Commands).

Prerequisites

  1. Enable memory in user config (~/.grok/config.toml or $GROK_HOME/config.toml):
[memory]
enabled = true

Or for one process: export GROK_MEMORY=1. Single-run flags: --experimental-memory / --no-memory.

  1. Start a new session after enabling (/new or fresh grok) so background capture has somewhere to write.
  2. Confirm /dream shows in /help with /remember, /flush, and /memory.

Full enable steps: Enable cross-session memory in Grok Build.

When to run Dream yourself

Use /dream when:

  • /memory shows a pile of raw notes you want compressed into topics
  • You finished a long session and want subjects organized before the next day
  • You are about to switch projects and want this workspace’s topics tidy first

Background Dream still runs on its own over time. Manual /dream is the on-demand pass.

Run consolidation

/dream
  1. Optionally save an explicit fact with /remember <note> if it is not on disk yet.
  2. Optionally /flush so the latest capture hits disk before consolidation — Flush conversation memory.
  3. Run /dream and wait for the client to finish merging.
  4. Open /memory and confirm topics look like subject files (for example testing, preferences) instead of a long raw list — Browse memories with /memory.

After Dream

Later sessions read topic files that cover the area they are about to touch. Conversation instructions still win over a note when they conflict. Clear a whole scope with grok memory clear --workspace / --global / --all when the topics themselves are wrong — Clear Grok Build memory from the CLI.

Pitfalls

  • Without [memory] enabled / GROK_MEMORY=1, /dream does not appear.
  • Project .grok/config.toml does not own [memory]; put it in user config under ~/.grok/.
  • /dream consolidates Build cross-session memory only. It is not consumer Grok memory on grok.com (Manage Grok memory).