Grok Build Conversation History: Find and Resume Sessions

By CodeAgentSwarm · Updated October 31, 2026

Grok Build persists sessions under its data root so you can continue work later. The CLI exposes --continue, --resume, grok sessions, and grok export. CodeAgentSwarm adds a cross-agent searchable history UI on top. Grok Build is xAI's coding CLI (grok), not the Grok chatbot. Resume was verified against grok --help (-c/--continue, -r/--resume).

Resume from the CLI

bash
# Continue most recent session for this directory
grok --continue

# Resume by id or title
grok --resume
grok --resume "auth refactor"

# Optional: fork instead of reusing the same session id
grok --resume SESSION --fork-session

Inside the TUI, /resume opens a picker of recent sessions for the current folder, and /rename gives the current session a title you can resume by later. A title passed to --resume is matched against sessions in the current directory; scripts should pass the id. grok sessions list and grok sessions search help you find older work. grok export writes a Markdown transcript when you need a shareable artifact.

Where history lives

Grok Build saves every conversation automatically under ~/.grok/sessions/ (or $GROK_HOME/sessions/), grouped by working directory, with prompts, responses, tool calls and file snapshots. Do not casually delete that tree if you care about resume. Back it up like any other local agent state. Details are in the official sessions docs.

CodeAgentSwarm history

CAS indexes conversations across Claude Code, Codex, OpenCode, Kimi Code, Grok Build and more so you can search from one modal and reopen a session into a terminal. That is the multi-agent layer the raw CLI does not provide alone.

FAQ

How do I continue my last Grok session?

Run grok --continue in the same project directory.

How do I find an old session?

Use grok sessions list or grok sessions search, or /resume inside the TUI, then grok --resume with the id or title.

Does CodeAgentSwarm store Grok history?

CAS provides searchable history across agents, including Grok Build sessions it has indexed from your machine.