Field guide · Agent runtimes · July 2026 · updated

Agent harnesses compared: open, closed, and the messy middle

OpenClaw, Hermes, OpenCode, Pi - and the three lab coding agents most people actually sit in front of: Claude Code, Codex, and Grok Build. What a harness provides, how open vs closed really splits, why people pick one over another, and live star counts.

Stars: 2026-07-25 Open + lab harnesses Related: AI coding field guide

1. What a harness actually provides

When people say "agent," they usually mean a model + a harness. The model reasons. The harness is everything that makes reasoning useful:

Execution

  • Tool loop (call → observe → continue)
  • File ops, shell, LSP, browser, MCP
  • Subagents, plan mode, parallel work

State

  • Sessions, branching, compaction
  • Long-term memory / retrieval
  • Skills, plugins, marketplaces

Control

  • Permissions, sandboxes, path guards
  • Steer / interrupt mid-run
  • Model routing, rollback, audit

Surface

  • TUI, desktop, IDE, web, mobile
  • Chat apps (Telegram, Slack…)
  • Cron / gateway / cloud dispatch
Same model, different harness = different product. Claude on Claude Code is not Claude on OpenCode. Grok in Grok Build is not Grok in Pi. The harness owns context policy, tool schemas, safety gates, and UX - which is why "which model is best" is often the wrong question.

2. Open vs closed - the real axes

Discourse often collapses to "open source good / closed bad." Builders actually choose along three separate axes:

Axis What it means Why it matters
Harness license Can you read, fork, self-host, audit the agent loop? Escape hatches, custom tools, compliance review
Model / API lock-in Do you need that lab's subscription/API? Cost, data residency, rate limits, vendor risk
Product surface TUI only vs cloud agents vs messaging OS Who runs the process and where secrets live

Where each product actually sits (2026-07-25)

Product Harness Typical model License note
Claude Code Closed product Claude (Anthropic) Public GitHub (~139k ★) but no SPDX open license - treat as proprietary
Codex CLI Open (Apache-2.0) OpenAI / ChatGPT plans Rust CLI open; cloud Codex is a managed service
Grok Build Open (Apache-2.0) Grok / SuperGrok / API Rust harness open-sourced (xai-org/grok-build); model still xAI
OpenCode Open (MIT) Any of 75+ providers BYOK open coding product
Pi Open (MIT) Any / local Minimal toolkit; max forkability
Hermes Open (MIT) Any / local Self-improving general agent
OpenClaw Open (source available) Any (ChatGPT sign-in etc.) Personal multi-channel assistant; huge ecosystem
OpenAI's framing on X (Codex team): pride in building Codex "in the open" with an OSS repo and app-server for builders - contrasted with proprietary lab agents. That is the competitive story labs now tell: open the harness even when the model stays paid.
Community pattern: people run closed desk agents for quality (Claude Code) and open harnesses for BYOK, local models, and always-on life ops. Forks like OpenClaude exist precisely because Claude Code quality is desired without Anthropic-only binding.

Practical takeaway: if your constraint is auditability / BYOK / local, start with OpenCode, Pi, Codex CLI (harness), or Grok Build (harness). If your constraint is max interactive coding reliability, community still points at Claude Code first, with Codex as the ChatGPT-native peer. If your constraint is always-on multi-channel life, that is OpenClaw/Hermes territory - not Claude Code.

3. GitHub stars snapshot

Live via GitHub API on 2026-07-25. Stars measure attention, not "best for production."

Always-on / community agents

OpenClaw
384,048
Hermes
220,039
OpenCode
189,407
Claude Code
138,973
Codex
101,252
Pi
77,084
Grok Build
22,354
Approximate GitHub star growth for open community harnesses
Schematic growth for the four open community harnesses (create date → live count). Lab agents: Claude Code and Codex are older public repos with different open/closed stories; Grok Build's public harness repo is new (mid-2026) and climbing fast after open-source.
Repo Stars License Lang Role
openclaw/openclaw384,048source-availableTSPersonal multi-channel assistant
NousResearch/hermes-agent220,039MITPythonSelf-improving agent
anomalyco/opencode189,407MITTSOpen coding agent product
anthropics/claude-code138,973no open SPDXPython/npmAnthropic coding product
openai/codex101,252Apache-2.0RustOpenAI coding agent CLI
earendil-works/pi77,084MITTSMinimal coding harness
xai-org/grok-build22,354Apache-2.0RustxAI coding agent TUI/harness

Interactive multi-repo charts: star-history.com (all seven).

4. Claude Code, Codex, Grok Build (lab desk agents)

These three dominate "what do I run in the terminal for serious coding?" They are the quality bar open harnesses chase - and often the workers that OpenClaw/Hermes shell out to.

Claude Code - proprietary depth leader

≈139k ★ on GitHub · Anthropic · no open SPDX license · code.claude.com

Anthropic's agentic coding product: terminal, IDE plugins, desktop, web, GitHub tagging. Community consensus in comparisons (Firecrawl, Omid Saffari, ByteIota, etc.): safest default for multi-file refactors and production-grade interactive coding. Strengths: maturity, ecosystem, long-context workflows, "it just works" depth. Weaknesses: vendor lock to Claude, subscription cost, cannot truly fork the product (despite a public repo).

"Claude Code is the safe default for real production work… Codex CLI wins if you already live in ChatGPT… Grok Build is the cheapest practical way in if you're already paying for X." - synthesis of 2026 comparison guides + community framing

Codex - open CLI, ChatGPT-native cloud

≈101k ★ · Apache-2.0 · Rust · openai/codex

Two faces: Codex CLI (open source, local) and Codex cloud / app (managed sandboxes, PR workflow, ChatGPT surfaces). OpenAI markets weekly shipping velocity and high weekly active use. Community loves: sandbox-first safety, speed, ChatGPT plan inclusion, open harness for builders. Community friction: guardrails "too safe" for some tasks; free/Go plan usage limits.

Strategic open-source play: app-server and CLI so other tools can build on Codex auth/usage - OpenAI has publicly contrasted this with closed competitors.

Grok Build - open harness, xAI models, watch the cloud path

≈22k ★ · Apache-2.0 · Rust · xai-org/grok-build · docs.x.ai/build

Fullscreen mouse-interactive TUI, headless mode, ACP for editors, custom models via ~/.grok/config.toml. Pitched as SuperGrok / X Premium Plus coding agent; harness source is open and buildable. Strengths: cost if you already pay for X/SuperGrok; extensibility; open Rust codebase. Risks: still maturing vs Claude Code; July 2026 reports that the CLI uploaded full git bundles to cloud storage (uploads stopped; Musk said prior uploads would be purged) - a trust scar for enterprise and security-minded users.

Security lesson: "open source harness" does not mean "does not phone home." Read network behavior and defaults. Grok Build's incident is why auditability of the harness still matters even when the repo is Apache-2.0.

5. The four open community harnesses

OpenClaw - personal AI in your chats

≈384k ★ · TypeScript · openclaw.ai

Always-on multi-channel assistant (WhatsApp, Telegram, Discord…). Control plane + ClawHub marketplace. Not a pure coding TUI - it often delegates coding to Claude Code / Codex / OpenCode. Love: ecosystem scale, "lives in Telegram." Risk: weight, update churn, shell+messaging blast radius.

Hermes Agent - self-improving ops runtime

≈220k ★ · Python · MIT · Nous Research

Learning loop, memory, cron/VPS, desktop apps, OpenClaw migration. Outer agent that improves at your workflows. Love: skills from experience. Risk: token hunger; not always best pure coding desk agent (people shell out to OpenCode/Claude Code).

OpenCode - open coding product

≈189k ★ · MIT · opencode.ai

Terminal + desktop + IDE; LSP; multi-session; 75+ providers. The open "Claude Code alternative" when you want BYOK and product polish. Tradeoff vs Pi: more UX, more context weight.

Pi - minimal harness you reshape

≈77k ★ · MIT · pi.dev

Four tools, tiny system prompt, TypeScript extensions. Best token budget for local models; foundation under larger products (OpenClaw integration cited by Pi). Tradeoff: more DIY unless you use omp (oh-my-pi).

6. Head-to-head matrix (coding desk agents)

Dimension Claude Code Codex Grok Build OpenCode Pi
What it is Anthropic coding agent product OpenAI local CLI + cloud agents xAI coding TUI / harness Open BYOK coding agent Minimal coding toolkit
Harness open? No (public repo, closed license) Yes (Apache-2.0) Yes (Apache-2.0) Yes (MIT) Yes (MIT)
Stars ~139k ~101k ~22k ~189k ~77k
Model freedom Claude family OpenAI + plan auth Grok + custom models config 75+ providers 15+ / local easy
Philosophy Max interactive depth Sandbox + open CLI + cloud Fullscreen TUI + open runtime Productized open coding Primitives, not features
Best for Hard multi-file production work ChatGPT users; safe autonomy X/SuperGrok users; open TUI BYOK open desk coding Local models; custom harnesses
Watch-outs Vendor lock; cost Guardrails; plan limits Maturity; past upload incident Heavier than Pi locally More DIY setup

OpenClaw and Hermes intentionally omitted from this coding-desk table - they win on always-on multi-channel life ops, not Terminal-Bench style desk coding. See sections 5 and 7.

7. Why people choose one over another

Claude Code if…

  • You optimize for coding reliability over openness
  • Multi-file refactors and long agent sessions
  • You already pay Anthropic Max/Pro

Codex if…

  • You live in ChatGPT and want included agent usage
  • You want an Apache-2.0 CLI to audit/fork
  • Cloud sandbox / PR-centric workflows matter

Grok Build if…

  • You already pay SuperGrok / X Premium Plus
  • You want an open Rust TUI harness
  • You accept newer product + verify network defaults

OpenCode / Pi if…

  • BYOK, multi-provider, or local models
  • You want MIT code you fully control
  • Pi for thin prompts; OpenCode for polish

OpenClaw if…

  • Always-on multi-channel assistant
  • Marketplace skills (ClawHub)
  • Coding is delegated to a desk agent

Hermes if…

  • Self-improving automations + memory
  • VPS/cron personal ops
  • Migrating from OpenClaw with skill import

Composition (what "the stack" looks like)

"I use Hermes as a developer, using opencode. So you set goal to Hermes, and it uses opencode to reach it." - community stack pattern (also applies with Claude Code / Codex as the coding worker)

8. How to pick (short decision tree)

  1. Is the primary job always-on chat / life ops? → OpenClaw or Hermes.
  2. Is the primary job interactive coding?
    • Max quality, accept closed product → Claude Code.
    • ChatGPT plan + open CLI → Codex.
    • X/SuperGrok + open TUI → Grok Build (verify privacy defaults).
    • BYOK multi-provider product → OpenCode.
    • Local / minimal / embeddable → Pi (or omp).
  3. Do you need both? Compose outer + inner. Do not force one harness to be everything.
  4. Security: any shell agent is a junior engineer with your keys. Sandbox first. Marketplace skills second. Read what the binary uploads.

9. Methods and caveats

Update cadence: lab agents ship weekly; licenses and cloud behavior change. Re-check stars, licenses, and privacy defaults before standardizing a company workflow.