BUILD / enable-cross-session-memory-in-grok-build

Build

Enable cross-session memory in Grok Build

Enable cross-session memory in Grok Build

Cross-session memory lets Grok Build keep notes across sessions. It is off by default. Project rules in AGENTS.md still load every session in the tree whether memory is on or off.

Turn it on

In ~/.grok/config.toml (or $GROK_HOME/config.toml):

[memory]
enabled = true

Or set the environment variable for a process:

export GROK_MEMORY=1

For a single run from the CLI you can also pass --experimental-memory. Disable for one run with --no-memory.

Use it in a session

These commands show up when memory is enabled:

Command What it does
/remember <note> Save a memory note
/flush Flush conversation memory to disk now
/memory (alias /mem) Browse, view, and manage memories
/dream Run memory consolidation

Clear stored files from the shell:

grok memory clear --workspace
grok memory clear --global
grok memory clear --all

Check discovery

grok inspect

Confirm config sources and that memory-related settings match what you expect before you rely on a note in a later session.

Pitfalls

  • Memory is separate from AGENTS.md project rules. Rules are files on disk; memory is an opt-in store you enable and flush.
  • Project .grok/config.toml only contributes MCP, plugins, and permission rules. Put [memory] in the user config under ~/.grok/.
  • Consumer Grok memory on grok.com is a different control surface. See Manage Grok memory for the chat product.