Where Grok Build stores session history
Grok Build is directory-backed: each session is a folder, not a single file.
$GROK_HOME/sessions/<encoded-cwd>/<session-id>/GROK_HOME defaults to ~/.grok. A relative value is resolved from the current working directory, the same way a relative path typed at a shell prompt would be, rather than from your home directory.
What is in a Grok Build session directory
updates.jsonl ← the transcript you want
summary.json ← list metadata, including info.cwd
chat_history.jsonl ← model context, NOT the display transcript
events.jsonl
rewind_points.jsonl
prompt_history.jsonl
prompt_context.json
system_prompt.txt
resources_state.json
announcement_state.json
*.lockTwo of these look like the transcript and only one is:
updates.jsonlis the authoritative user-visible event stream, the one the CLI rendered to you.chat_history.jsonlis what was fed to the model: compacted, reordered, with system scaffolding mixed in. Read as a transcript, it gives you something that never appeared on anyone's screen.
The .lock files exist because Grok writes these files concurrently. Take a copy before parsing if the session might still be live.
Which project a session belongs to
The group directory name encodes the working directory, but the authoritative answer is in summary.json:
jq -r '.info.cwd' ~/.grok/sessions/*/*/summary.json | sort | uniq -c | sort -rnReading a Grok Build session from the terminal
Print the visible conversation:
jq -r 'select(.type) | .text // .content // empty' \
~/.grok/sessions/<group>/<session-id>/updates.jsonlGet a session's title and timestamps without opening the transcript:
jq '{title, info}' ~/.grok/sessions/<group>/<session-id>/summary.jsonBecause a session is a directory, deleting one means removing the whole folder rather than unlinking a single file. Anything that manages Grok sessions has to treat the directory as the unit.
Or open it in an app
Sessions Viewer reads updates.jsonl and never chat_history.jsonl, groups sessions by info.cwd, and treats the directory as the storage unit: deleting moves the whole folder into a restorable trash instead of calling rm. It also reads Claude Code, Codex, Kimi Code, Pi, Antigravity CLI and opencode.
