Grok WorldGrok Build CLI field station

Current edition / GROK BUILD

Treat worktree storage as state you have to reclaim

A worktree session is a real git checkout under ~/.grok/worktrees that starts from current HEAD, outlives the session that created it, and is collected only when you invoke removal.

01 / DECIDE

Architecture decision

Use it when parallel agents, long reviews, or scheduled runs accumulate isolated checkouts on a shared or capacity-capped disk.

A worktree session is a real git checkout under ~/.grok/worktrees that starts from current HEAD, outlives the session that created it, and is collected only when you invoke removal. Map input, output, state, tools, and side effects as one observable path, then name the owner of treat worktree storage as state you have to reclaim.

02 / OPERATE

Three-step field procedure

  1. 01

    Lock the contract

    Write down the caller, data classification, success condition, timeout, cancellation, and ownership. Use it when parallel agents, long reviews, or scheduled runs accumulate isolated checkouts on a shared or capacity-capped disk.

  2. 02

    Run one bounded path

    Build one end-to-end path with correlation, typed state, and reversible failure handling. A worktree session is a real git checkout under ~/.grok/worktrees that starts from current HEAD, outlives the session that created it, and is collected only when you invoke removal.

  3. 03

    Verify the signal

    Turn acceptance into a repeatable fixture, contract test, or browser test. Record the installed version and its release notes, the help output of the worktree commands that build actually ships, a dry-run preview, and the path reclaimed after removal.

03 / BOUND

Operational boundary

Ending or deleting a session leaves its worktree in place, collection runs only when invoked, and a removal without a preview can discard changes that were never landed with git.

04 / PROVE

Acceptance evidence

Record the installed version and its release notes, the help output of the worktree commands that build actually ships, a dry-run preview, and the path reclaimed after removal.

SOURCE / HTTP

Reproducible source probe

curl -fsSI 'https://docs.x.ai/build/features/worktrees' | sed -n '1,5p'