Repository navigation
feat(core): add a native Grok Build CLI harness - #300
Conversation
Grok Build is a fourth CLI agent, with Claude Code, Codex and OpenCode. It
runs against xAI directly, and not through the AI Gateway. Its runner and
parser hold four things that apply only to Grok.
- GROK_HOME keeps a run separate from the user. If you do not set it, the
CLI reads the `~/.grok` directory of the user. Then the scorers measure
tools that the experiment did not declare. The runner sets GROK_HOME in
the shell command, and not in the sandbox `env` map. The sandbox uses
`docker exec --env`, which does not expand `$HOME`. An unexpanded value
makes a directory with the name `$HOME` in the workspace, and the
scorers then measure that directory.
- The MCP configuration is TOML, not JSON. Each server becomes an
`[mcp_servers.<name>]` table with an `env` table in it. The runner also
stops the skills marketplace. Thus an evaluation uses only the skills
that it declares.
- The CLI sends one `text` or `thought` event for each token. The parser
joins the adjacent events of one type into one event. One tool call
sends more than one `tool_call_update` event, thus the parser sends one
result at the end.
- The CLI does not show the MCP tools directly. Grok finds a tool with
`search_tool`, then starts it with `use_tool`. The parser divides the
name and gives the scorers the same `{kind:'mcp', server, toolName}`
data that Claude Code and Codex give.
The usage data, the stop reasons and the tool names agree with the other
harnesses. For example, a run that stops at the time limit gives no usage
data, because Claude Code and Codex also give none.
This change also adds `spacexai` as a model provider, and adds its labels
and icon to the web app. It sends XAI_API_KEY to the eval-refresh workflow
and to the Vercel sandbox runner, for remote runs.
Grok Build reads `.claude/skills` natively. But the skills CLI has no `grok`
agent id, thus `SKILLS_PATH_BY_AGENT` gives grok a null scope. The
`claude-code` entry populates the directory that grok reads.
Every other benchmark agent has a `-no-skills` twin, which runs the same model with no skills. The difference between the two shows how much the Supabase skills help that model. Grok had no twin, thus it was absent from the no-skills comparison. The two experiments differ only in `suite` and `skills`.
The fixture carried the session id from the real run it came from. The parser does not read that field, and the Claude Code and Codex fixtures use short synthetic ids (`s1`, `t1`).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Interesting to see Grok Build topping the chart overall!
Before merging this I'll plan to pull this branch up to speed with |
👍 Confirming I see "high" as the default on https://docs.x.ai/developers/grok-4-6#at-a-glance |
|
Due to the quirk in AI-1005 I'm triggering the refresh in 2 phases. With skillsgh workflow run eval-refresh.yml --ref feat/grok-native-harness -f suite=benchmark -f experiment_suite=benchmark -f experiments=grok-4.6 -f runs=3 -f merge=true -f commit_to_branch=trueRun: 🟢 https://github.com/supabase/evals/actions/runs/35393677080 Notes:
Without skillsgh workflow run eval-refresh.yml --ref feat/grok-native-harness -f suite=benchmark -f experiment_suite=no-skills -f experiments=grok-4.6-no-skills -f runs=3 -f merge=true -f commit_to_branch=trueRun: 🟢 https://github.com/supabase/evals/actions/runs/35395340881 |
Brings in #300 (native Grok Build CLI harness). Two conflicts, both additive on each side, resolved by keeping both: - `.github/workflows/eval-refresh.yml`: `XAI_API_KEY` alongside the `SUPABASE_CLI_{STABLE,BETA}_VERSION` run pins, in both the job `env` block and the `.env` heredoc. - `apps/framework/scripts/run-vercel-evals.ts`: `XAI_API_KEY` added to `FORWARDED_ENV_NAMES` ahead of the CLI version pins.



What's inside
Adds Grok Build, xAI's coding agent, as a fourth CLI harness alongside Claude Code, Codex and OpenCode.
Grok Build is xAI's coding agent. It calls the xAI API directly, so it needs XAI_API_KEY rather than the gateway key the other harnesses share.
Results
23 benchmark evals × 3 runs on Vercel Sandboxes.
Not comparable to the other rows yet: they were last refreshed on 2026-09-09 (d462078), so they predate #278, #240 and #241, including the system-prompt removal that #241 calls a scoring change.
How to review
Needs XAI_API_KEY in .env. Use --concurrency 1 locally; Docker drops containers under load and reports it as a timeout with a 0 score.
pnpm eval -- --experiment grok-4.6 --eval resolve-dataapi-001-empty-results
Follow up tasks
Ref AI-1143