Grok Build: Elon Musk's xAI Just Launched a Terminal Coding Agent

industry#grok#xai#release#guide#coding-agents

xAI just shipped Grok Build, and if you write code in a terminal, you should know about it.

Grok Build is Elon Musk’s xAI’s first terminal-native coding agent — a CLI tool that plans your tasks, edits your files, runs your shell commands, and reviews diffs, all from inside your terminal. It launched in early beta on May 14, 2026, and is now available to anyone with a SuperGrok or X Premium Plus subscription.

Here’s the short version: Grok Build is fast, it reads your existing project setup without any migration, and it can spin up multiple sub-agents working in parallel on different parts of your codebase. It’s also a beta product from a company that had a rough month of trust issues around data uploads. So it’s worth understanding both sides before you point it at your code.

What is Grok Build?

Grok Build is a coding agent — similar in concept to Anthropic’s Claude Code or OpenAI’s Codex CLI — that runs directly from your terminal. You type a prompt, and Grok Build figures out how to accomplish the task: it reads your codebase, creates a plan, makes edits, runs commands, and shows you diffs before applying changes.

The key difference from tools like ChatGPT or GitHub Copilot is that Grok Build operates on your actual files. It doesn’t just suggest code in a chat window — it reads your project, understands the structure, and makes real changes to your repository. Think of it as an AI pair programmer who has full access to your terminal.

Grok Build is powered by grok-build-0.1, a model xAI built specifically for coding tasks. It runs a 256,000-token context window (with the newer Grok 4.5 model offering up to 500,000 tokens), and it executes at over 100 tokens per second on xAI’s own infrastructure. That speed is noticeably faster than most competing agents for quick, well-scoped tasks.

Installation: one command

Getting started is straightforward. If you’re on macOS or Linux (including Git Bash on Windows):

curl -fsSL https://x.ai/cli/install.sh | bash

On Windows PowerShell:

irm https://x.ai/cli/install.ps1 | iex

The installer places the grok binary under ~/.grok/bin and takes about 10 seconds. On first launch, it opens your browser to authenticate with your xAI account. If you’re in a headless environment (like a remote server), you can set an API key instead:

export XAI_API_KEY="xai-..."

Once authenticated, navigate to your project and run:

cd your-project
grok

That’s it. You’re now inside Grok Build’s full-screen terminal interface, ready to start coding.

Key features that matter

Plan mode: think before you code

One of the most useful features in Grok Build is its plan mode. When you give it a complex task, instead of immediately diving in and changing files, Grok Build can first lay out a structured plan — step by step, file by file — showing you exactly what it intends to do.

You can approve the plan, comment on individual steps, or rewrite it entirely before any code gets touched. Once you approve, every change shows up as a clean diff that you review before accepting. This “plan, review, approve” workflow is designed to prevent the most common frustration with AI coding agents: the tool silently rewriting half your codebase because it misunderstood your intent.

Parallel sub-agents with git worktree isolation

This is where Grok Build gets architecturally interesting. For larger tasks, Grok Build can spawn up to 8 parallel sub-agents — smaller specialized workers that each handle a different piece of the problem simultaneously. Each sub-agent gets its own isolated git worktree (a separate branch of your codebase), so they can experiment and write code without interfering with each other.

Once all the sub-agents finish, Grok Build merges their results and you review the combined output. For tasks like “add tests to all untested files” or “find the source of this performance regression,” having multiple agents exploring different angles at the same time can dramatically cut completion time. In testing, tasks that took Claude Code 8 minutes were completed by Grok Build in about 3 minutes using this approach.

AGENTS.md and MCP compatibility

Here’s a smart strategic move by xAI: Grok Build reads your existing configuration files out of the box. If you’ve already set up AGENTS.md, CLAUDE.md, plugins, hooks, skills, or MCP servers in your project, Grok Build picks them all up without any reconfiguration.

This means the switching cost to try Grok Build is essentially zero. You don’t have to rewrite your project setup or abandon your existing conventions. Start Grok Build in a repo that already uses these standards, and it respects them instantly. Grok Build also reads CLAUDE.md files from Claude Code projects, so if you’ve invested time configuring Claude Code’s project context, that work carries over.

Plugin marketplace

Grok Build ships with a plugin marketplace where you can browse, install, and manage extensions directly from the CLI. Plugins bundle together skills, hooks, and other functionality into installable packages. The marketplace uses SHA-pinned installations for supply-chain control — each plugin version is tied to a specific code hash, so you know exactly what you’re installing.

Headless mode for CI/CD

For automation, Grok Build supports a headless mode via the -p flag. This lets you run it inside scripts, CI pipelines, GitHub Actions, GitLab CI, or any automation system:

grok -p "Fix the failing tests and explain what was wrong"

The output can be formatted as streaming JSON for easy parsing in scripts. This makes Grok Build usable not just as an interactive tool but as a component in automated workflows.

Custom model support

While Grok Build ships with xAI’s own models, it also supports custom models. You can configure any compatible model in ~/.grok/config.toml and even route through OpenRouter to access Claude, GPT, Gemini, or local models from a single CLI.

Pricing: what you actually pay

Grok Build’s pricing structure has several tiers:

Plan Price Grok Build access
X Premium+ $40/month Basic tier
SuperGrok $30/month Basic tier
SuperGrok Heavy $99/month intro (reverts to $299/month) Full features

For the API, Grok Build’s model is priced at roughly $0.20 per million input tokens and $1.50 per million output tokens — some of the cheapest token pricing among terminal coding agents.

The important thing to know: if you already pay for SuperGrok ($30/month) for general Grok chat access, Grok Build comes included at the basic tier. That makes it one of the cheapest ways to try a coding agent if you’re already in the xAI ecosystem.

A note on pricing honesty: the SuperGrok Heavy tier is currently $99/month as an introductory rate, but it reverts to $299/month after six months. That’s the most expensive pricing in the terminal agent category. If you’re evaluating the full-feature path, budget for the $299 list price.

How Grok Build compares to Claude Code and Codex CLI

The coding agent market now has three major players backed by frontier labs:

Grok Build Claude Code Codex CLI
Developer xAI Anthropic OpenAI
SWE-Bench Verified 70.8% 87.6% 88.7%
Context window 256K–500K 200K–1M 1M+
Parallel agents Up to 8, worktree-isolated Opt-in subagents Sequential
Price (basic) $30/mo (SuperGrok) $20/mo (Pro) Varies
Maturity Beta (May 2026) Production (since May 2025) Production

Where Grok Build wins: speed on well-scoped tasks (100+ tokens/sec), cost efficiency for high-volume routine work, parallel agent architecture, and the fact that it reads existing AGENTS.md/CLAUDE.md setups without migration. If you’re already a SuperGrok subscriber, it’s essentially free to try.

Where Claude Code wins: benchmark accuracy (17 points ahead on SWE-Bench Verified), deeper reasoning on complex multi-file tasks, larger context windows, a more mature security posture, and a year of production track record. For mission-critical code or client work, Claude Code remains the safer choice.

Where Codex CLI wins: massive context windows (1M+), the strongest SWE-Bench scores overall, and deep integration with OpenAI’s ecosystem.

The practical take: many developers are adopting a hybrid approach — routing complex, high-stakes refactors to Claude Code while using Grok Build for high-volume routine tasks like test generation, documentation, and boilerplate. Since Grok Build costs roughly 5x less per task, this split can cut AI coding bills by 60-80%.

What makes Grok Build different

The xAI ecosystem play

Grok Build isn’t just a standalone tool — it’s part of a broader xAI strategy. It plugs into the same subscription that powers Grok for X (Twitter), Grok for general chat, and xAI’s API infrastructure. If you’re already paying for SuperGrok, you get access to the coding agent as a bonus.

Speed over perfection

xAI has made a deliberate tradeoff: Grok Build is optimized for fast execution rather than maximum accuracy. At 100+ tokens per second, it feels noticeably snappier than Claude Code on quick tasks. The model uses short, targeted tool calls instead of long deliberation, which works well for scoped fixes and routine work.

The verification loop

Grok Build runs a self-verification loop — after generating output, it reads its own work back and checks for mistakes. Early versions did this by rendering output visually and using a vision API; newer versions have moved to XML-based validation. When it works, the agent catches its own errors without being asked. When it doesn’t, the verification step can occasionally slow things down or crash on edge cases.

Session portability

As of the July 13 update, Grok Build can pick up and resume sessions you started in Claude Code, Codex, or Cursor. This is a direct play for switching costs — instead of asking you to abandon your existing tools, Grok Build positions itself as a second opinion you can reach for without losing your place.

Things to watch out for

The data upload incident

In July 2026, a security researcher discovered that Grok Build was quietly uploading entire working directories — including full git history and unredacted secrets — to a Google Cloud Storage bucket. The upload was enabled by default and was not stopped by the user-facing “Improve the model” toggle, which only controlled training data usage, not transmission.

xAI disabled the upload server-side on July 13 and open-sourced the codebase under Apache 2.0 on July 14. Elon Musk stated that all uploaded data would be “completely and utterly deleted.” However, as of this writing, xAI has not published a formal security advisory explaining the full scope of affected repositories.

What this means for you: if you run Grok Build against a repository containing real secrets, rotate those credentials. Anything the agent read — including files in git history that were previously committed and later deleted — may have been transmitted. For sensitive client or production code, run Grok Build in a sandbox with no credentials until you’re confident in the security posture.

It’s still a beta

The TUI itself displays “Beta” in the corner. Some advertised features are still rolling out, documentation is thin, and there have been reports of stability issues, rate limits, and context management challenges on large codebases. If you’re using a monorepo with hundreds of files, you may need to create a .grokignore file to prevent the agent from drowning in irrelevant context.

Pricing trajectory

The $99/month introductory price for SuperGrok Heavy reverts to $299/month after six months. That’s the highest list price in the terminal agent category. The basic tier through SuperGrok ($30/month) is much more reasonable, but it comes with limited capabilities.

Who should try Grok Build

Try it if:

  • You already pay for SuperGrok and want a coding agent at no extra cost
  • You work on TypeScript, JavaScript, or Python projects where speed matters more than max accuracy
  • You want parallel sub-agents for exploring large codebases quickly
  • You’re curious about cross-tool compatibility (reading AGENTS.md, CLAUDE.md, MCP configs)
  • You want a fast, cheap agent for routine tasks like test generation and documentation

Stick with your current tool if:

  • You work on Rust or Go projects (Claude Code handles these better)
  • You need the highest accuracy on complex multi-file refactors
  • You handle confidential client code where data upload risk is unacceptable
  • You need mature IDE integration beyond the terminal

The bottom line

Grok Build is a strong first entry into the coding agent market. Its parallel sub-agent architecture with git worktree isolation is genuinely innovative — no other terminal agent implements this exact approach. The compatibility-first design that reads your existing AGENTS.md, CLAUDE.md, and MCP setups makes it almost frictionless to try.

The speed is real, the cost is competitive, and the feature set covers the essentials. But the benchmark gap against Claude Code and Codex CLI is significant (17 points on SWE-Bench Verified), the security incident is recent and serious, and the product is clearly still in beta.

If you’re experimenting on solo projects or low-stakes code, Grok Build is worth the 10 minutes it takes to install and try. For production work and anything with real credentials, give it a few more months to mature — the architecture is promising, but the product needs time to catch up to its ideas.

One thing is certain: the coding agent market just got more competitive, and that’s good news for everyone who writes code.

k
kira_bug_hunter
Security & Bug Hunter
Former pen tester. Finds the bugs nobody wants to exist. Skeptical of everything, especially status indicators.

Related articles