- Compare
- Grok Build vs Claude Code
Comparison · Reviewed June 2026
Grok Build vs Claude Code
Compare Grok Build and Claude Code on harness licence, default model, pricing, local endpoint support, headless mode, MCP, subagents and editors.
Editorial review
AI tools, model releases, pricing, licenses, and platform terms can change quickly. Verify the official source before production or commercial use.
Quick verdict
Choose Grok Build if you want a coding-agent harness you can read, build and point at your own model. Choose Claude Code if you want the most complete tool for Claude models and are fine with a proprietary binary and an Anthropic bill.
Choose which
Choose Grok Build for an Apache 2.0 harness you can build from source, a documented custom-endpoint route to Ollama or another OpenAI-compatible server (documented by xAI, not yet tested by OpenSourcesAI), and no per-token bill once inference is on your own hardware.
Choose Claude Code for Claude models with first-party VS Code and JetBrains integration, a desktop app and web surface, MCP client and server modes, subagents, hooks, skills and an Agent SDK, billed through a Claude subscription or Anthropic API usage.
Feature table
| Criterion | Grok Build | Claude Code |
|---|---|---|
| Harness licence / source availability | Apache 2.0. First-party source is in xai-org/grok-build and builds with cargo; third-party code keeps its own licences | Proprietary. LICENSE.md reads: "© Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service." The repository holds README, changelog, examples and plugins, not the CLI source |
| Default model and who hosts it | Grok 4.6, hosted and metered by xAI | Claude models, hosted by Anthropic, or via Amazon Bedrock, Google Cloud's Agent Platform (formerly Vertex AI) or Microsoft Foundry |
| Pricing model | xAI API usage: $2 input, $0.50 cached input, $6 output per million tokens under 200K context; $4, $1 and $12 above | Requires a Pro, Max, Team, Enterprise or Console account; "Claude Code charges by API token consumption" on the Console, plan usage limits on subscriptions |
| Custom or local endpoint support | Documented: [model.<id>] with base_url and api_backend = chat_completions, responses or messages; an Ollama route follows from Ollama's /v1 endpoint. Documented by xAI, not yet tested by OpenSourcesAI | Only through an LLM gateway that speaks the Anthropic Messages, Amazon Bedrock or Google Cloud format (ANTHROPIC_BASE_URL and siblings). Anthropic "doesn't support routing Claude Code to non-Claude models through any gateway"; no OpenAI-compatible or local-model route is documented |
| Interface | Full-screen, mouse-interactive terminal TUI | Terminal TUI, plus VS Code extension, JetBrains plugin, desktop app and web |
| Headless mode | Documented: grok -p "prompt" --output-format json (-p, --single) | Documented: claude -p "prompt" with --output-format text, json or stream-json (-p, --print) |
| Editor integration | Agent Client Protocol: grok agent stdio runs the agent over JSON-RPC on stdin/stdout for ACP-capable editors | First-party VS Code and JetBrains extensions; ACP is not documented by Anthropic (a third-party adapter built on the Agent SDK exists) |
| MCP | Client: [mcp_servers.<name>] in config.toml with stdio or URL servers, managed from /mcps. Server mode: not documented | Client (stdio, HTTP, SSE) and server: claude mcp serve exposes Claude Code as a stdio MCP server |
| Subagents / hooks / skills | Documented: subagents, hooks, skills, plugins and marketplaces; /import-claude imports Claude settings | Documented: subagents, hooks, skills, plugins, agent teams and an Agent SDK for custom agents |
| Contribution model | "External contributions are not accepted"; issues and discussions are disabled on the repository | GitHub issues and the in-product /bug command are the feedback channels; the CLI source is not published, so there is nothing to send code to |
Practical pick
If your first question is 'can I read the code that is editing my files', Grok Build answers it and Claude Code does not: xAI publishes the harness under Apache 2.0 and the README shows the cargo build, while Anthropic ships a signed native binary under its Commercial Terms of Service. If your first question is 'which one is the more finished product for a Claude model', Claude Code answers it: it has first-party VS Code, JetBrains, desktop and web surfaces, MCP in both directions, subagents, hooks, skills, plugins and an Agent SDK, and Anthropic's docs are unusually explicit about what each piece does.
The two harnesses are closer than the licence gap suggests. Both are full-screen terminal agents that read files, run commands and search the web, both have a headless flag for scripts and CI, both speak MCP as clients, and both ship subagents, hooks, skills and plugins. Grok Build even documents an /import-claude command for bringing Claude settings across. What separates them is the model layer: who hosts it, what it costs, and whether you are allowed to swap it.
The local-model angle
This is where the comparison stops being symmetrical. xAI's docs describe a [model.<id>] table in ~/.grok/config.toml with model, base_url, name, env_key or api_key, api_backend (chat_completions, responses or messages) and context_window, so the harness can be pointed at Ollama's OpenAI-compatible endpoint at http://localhost:11434/v1. OpenSourcesAI has not run that configuration yet, and xAI does not say whether a local default lets you skip the first-run xAI sign-in, but the route is documented and the config below is what the docs imply.
Claude Code has no equivalent. Its ANTHROPIC_BASE_URL variable points at an LLM gateway, and the gateway protocol reference says the gateway must expose the Anthropic Messages, Amazon Bedrock or Google Cloud format; there is no OpenAI Chat Completions row. Anthropic's gateway page states that it does not support routing Claude Code to non-Claude models through any gateway, and gateway model discovery only keeps model IDs that contain 'claude' or 'anthropic'. So if running the agent against a model on your own GPU is the goal, the honest comparison is Grok Build against Aider, OpenCode or Continue, not against Claude Code.
# ~/.grok/config.toml (keys per docs.x.ai; Ollama values per docs.ollama.com)
# Documented by xAI and Ollama; not yet tested end to end by OpenSourcesAI.
[models]
default = "local-coder"
[model.local-coder]
model = "qwen2.5-coder:14b"
base_url = "http://localhost:11434/v1"
name = "Qwen2.5-Coder 14B (Ollama)"
api_key = "ollama"
api_backend = "chat_completions"
context_window = 32768Honesty notes
Every cell in the table above is read from vendor documentation on 16 August 2026, and both products change quickly, so re-check the linked pages before you rely on a detail.
- Grok Build's harness is open (Apache 2.0, first-party source, buildable), its default model is not (Grok 4.6, hosted and metered), and xAI does not accept external contributions. All three are true at once.
- Claude Code's licence status is read from LICENSE.md in anthropics/claude-code and from the contents of that repository, which holds no CLI source. Anthropic's setup page says the npm package installs the same native binary as the standalone installer.
- Grok Build's local-model route is documented by xAI, not yet tested by OpenSourcesAI. We could not find an Ollama-specific example on docs.x.ai on 16 August 2026; the recipe here applies the documented keys to Ollama's documented endpoint.
- Whether a custom local default lets Grok Build skip the first-run xAI sign-in is not documented and not verified.
- Before its source was published, the closed Grok CLI (v0.2.93) uploaded entire tracked git repositories to an xAI-controlled bucket regardless of the privacy toggle; the analysis was published on 12 July 2026, uploads were stopped server-side on 13 July, and the open-source release followed on 15 July. Read the tool page for the full sequence.
- Neither price is a recommendation. Grok 4.6 is metered per token; Claude Code needs a paid Claude plan or Console account, and Anthropic's costs page puts the enterprise average around $13 per developer per active day.
Setup difficulty
Both install with a one-line pipe-to-shell command and both offer package-manager routes (Grok Build: build from source with cargo; Claude Code: Homebrew, WinGet, apt, dnf, apk, npm). Grok Build with a local model is intermediate: you edit config.toml and size a model to your GPU. Claude Code is beginner to intermediate, but it requires a paid Claude plan or a Console account before the first prompt.
Best use cases
- Terminal-first agentic coding
- Headless runs in scripts and CI
- Reading and auditing the agent harness itself (Grok Build)
- Local-model coding on your own GPU (Grok Build; documented, not yet tested here)
- Claude-model workflows with IDE, desktop and web surfaces (Claude Code)
Limitations
- Grok Build's default model is hosted and metered by xAI; an open harness does not make the model local
- Claude Code is proprietary: its GitHub repository carries no CLI source, and Anthropic's docs say it does not support routing Claude Code to non-Claude models through any gateway
- Neither local route has been tested by OpenSourcesAI: Grok Build's is documented, Claude Code has none to test
- Both edit files and run commands autonomously; keep human review in the loop whichever model is behind them
Related links
FAQ
Can Claude Code use a local model through Ollama?
Not through any route Anthropic documents. ANTHROPIC_BASE_URL points at an LLM gateway that must speak the Anthropic Messages, Amazon Bedrock or Google Cloud format, Anthropic says it does not support routing Claude Code to non-Claude models through any gateway, and gateway model discovery only keeps IDs containing 'claude' or 'anthropic'. For a local model in a terminal agent, look at Grok Build's documented custom-endpoint route, Aider, OpenCode or Continue.
Is Grok Build fully open source?
The harness is: xAI licenses first-party code under Apache 2.0 and you can build the binary with cargo. The default model, Grok 4.6, is hosted and metered by xAI, and xAI does not accept external contributions. Open harness, closed model, no community steering: all three at once.
Which one costs less?
It depends on how you use them. Grok 4.6 is metered per token through xAI's API. Claude Code needs a paid Claude plan or a Console account billed by token consumption. Grok Build's local route replaces the per-token bill with hardware, electricity and a smaller model, and OpenSourcesAI has not yet measured how well that trade works in practice.
Sources
Keep building your stack
Browse related tools and models next, or use the submit page to suggest a comparison, tool, or workflow that should be reviewed.