Grok Build
Grok Build (the grok binary) is xAI’s harness on Grok. It is a quick, capable generalist and good value for everyday coding tasks.
Vendor docs: Grok Build.
Connections
Section titled “Connections”| Connection | Supported |
|---|---|
| Subscription | SuperGrok or X account, personal use. Gluon offers grok login. |
| API key | xAI |
| Amazon Bedrock | No |
| OpenRouter | No |
On a key connection Gluon points Grok Build at an empty login file so it uses XAI_API_KEY and never touches your Grok login. That setting is undocumented by xAI.
OpenRouter is not offered: Grok Build has no setting for another provider’s endpoint that works without a grok.com sign-in, and a signed-in login could end up sent to that endpoint (issue #109). Its custom-models endpoint (GROK_MODELS_BASE_URL) still asks for the sign-in, so it is not used. This is worth rechecking after a Grok Build update.
How Gluon launches it
Section titled “How Gluon launches it”Gluon starts grok in its own pseudo-terminal with the model, the effort and the spec after --. It starts under an id Gluon makes and is reopened with it, so gluon resume works.
Grok Build reads AGENTS.md and CLAUDE.md itself. Gluon tells it to read any other instruction file the repository has.
Grok Build’s installer never edits your shell profile, so a fresh install may not be on your PATH. See Troubleshooting.
Grok Build’s interface ignores the permission flag, so a mode is not a flag.
explorestarts it in its read-only sandbox withEdit,WriteandBashdenied. It can read, search and list files but run no shell commands. Denying is what stops the prompts.planhas no flag, so Gluon types/planinto it once it is up. It works only in Gluon’s frame: a direct launch from the command line and a terminal without a pseudo-terminal refuse it.
See Modes.
Sessions, cost and context
Section titled “Sessions, cost and context”- Status and compaction. Gluon keeps one hooks file in Grok Build’s hooks directory. It holds the same bytes on every machine, does nothing unless the launch comes from Gluon, and
gluon uninstallremoves it. It lets the sessions list show Grok Build’s state and lets Gluon ask before an auto-compaction. - Cost. From its OpenTelemetry export, priced from Grok’s own table. A plan is priced as the API (
~$). - Context. From the last main request, over the window in Grok’s table. Unknown while a subagent runs, and after a compaction.
See Cost and context.
Next steps
Section titled “Next steps”- Modes: explore without a shell, and plan through
/plan. - Cost and context: how Grok Build’s figures are counted.
- OpenCode: the next agent.