grok memory clear --yes printed one sentence and exited 0. The sentence was Nothing to clear: no memory files found. Standard error was empty. The global topic file was still under memory-v2/global/topics/. A note under memory-v2/workspaces/ was still there. The older memory/MEMORY.md was still there.
The exit code is not an inventory. On this binary the default clear can report an empty store while the files a later session is told to read are still on disk. --all can then print Memory cleared. after deleting only the global directory.
What this comparison used
The binary was Grok Build 1.0.67, build 2fe064390d07, on Linux x86_64. The run was 1 November 2026. GROK_HOME pointed at a new directory created for the run. The normal grok home was not opened. No grok login was run. No prompt was sent. The commands were grok memory clear and grok inspect.
The checkout was a new Git repository with one commit and a marker file. It was not a copy of a working tree anyone uses. The planted notes were short markers, not facts from a live session. The home’s config.toml set both [memory] enabled and [memory_v2] enabled to true. GROK_MEMORY=1 was set for the enabled cases. One later case turned both of those off, and it is labeled as that case.
grok inspect on this binary writes a user guide into the grok home, under docs/user-guide/. The memory chapter is 13-memory.md. That file is the guide this comparison uses. A public memory URL tried the same day did not resolve to that chapter. The product page at x.ai/build, read 1 November 2026, lists Memory as persisting decisions and context across sessions. It does not say the feature starts disabled, and it does not describe grok memory clear.
The planted layout, before any clear, was:
<grok-home>/memory-v2/global/topics/prefs.md
<grok-home>/memory-v2/global/MEMORY.md
<grok-home>/memory-v2/global/observations/_inbox/note.md
<grok-home>/memory-v2/workspaces/planted-aaaa/topics/note.md
<grok-home>/memory-v2/keep.txt
<grok-home>/memory/MEMORY.md
planted-aaaa is not a name this binary computed. It is a directory placed beside where a real workspace scope would sit, so a clear that scans workspaces/ would have to pass it, and a clear that deletes only one computed path would leave it. keep.txt sits in memory-v2/ itself, outside both scope directories. The legacy file is the older store the guide still mentions.
What the shipped chapter says the command deletes
The chapter says memory is experimental and disabled by default. Enable it with [memory] enabled = true, [memory_v2] enabled = true, or GROK_MEMORY=1. When both TOML keys are set, [memory_v2] enabled wins. A false value from the command line or from GROK_MEMORY turns memory off for the process. Memory also stays off in a temporary directory.
Memory has two scopes. Global memory holds facts that apply across projects. Workspace memory holds facts about one repository. The chapter says clones and worktrees of the same repository share one workspace scope. Each scope is ordinary Markdown: topics/ for curated notes, observations/_inbox/ for notes waiting on /dream, and a generated MEMORY.md index that you are told not to edit. The workspace directory name is a project slug plus a short hash. The chapter does not print the hash function.
When memory is on, the system prompt is given both scope directories, and the generated index of each scope is injected once per session, up to 8 KiB per scope. Pending observations are not in that index. Topic files are what a later session is told it can open. This run did not start a session, so it did not watch that injection. It checked whether the files that would feed it survived the clear command.
Notes in the older memory/ directory are imported once, the first time a workspace is opened. Each section of the old MEMORY.md becomes a topic, or is appended to a topic that already has that name. The old files are left in place and are not used after that import. This run did not open a workspace session, so it does not show a second import. It shows whether memory clear deletes the old file.
The same chapter documents one subcommand:
grok memory clear
grok memory clear --workspace
grok memory clear --global
grok memory clear --all
grok memory clear --yes
The comments in that block say the first form clears workspace memory for the current directory, that --workspace is the same scope, that --global clears global memory, and that --all clears both. --yes skips the confirmation prompt. The paragraph under the block says clear deletes the whole scope directory under memory-v2/, and that Grok creates it again the next time a session starts.
grok memory clear --help on this binary matches that split. The short description is Clear memory files (workspace by default). --workspace is Clear workspace-scoped memory (the whole workspace scope directory). --global is Clear global memory (the whole global scope directory). --all is Clear both workspace and global memory.
None of those lines say what the command prints when the computed workspace directory is absent and other notes are not.
What each flag left behind
The default command, grok memory clear --yes, printed:
Nothing to clear: no memory files found.
Exit status was 0. Every planted file was still there, including the global topic, the global index, the inbox note, the planted workspace note, keep.txt, and the legacy MEMORY.md. grok memory clear --workspace --yes printed the same sentence and left the same files. Running the default command without --yes also printed that sentence and exited 0. It did not ask for confirmation. The binary contains the prompt Are you sure? [y/N], but this invocation never reached it. The command had already decided there was nothing to delete.
The same empty sentence appeared from a subdirectory of the checkout, from a directory that was not a Git repository, and from a checkout that had an origin remote set. Adding a remote did not make the command print a workspace path, and it did not remove workspaces/planted-aaaa.
A trace of file opens, stats, and unlinks during grok memory clear --workspace --yes did not name memory-v2. The directory listing is the result that matters. The markers were unchanged.
grok memory clear --global --yes printed a path and deleted that path:
The following will be deleted:
global memory: <grok-home>/memory-v2/global
Cleared: global memory
Memory cleared.
Exit status was 0. memory-v2/global was gone: the topic, the generated index, and the inbox note. workspaces/planted-aaaa/topics/note.md was still there. memory-v2/keep.txt was still there. memory/MEMORY.md was still there. The deletion list named the directory it removed. It did not claim the other two stores were empty, except in the closing line Memory cleared.
grok memory clear --all --yes printed the same three lines. The deletion list contained the global directory and no workspace path. Exit status was 0. After it, memory-v2/global was gone again, and the planted workspace note, keep.txt, and the legacy file were still there. The guide’s comment on --all is that it clears both scopes. This run cleared the global directory that existed. It did not delete the workspace directory that also existed, and it did not say the workspace half had been skipped. Memory cleared. is the line a script is likely to trust. The listing under workspaces/ is the line that still had a note.
The disabled case used a fresh home whose config.toml set [memory_v2] enabled = false, with GROK_MEMORY unset. grok memory clear --all --yes still printed the global deletion text, still exited 0, and still removed memory-v2/global. The planted workspace note was still present. The enable flag does not gate this command. The chapter says turning memory off keeps existing files on disk and stops capture. That sentence describes the in-session toggle, and a process started with GROK_MEMORY=0. It is not what grok memory clear --all did here.
Inspection does not show the switch
The troubleshooting list in the same chapter starts with a step that does not work on this binary: verify memory is enabled by checking grok inspect output. Then check GROK_MEMORY, [memory_v2] enabled, and [memory] enabled.
grok inspect and grok inspect --json were run twice, against two homes. One home had both keys true and GROK_MEMORY=1. The other had [memory_v2] enabled = false and no GROK_MEMORY. Neither human report contained the word memory. Neither JSON object had a memory field. The human report lists version, working directory, Git root, trust, instructions, permissions, skills, agents, plugins, MCP servers, hooks, and config sources. The JSON has the same gap.
Inspect does print the user config path, under Config Sources. That path is the file to open. A missing memory section in the inspect report does not mean memory is off. A present config path does not mean memory is on. Read the keys. The clear command will still delete a global directory when those keys are false.
Verify the directories after the clear
After a clear, list the three stores before treating the home as empty:
ls <grok-home>/memory-v2/global/topics
ls <grok-home>/memory-v2/workspaces
ls <grok-home>/memory
On this binary, a workspace clear that prints Nothing to clear: no memory files found. has not removed global topics, and it has not removed a workspace directory that was already present. If those listings still show notes, the files the chapter says a memory-enabled session injects and opens are still on disk. This run did not start that session. The empty sentence is still the wrong inventory.
--global is the form that removed the global directory here. Read the path under The following will be deleted, then confirm that directory is gone. Then list workspaces/. --all did not add a workspace line to the deletion list, and it did not remove the planted workspace directory. If a particular workspace directory has to go, identify that directory and remove it, or run the clear from a checkout that makes the command print that path, and confirm the printed path. This binary did not print a workspace path for the checkout under test, so there was nothing in the output to confirm.
The legacy file is outside both scopes. The chapter says it is imported once when a workspace is opened, and left in place afterward. grok memory clear --all did not remove it. A script that treats Memory cleared. as a wiped home will leave that file for whatever the next workspace open does with it. This run did not perform that open.
Do not use the exit status as the inventory. Every invocation here exited 0: the one that deleted nothing, the one that deleted only the global directory, and the one that did that while memory was switched off.
The changelog, read 1 November 2026, lists 1.0.70 above this 1.0.67 binary. The notes from 1.0.63 through 1.0.70 do not describe this clear result. A newer binary can resolve the same flags differently. The listings above are the 1.0.67 report.
Sources
- User guide shipped with Grok Build 1.0.67, Cross-Session Memory chapter,
docs/user-guide/13-memory.md, written into the disposable grok home bygrok inspecton 1 November 2026 grok memory clear --helpon that binary- Grok Build, read 1 November 2026
- Grok Build changelog, read 1 November 2026, listing 1.0.70 above the tested 1.0.67 binary
grok memory clearandgrok inspecton that binary, 1 November 2026, against the disposable home and checkout described above