Traces
TeamsDiscoverBlogDocsHelp
Sign in
All posts

New Adapter: Grok Build

Jul 16, 2026

Traces CLI v0.5.11 adds support for Grok Build, the open-source coding CLI from xAI. You can now capture and share the Grok Build sessions directly on Traces.

How Traces reads Grok Build

Grok Build stores every session under ~/.grok/sessions/, organized by working directory. Traces reads that on-disk data directly.

Each session directory holds a summary.json (title, git metadata, model) and an updates.jsonl event log; Traces treats a directory as a valid session only when both are present. TO list sessions quickly, Traces reads Grok's own session_search.sqlite search index, and falls back to scanning the filesystem when the index is incomplete.

Groke's updates.jsonl is a stream of updates keyed by sessionUpdate, and Traces normalizes them into a common trace shape:

  • Full turns. User messages (user_message_chunk), assistant text (agent_message_chunk), assistant reasoning (agent_thought_chunk), tools calls (tool_call), and tool results (tool_call_update) each map to their own strace event.
  • Tools and skills. Traces distinguishes between Grok's built-in tools (e.g. run_terminal_command, read_file, grep) from skills, prefixing the latter with skill: and renders file edits as a before/after diff.
  • Tool Failures. A tool result is marked success only on a completed status; error, failed, and cancelled terminal states surface as errors.
  • Model. Traces picks up the model Grok used (e.g. grok-code-fast-1) from the session summary and per-line metadata.
  • Plans and lifecycle events. Grok's plan entries, auto-compaction, compaction checkpoints, memory flushes, retries, and even "doom loop" detections are captured as trace events, so you get the full picture of a long-running run.

Because Grok stamps a stable per-line _meta.eventId on every update, Traces keys events by Grok's own identity under the v2 id scheme, which enables re-syncing a session.

What you can do now

  • Share Grok Build sessions. Run traces share --agent grok to publish a session; Traces resolves the right one from your working directory, or you can pick one by ID. Subagent sessions (from best-of-n, implement, review, etc.) are automatically discoverable and can be shared individually via --list.
  • Resume sessions. Traces hands the session ID back to Grok via gorok --resume <id>.
  • Connect to get comments. Grok's lifecycle integration uses a config-based hook at .grok/hooks/traces.json, and the session summary carries the git branch and commit so traces link back to your code.

Get started

  1. Update your CLI to v0.6.11
  2. Run traces setup to install the Grok hook and connect sessions to your commits.
  3. Run traces share to publish a session and get a link.