How to delete Grok Build session history, and what you lose
one directory per session, and the summary beside the transcript is what lists it
Grok Build keeps each session in its own directory: the ACP conversation stream in updates.jsonl, and the metadata the CLI lists the session by in summary.json beside it. Removing the whole directory removes both. Removing only the stream leaves a summary that still names a conversation that is gone.
Where the sessions are
${GROK_HOME:-~/.grok}/sessions/<encoded-cwd>/<session-id>/
updates.jsonl
summary.json
updates.jsonl is the conversation, one ACP session update per line. summary.json carries info.id, info.cwd, the generated title, and the created and updated times. GROK_HOME moves the whole tree, config.toml and the hooks included. The directory above a session is its working directory, URL-encoded; where that encoding is ambiguous deja reads the path from summary.json or a .cwd file rather than decoding the name. Grok also writes bookkeeping into the same directory — chat_history.jsonl, events.jsonl, rewind_points.jsonl, usage.json, tool_definitions.json — which is why the directory is what you delete, not the transcript alone.
A grok.db beside sessions belongs to grok-dev, another CLI that shares ~/.grok and keeps every session of the machine in one SQLite store. Nothing below touches it.
How to delete one session
Close Grok Build first so a running session cannot rewrite its files, then remove the session's directory:
rm -r "${GROK_HOME:-$HOME/.grok}/sessions/<encoded-cwd>/<session-id>"
Do not delete only updates.jsonl: the summary.json left behind still lists the session, now with no conversation behind it. Grok Build scopes its session list by working directory, so removing the directory is also what takes the session out of the list for that project.
To clear everything, remove the sessions directory. That removes every session of every project; config.toml, the hooks in hooks/, the plugin wiring and GROK.md are not touched.
Delete one session with deja
If deja is installed, run deja last --harness grok and copy the session id. Preview the deletion, then run it from a terminal and confirm:
deja delete <id> --dry-run deja delete <id>
The dry run lists the paths without removing them. After confirmation, deja removes those paths and forgets its own copy of the session. This cannot be undone. It removes the whole session directory, so the conversation, the summary and the sidecars go together. deja refuses deletion if a file or directory to be removed was written in the last 5 minutes; end the session and wait before deleting it. A session that came out of grok.db is refused, because that database holds every session of the other CLI.
What you lose
The conversation, the tool calls and their results, the title and timestamps that identify the session, and the rewind points and usage figures kept beside them. Grok Build cannot bring a deleted session back, and grok --resume <id> no longer finds it.
Keeping it searchable instead
deja reads Grok Build sessions, alongside the other agents' histories, into one local index. Run deja index before you delete: a session that leaves Grok stays in the index, so deja <query> finds it and deja show <id> prints it.
curl -fsSL https://raw.githubusercontent.com/vshulcz/deja-vu/main/install.sh | sh deja index deja "grok session about the migration"
deja resume <id> --write-back writes updates.jsonl and summary.json back into sessions/<encoded-cwd>/<id>/ from the index, filling the summary fields grok refuses to open a session without, so grok --resume reopens it. Indexing and search stay local, credentials are stripped as the index is built, and deja forget --session <id> removes a session from the index for good. deja reads GROK_HOME too; DEJA_GROK_ROOT overrides it for deja's reads only, so set it to point deja at a copy or a backup of the tree.
Where every agent keeps its history · Memory for Grok Build · The Grok Build format
Found this useful? Star deja-vu on GitHub.