Skip to content

Where coding agents store session history ​

Claude Code and Codex store JSONL under ~/.claude/projects/ and ~/.codex/sessions/. Pi uses ~/.pi/agent/sessions/; Grok Build, Kimi Code and Antigravity CLI use session directories. The supported opencode layout uses one SQLite database. The tables below compare the defaults, project metadata and resume commands.

Default locations and formats ​

AgentDefault locationTranscript
Claude Code~/.claude/projects/<project>/<session-id>.jsonl
Codex~/.codex/sessions/<YYYY>/<MM>/<DD>/rollout-*.jsonl; archives in ~/.codex/archived_sessions/
Grok Build~/.grok/sessions/<group>/<session-id>/updates.jsonl
Kimi Code~/.kimi-code/sessions/<group>/<session-id>/agents/main/wire.jsonl
Pi~/.pi/agent/sessions/<project>/<timestamp>_<uuid>.jsonl
Antigravity CLI~/.gemini/antigravity-cli/brain/<uuid>/.system_generated/logs/transcript*.jsonl
opencode~/.local/share/opencode/opencode.dbSQLite: session → message → part

How can I resume a session? ​

Run from the original project directory with the corresponding CLI installed and configured. Replace SESSION_ID, CONVERSATION_ID or the path; these commands start the CLI and can make provider requests or write data.

AgentTerminal commandIn-app chat
Claude Codeclaude --resume SESSION_IDYes
Codexcodex resume SESSION_IDYes
Grok Buildgrok --resume SESSION_IDNo
Kimi Codekimi --session SESSION_IDNo
Pipi --session "/absolute/path/to/session.jsonl"No
Antigravity CLIagy --conversation CONVERSATION_IDNo
opencodeopencode --session SESSION_IDNo

All seven have history browsing/search, export and terminal resume in Sessions Viewer. Statistics depend on recorded usage: Antigravity CLI's supported transcript has no usage fields. See resuming sessions and exporting sessions.

Where does the project identity come from? ​

AgentMetadata used by the viewer
Claude CodeJSONL cwd; encoded folder name is a fallback, not a reversible path
Codexsession_meta.payload.cwd
Grok Buildsummary.json → info.cwd, with group-directory fallbacks
Kimi CodeSession metadata / index; state.json.cwd identifies the working directory
Picwd in the first session record
Antigravity CLIhistory.jsonl → workspace
opencodeproject table joined by session.project_id

Which custom roots does the viewer discover? ​

AgentRecognized override
Grok BuildGROK_HOME (default ~/.grok)
Kimi CodeKIMI_CODE_HOME (default ~/.kimi-code)
PiPI_CODING_AGENT_SESSION_DIR, then settings.json.sessionDir, then <PI_CODING_AGENT_DIR>/sessions
opencodeXDG_DATA_HOME (default ~/.local/share)

The current Claude Code, Codex and Antigravity adapters read fixed locations under the home directory. This is a viewer limitation, not a claim that those CLIs cannot use other roots. Environment variables in your shell may not reach a desktop app launched from Finder or a shortcut. Follow the missing-session checklist before moving files.

Read a transcript without the app ​

Each agent's reference page includes jq or read-only sqlite3 examples. They extract selected fields, not every image, tool result or branch. Use Sessions Viewer for a searchable view, or download the app.

Evidence and scope ​

Path and resume information was checked against the agent adapters at source revision 22fefc6. Each reference page links its own adapter and, where identified, an upstream entry point.

Reference scope: checked against the Sessions Viewer 0.6.0 adapters on 2026-10-05, not a compatibility guarantee for every CLI release. Shell examples use macOS/Linux paths and require jq (or sqlite3 for opencode). Replace placeholders with real values and use your configured data root. Text extraction does not replay tools, images or the active branch of a session tree. Command regressions use downloadable synthetic samples, not private sessions. Check the capability and evidence matrix for tested scope. Browsing is distinct from resuming or editing data; see privacy and data handling.