Adding memory to Grok Build

it reads Claude-shaped hooks, so all four moments work

Grok Build writes every session to disk and starts the next one without them. The work that would answer today's question is in those files, and in whatever other agent you used before it.

What Grok already has

Sessions live under ~/.grok/sessions as ACP update streams — JSONL with JSON metadata beside them — plus a grok.db store (GROK_HOME moves the tree). Complete, and unread by anything.

Adding recall

deja install grok-auto

Writes [mcp_servers.deja] into ~/.grok/config.toml and a hook file of deja's own into ~/.grok/hooks/. Grok reads hooks in the same shape Claude Code uses, which is why all four moments work here: session start, per prompt, before a tool runs, and before compaction.

A plugin for the official marketplace is in review. When it lands, grok plugin install deja is the other path, and the two coexist: each half of the plugin stands down when it finds what the CLI already wired, so nothing is listed or injected twice.

Either way it needs the binary, since a plugin delivers files rather than runtimes:

brew install deja-vu
# or
curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh

One thing to know about the name

There is a community CLI that shares the name grok and the ~/.grok directory, and it is a different product. deja reads xAI's Grok Build store, and deja resume prints a grok --resume for its sessions and refuses for the community CLI's, which has no terminal resume. Where something still could not be checked against a running Grok Build, the registry page says so and names what was tried instead of guessing.

The part that is not about this harness

The index covers every agent's transcripts on the machine — twenty of them today, each in its own format — so a fix found in one tool answers a question asked in another, including sessions from before any of this was installed. That is the reason to index rather than to capture.

Nothing here writes memories, so there is nothing to hallucinate into your history; indexing and search are local, and credentials are stripped as the index is built (privacy). An injection is capped at 1,536 bytes per prompt and about 4 KB per tool call — what memory costs has the measured comparison.

Getting started · How Grok's store is read · The plugin source