We've open-sourced the entire Grok Build CLI so anyone can dig into the code. You can see exactly how the agent loop works, the terminal rendering, compaction, goals, subagents - the whole thing.
We spent a ton of time making worktrees actually work well for agent swarms and large repos.
When you’re running 10s of agents that ship, you quickly realize you need worktree, but git’s defaults are brutal at this scale.
Slow creation, every agent copying the whole repo, can’t check out the same branch twice.
So we fixed those problems in Grok Build.
Now agents can spin up, reset, and go wild constantly. Worktrees are faster than normal Git, everything shares the same base, and it doesn’t eat your disk or grind your SSD.
Try it:
grok -w
the @xai team really cooked with Grok Build
the most beautiful (and performant) TUI I've seen so far
>realtime context view
>feels snappy in ghostty
>first class worktree support
>great resume session flow
>robust keyboard shortcuts