Skip to content

Grok Build

Grok Build is SpaceXAI’s terminal coding agent — a full-screen, mouse-driven TUI over a harness that reads a codebase, edits files, runs shell commands, searches the web and keeps long-running tasks alive; the same binary also runs headless for scripts and CI and speaks the Agent Client Protocol to editors, it is extensible through hooks, plugins, skills and MCP servers, and it deliberately adopts the configuration of the agents it competes with while accepting no outside contributions at all.

Screenshot of Grok Build
Editor screenshot, 1 Oct 2026Grok Build ↗

What it is

Grok Build is SpaceXAI’s coding agent for the terminal, and the repository is the agent itself rather than a wrapper around one: 107 workspace members and 4,487 files of Rust that build a single binary, xai-grok-pager, shipped to users as grok. The interactive surface is a full-screen TUI with scrollback, a prompt widget, modal dialogs, a slash-command registry and a status line; the rest is the harness — tool implementations, an agent builder that reads Markdown agent definitions, session storage, a codebase graph, sandboxing, an egress proxy, worktree management with copy-on-write and snapshot support, and headless entry points. Hooks, plugins with their own marketplace, skills and MCP servers extend it, and it reads the Claude Code, Cursor and Codex configuration a project already has. Its public shape is the unusual part: 27,172 stars, 5,112 forks, 241 watchers, and no issues, no pull requests, no discussions and one bot contributor.

Who built itThe repository belongs to an Organization account, and it publishes exactly one contributor and 51 commits. Every one of them — author and committer both — is a GitHub App named grokkybara, which renders in the log as grokkybara[bot] with the noreply address 304785771+grokkybara[bot]@users.noreply.github.com and an app page at github.com/apps/grokkybara. Not a single commit carries a human name, and there are no co-author trailers. The commits are sync manifests rather than authored changes: each is titled “Synced from monorepo” and carries a bullet list of one-line changes plus a Source-Revision trailer naming the monorepo commit, which the 41-byte SOURCE_REV file at the root repeats.

How it is put together

The parts · 6

A full-screen terminal interface over an agent harness, shipped as one binary, with the interface and the harness kept in separate crates so that the TUI, headless scripts and editor integrations over the Agent Client Protocol all drive the same session code. The TUI is an Elm-style loop — input becomes an Action, a dispatcher turns it into an Effect, the Effect updates state — and it does not take the terminal over: instead of switching to the alternate screen it prints into the normal one and keeps a viewport pinned at the bottom, so the conversation lands in the terminal’s own scrollback and the user scrolls with the terminal rather than the application. That decision pushes an unusual amount of work into low-level rendering, which is why a ratatui Terminal had to be forked to reach viewport internals, and why a resize clears the screen and the scrollback and re-emits the history instead of trusting reflow. Everything else is discovered from files rather than configured in code: agent definitions are Markdown with YAML frontmatter, hooks and plugins are directories, models and MCP servers are configuration, and the same discovery walks the configuration of competing agents so that an existing project works unchanged.

crates/codegen/
103 crates and the whole product. They cover the session runtime, agent definitions and prompt assembly, tool implementations, configuration and managed policy, authentication and OIDC, the model sampler and sampling types, session storage in JSONL, memory, a codebase graph, MCP, sandboxing with an egress proxy, telemetry, a crash handler, diagnostics, voice capture, and the update path — plus seven crates that exist only to be depended on, such as a file lock, a circuit breaker, token estimation and a fuzzy file search.
crates/codegen/xai-grok-pager/ and its siblings
The interface: the pager crate holds app state, dispatch, effects, views, the slash registry, themes and the acp client state; a render crate holds terminal, input, mouse, clipboard, theme and image-overlay code; a minimal crate implements the reduced non-fullscreen mode; and a pty harness drives the real binary through a pseudo-terminal with 301 test files, 218 of them end-to-end, 45 YAML scenarios and per-platform frame-time baselines. The composition root is a separate package whose main file alone is 157 KB.
crates/codegen/xai-grok-shell/
The agent runtime and the host for sessions, with an internal map of agent handlers, subagents, workflows, config, extensions, leader and relay modes, tools, uploads and session storage. It is also where the project keeps its own history: 166 changelog pairs from 0.2.0 to 1.0.45, a 151 KB aggregated changelog, and a 111 KB README that doubles as the long-form user manual.
crates/codegen/xai-grok-agent/ and xai-grok-tools/
The agent as a portable object: Markdown definitions with YAML frontmatter, a builder, prompt templates rendered with custom delimiters, and tool implementations grouped by origin, including a first-party set, a hashline editing variant, ports of another agent’s file and search tools, ports of a second agent’s shell, edit, glob, grep and read tools, and a protobuf tool protocol with generated Kotlin and Swift bindings.
crates/codegen/xai-fast-worktree/ and the workspace crates
Worktrees treated as infrastructure: copy-on-write and standalone copy engines, Btrfs and overlay snapshot detection, a git safety layer that reasons about reachability and the working tree, a garbage collector that scans processes, a database of records, and lifecycle benchmarks. Around it sit the host filesystem, permission and auto-mode classifier, sandbox and upload crates that the agent actually touches.
third_party/ and the documentation
Four vendored crates — a Mermaid-to-SVG port with its dagre, graphlib and ordered-map dependencies — because model output is untrusted and the diagram stack has to be pinned and auditable, with a notice index, an upgrade checklist and the British spelling of the licence file called out as intentional. The docs are the other large surface: 26 numbered user-guide chapters plus an index, nine tutorial pages, and separate hook and plugin guides.

Choices, and what they beat

  • Print into the terminal’s normal screen and leave history in its native scrollback over taking over the screen with the alternate buffer

    The vendored display crate states the design directly: a viewport pinned to the bottom of the terminal, content above it becoming part of native scrollback, the user scrolling with the terminal, and no alternate-screen mode or per-terminal workarounds. It costs a fork of the widget library and a hand-written resize path, and it buys scrollback, copy and search behaviour that belongs to the terminal the user already configured.

  • Fork the terminal widget rather than use it as published over working within the upstream Terminal API

    The fork’s README lists what the published interface does not expose and the inline viewport needs: the current viewport position and dimensions, a way to set that position, back-buffer reset and previous-buffer access, and buffer state during a resize. The fork keeps the upstream API and adds those, and the licence and attribution are recorded in the notice index.

  • On resize, clear the screen and the scrollback and re-emit the history over letting the terminal reflow and trusting the library’s automatic resize

    Written out as a problem and a solution: on the main screen the terminal reflows content before the application receives the signal, old viewport borders reappear as garbage, the built-in automatic resize corrupts scrollback, cursor-position queries race during rapid resizes, and terminals reflow differently. The replacement writes clear-screen, clear-scrollback and cursor-home and re-outputs the history, and RIS is avoided because it does not clear scrollback in iTerm and Terminal.app.

  • Publish the source and refuse contributions over running an open repository that accepts patches

    Stated in 688 bytes: the repository does not accept external pull requests or unsolicited patches, the software is developed internally, and the tree is published for source transparency and local builds under Apache-2.0, which is also why no contributor license agreement is offered. The repository metadata matches, with issues, pull requests and discussions all disabled.

  • Read other agents’ configuration instead of asking users to migrate over providing an importer and a conversion document

    The documentation promises that settings, rules and skills come along: skills, agents, plugins, installed-plugin and marketplace indexes, project rules and permissions are read from Claude Code locations, rules and skills and MCP configuration from Cursor, and the AGENTS.md convention shared with Codex — with helpers to import settings once and to resume a session left in another tool, and a configuration section per source to turn each off.

Read fromCargo.toml at the root (generated, 107 workspace members), README.md (5,757 bytes), CONTRIBUTING.md, SECURITY.md, SOURCE_REV, clippy.toml, .cargo/config.toml, rust-toolchain.toml, crates/codegen/xai-grok-pager/README.md, docs/user-guide/README.md, docs/user-guide/21-terminal-support.md, docs/hooks-and-plugins.md, docs/tutorial/01-coming-from-another-tool.md, crates/codegen/xai-ratatui-inline/README.md, crates/codegen/xai-grok-agent/README.md, crates/codegen/xai-grok-shell/README.md (111 KB), crates/codegen/xai-crash-handler/README.md, crates/codegen/xai-grok-pager-pty-harness/benches/pty_baselines/README.md, third_party/README.md, third_party/NOTICE, crates/codegen/xai-grok-pager/npm/grok/README.md, four sample changelog files, and the complete 4,487-file tree with sizes.

Build log

5 stages
  1. 01

    Twenty-seven thousand stars, fifty-one commits, and the same bot in both fields

    The repository was created on 2026-07-14 and pushed to last on 2026-09-29, and in that window it collected 27,172 stars, 5,112 forks and 241 watchers while accumulating 51 commits — 17 in July, 24 in August, 10 in September. The first is titled “Publish harness and TUI open-source” on 2026-07-16; every one after it is titled “Synced from monorepo”. The most valuable thing in that log is who wrote it, and the answer is nobody visible: the API returns grokkybara[bot] as both author and committer for all 51, with the address 304785771+grokkybara[bot]@users.noreply.github.com and a GitHub App page at github.com/apps/grokkybara, and the contributor list has exactly one entry, the same app. Zero commits carry a co-author trailer, so nothing in the published history is attributed to a person, and nothing is attributed to a model by name either. The messages are release manifests: a “Changes:” list of one-line entries — 11 in the newest, and between 11 and 69 across the sixteen most recent — followed by a “Source-Revision:” trailer naming the monorepo commit, which the 41-byte SOURCE_REV file repeats verbatim. Releases and tags are both empty; the version history lives in 166 changelog files with 166 JSON sidecars, running 0.2.0 to 1.0.45 with 0.2.48 skipped, and dated 0.2.120 on 2026-08-03, 1.0.0 on 2026-08-07 and 1.0.45 on 2026-09-29.

  2. 02

    A repository with 5,112 forks and nowhere to send a patch

    The community surface is closed on purpose and the closing is documented in a 688-byte file. CONTRIBUTING.md states that the repository does not accept external pull requests or unsolicited patches, that SpaceXAI develops the software internally, and that the public tree is published for source transparency and local builds under Apache-2.0; it adds that no contributor license agreement is offered because external contributions are not accepted. The API agrees with the prose: issues, pull requests, discussions, wikis, pages and the download tab are all disabled, and the pull-request policy is set to collaborators only, so the fork count of 5,112 can only ever produce local copies. Security has its own route out — SECURITY.md, 166 bytes, points vulnerability reports at the company HackerOne program and asks people not to open public issues. The only in-product channel found in the sources points inward as well: the TUI has a feedback modal whose reports are wired through to Slack, including image attachments sent from the terminal, and one sync list mentions recovering timed-out git tags from a Slack prompt. What remains public is documentation at docs.x.ai/build/overview, a changelog page, and a repository that has never recorded a user question.

  3. 03

    A TUI that gives the terminal its scrollback back

    The interface is one process with a deliberately boring shape — the pager crate documents an Elm-style loop where input becomes an Action, a dispatcher turns it into an Effect and the Effect updates state, with an AppView owning the welcome screen and sessions and one AgentView per session owning the prompt, scrollback, tool panes and modals — but it makes one choice that dictates the rest of its rendering code. It prints into the normal screen instead of taking over the terminal, keeping a viewport pinned at the bottom so that all the content above it lands in the terminal’s own scrollback and the user scrolls with the terminal, not with the application. To do that the project vendors a fork of ratatui, because the published Terminal API does not expose the viewport position, the back buffer or the resize internals; the fork also enables DCS synchronized output so a batch of updates reaches the screen as one frame. Resize is the visible cost: the code clears the screen, clears the scrollback and re-emits the whole history rather than trusting the terminal to reflow, and it avoids RIS specifically because that escape does not clear scrollback in iTerm and Terminal.app. The same care shows in the key table, which states that Esc never cancels a turn and that mid-turn it only reminds the user about Ctrl+C — and in a test suite that drives a real pseudo-terminal: 301 files under the pager test harness, 218 of them end-to-end, plus 45 scenario definitions in YAML and per-platform frame-time baselines whose continuous integration fails a scenario when p99 grows past 15 percent.

  4. 04

    Adopting the rivals’ configuration instead of asking for a migration

    Extensions are grouped behind one modal with three tabs — hooks, plugins and marketplace — and each tab is file-driven: hooks come from a global directory, a project directory, a plugin or a path; plugins are directories bundling skills, agents, hooks and MCP servers, scoped to a user, a project, a command line or a marketplace source; marketplaces are added as a git URL, an owner-slash-repo shorthand or a local path. Then comes the part worth recording, because it is a competitive decision rather than a technical one. The agent reads the configuration of the tools it is up against: Claude Code skills, agents, plugins, installed-plugin and marketplace indexes, project rules and even permissions from the settings files; Cursor rules, skills and MCP configuration; and the AGENTS.md convention shared with Codex, with one-step helpers to import settings and to resume sessions left behind in those tools, and separate compatibility sections in the configuration to switch each source off. The shell documentation devotes a full section to the Claude Code compatibility table, the code carries crates for foreign sessions and external agent migration, and the tool implementations are partly in-tree ports of another agent’s tools with the change notices the licence requires. A project already configured for a competitor therefore needs no migration at all, which is a cheaper acquisition path than an importer.

  5. 05

    What the documentation admits, and where it disagrees with itself

    The files are unusually willing to say what does not work. The sandbox chapter lists two limitations in its own words: enforcement uses Landlock on Linux and Seatbelt on macOS, and if the sandbox cannot be applied — an old kernel, missing entitlements — Grok logs a warning and continues without enforcement; and network restriction is only partial, because profiles block network in child processes while in-process HTTP for web search and the model API is untouched, since the agent needs that network to function. The crash handler documents that frame capture is best-effort and may be empty in release builds where the compiler omits frame pointers, and that its alternate signal stack is installed per thread so Tokio workers are not protected. The root README says macOS and Linux are the supported build hosts and Windows builds are best-effort and not tested from this tree, and marks the root Cargo.toml as generated and read-only. The generated manifest itself allows a lint with a note explaining that the project has no merge queue, so violations from other people’s merged code reach main and break the build for everyone. Two smaller disagreements exist between the tree and its own documentation: the third-party index lists six vendored crates including an NFS server and a FUSE client, but only four vendored directories exist, and the npm package documents four supported platforms while the tree ships six per-platform packages.

Adjacent records

All records →