---
title: "Rust harness wars: grok-build vs codex"
description: "We cloned xAI's grok-build and OpenAI's codex and read both line by line, twenty subsystems each, to see where two labs building the same coding agent actually diverge."
url: "https://ara.so/blog/rust-harness-wars"
section: "Blog"
---

# Rust harness wars: grok-build vs codex

_We cloned xAI's grok-build and OpenAI's codex and read both line by line, twenty subsystems each, to see where two labs building the same coding agent actually diverge._

Jul 2026 · research

Two of the most capable terminal coding agents in the world are written in Rust, ship as a single binary, and were open sourced within months of each other: xAI's grok-build, the grok CLI, and OpenAI's codex. We cloned both and read them line by line, roughly a hundred analysis agents across twenty subsystems, to answer one question. When two labs build the same tool, where do their instincts actually diverge?

The uncomfortable starting point is in grok-build's own THIRD-PARTY-NOTICES. It ports tool implementations from openai/codex and sst/opencode. This is not a clean room rivalry. It is a descendant remixing its ancestor, which makes the places they differ all the more revealing.

## One skeleton, two instincts

Read side by side, the two agents share a near identical skeleton. A single session actor sits behind a typed message boundary. One binary wears many thin faces: an interactive terminal UI, a headless exec mode, and an editor server. The core loop is the same, sample the model, run the tools it asks for, repeat until it stops. Both persist an append only log as the durable source of truth, both compact the conversation when the context window fills, both can resume and fork a session.

So the interesting part is not the shape. It is what each team refused to compromise on once they had it. Codex subtracts. grok-build reaches.

## Codex subtracts

Codex is the work of a team that owns its model and optimizes for control, safety, and a small surface. Its instinct is to delete optionality. It removed the older chat wire protocol so there is exactly one path to the model. It dropped temperature and top-p sampling in favor of a single reasoning effort knob. It refuses to be a provider marketplace, shipping only a short list of first party backends.

That focus buys depth on the surfaces that actually bite. A three platform sandbox built from source for determinism. A policy engine with per turn, feature gated tool planning. An approval and escalation layer wrapped around every command the model runs. A review enforced rule that the model visible history is sacred and is never rewritten. Codex reads like a platform team building for a fleet of machines it will never see.

## grok-build reaches

grok-build is more architecturally ambitious and, in places, less finished. It deleted nothing and reached further. A machine wide leader process serves many warm clients over the Agent Client Protocol, the emerging cross vendor standard, used here as the internal wire rather than a bolt on. A provider agnostic sampler fans out to three different model protocols, so adding a provider is config, not code. Memory is a real subsystem, markdown files indexed for retrieval rather than a grep over past turns. It ships a tree sitter code graph for structural navigation, and session memory that compounds across runs.

This is the topology of a tool designed to live inside other people's environments and outlast any single model. grok-build hedges against lock in the same way codex hedges against untrusted machines.

## The scorecard

Across the twenty subsystems we compared, codex holds the stronger design on eleven, the two are a genuine toss up on eight, and one is a tie. grok-build does not win an axis outright, and the reason is honest. codex is a mature, upstream product. grok-build is a v0.1 alpha, and it shows.

But the eight toss ups are where the ambition pays off. Broader model support, memory retrieval, the editor protocol, cloud execution, and exact cost accounting are all places where reaching further produced a genuinely different, sometimes better, answer. A tally that reads eleven to nothing on paper is really a story about maturity racing ambition.

## Skills, memory, and tools

On skills, both adopt the same SKILL.md convention with progressive disclosure, only a name and description in context until a skill is actually opened. grok-build optimizes for interoperability, reading Claude and Cursor skill directories unmodified, so an existing library just works. codex optimizes for depth, where a skill is a folder with scripts, references, and UI metadata, a richer unit of capability.

On memory, codex keeps the raw transcript and rebuilds from it. grok-build runs a dedicated crate that persists human editable markdown and indexes it for retrieval. On tools, codex splits a tool into a model visible spec and an execution runtime with a whole governance middleware on top. grok-build models tools as a strict three crate contract, cleanly separated but lighter on the safety layer. The same pattern repeats everywhere. codex builds the deeper machine, grok-build builds the more portable one.

## The alpha tax

grok-build's reach comes with a bill, and reading the source makes it concrete. A configuration signing subsystem ships with two thousand lines of tests but no embedded public keys, so it is effectively inert. Hooks fail open, which means a crashed safety hook silently stops enforcing. The sandbox covers two platforms where codex covers three. There is an unsafe pointer cast in the terminal UI guarded by hand rather than by the type system.

None of this is fatal for an alpha, and most of it is the ordinary signature of a young project whose threat model thinking has outrun its shipped hardening. But it is the price of building the more ambitious thing before the more finished one.

## Why we care

Ara is a company built around agent harnesses, so reading two of the best in the world from the inside is not idle curiosity. The lesson is the one we keep relearning. The model is a commodity you rent. The harness is the product you own. Codex and grok-build are two credible bets on what that harness should be, one subtractive and safe, one additive and portable, and the gap between them is the whole game.

## How this was built

Both repositories were cloned and read from source, not from documentation or memory. A multi agent workflow fanned out roughly a hundred analysis agents: architecture mappers, forty subsystem readers running one per repo across twenty dimensions, twenty head to head comparators, and a synthesis panel, each returning a schema validated analysis. Maturity and edge calls are judgments from the code as read, not vendor claims. grok-build at v0.1.220 alpha, codex at current main.
