Best agent harnesses for programming (2026)
2026 harness layer for programming agents: loop, tools, memory, sandbox, evals, and orchestration — who ships it, what the evidence shows, what is contested.
Best agent harnesses for programming (2026)
Generated by Grok Bot research on 2026-08-27. WebSearch + WebFetch + native X. Treat as raw material — review before promoting.
Summary
A programming agent harness in 2026 is the software around a model — loop, tools, context/memory, sandbox, hooks, and orchestration — not the model itself. Anthropic and LangChain both use that split. The leading shipped products are Anthropic’s Claude Code / Claude Agent SDK, OpenAI’s Codex CLI plus AGENTS.md, and the MIT, model-agnostic OpenHands Software Agent SDK. Official Terminal-Bench 2.0 shows the same model swinging ~16–18 points across harnesses; Codex CLI + GPT-5.5 is the highest official vendor CLI (82.2%), while Claude Code + Opus 4.6 sits at 58.0%. Contested: CLAUDE.md vs AGENTS.md, whether to add or strip scaffolding, and whether eval-optimized harnesses transfer to daily coding.
Findings
What a programming agent harness is
Anthropic (2 Apr 2026) defines an agent harness as “the software scaffolding around a model: the loop, tools, context management, and guardrails that turn raw intelligence into a working agent,” and harness design as deciding what belongs in that scaffolding and what to remove as models improve. LangChain (10 Mar 2026) states the same boundary as “Agent = Model + Harness” and “if you’re not the model, you’re the harness,” listing system prompts, tools/skills/MCP, filesystem/sandbox/browser, subagent orchestration, and hooks (compaction, continuation, lint).
That is distinct from an IDE recap. The product (Claude Code, Codex, Cursor) is one packaging of a harness. The reusable substrate is now also sold as an SDK: Anthropic’s Claude Agent SDK (“the same tools, agent loop, and context management that power Claude Code”), OpenHands’ Software Agent SDK (Python/REST engine behind OpenHands CLI and Cloud), and OpenAI’s Codex runtime with permission profiles and AGENTS.md.
Who ships the leading ones
Claude Code / Claude Agent SDK (Anthropic). Official docs list built-in file/shell/web tools, hooks, subagents, MCP, permissions, sessions, skills/commands/memory from .claude/ and ~/.claude/, and plugins (Agent SDK overview). Dynamic workflows (2 Jun 2026) let Claude write a JavaScript orchestrator that spawns isolated subagents — classify-and-act, fan-out-and-synthesize, adversarial verification, tournament, loop-until-done — to fight agentic laziness, self-preferential bias, and goal drift. Trigger word ultracode. Authors warn workflows use more tokens and are for high-value tasks, not every edit.
Codex CLI (OpenAI). Official permissions treat sandbox as a first-class policy language: built-ins :read-only, :workspace, :danger-full-access; filesystem read/write/deny; optional network proxy + domain allowlists; macOS Seatbelt, Linux/WSL bubblewrap+seccomp, Windows elevated sandbox users. Profiles do not compose with older sandbox_mode. Official AGENTS.md is the instruction chain (global ~/.codex, then repo-root-to-cwd walk, override files, 32 KiB default cap, fallback filenames). On Terminal-Bench 2.0, Codex CLI + GPT-5.5 is rank 4 at 82.2%±2.2 (23 Apr 2026).
OpenHands Software Agent SDK (All Hands / OpenHands). Official SDK is MIT, model-agnostic, coding-specific, with bash/file/browser/MCP tools, Docker/K8s server, and an OpenAI-compatible endpoint. Architecture splits openhands.sdk (agent loop, tools, skills, condenser, security), openhands.tools, openhands.workspace (local / Docker / remote), and openhands.agent_server. Same agent code swaps LocalWorkspace → DockerWorkspace → RemoteAPIWorkspace. The product GitHub page reports 85,281 stars (thin fetch; README body not extracted). Docs claim OpenHands is “becoming the preferred harness for evaluating LLMs on coding tasks” (SDK); Terminal-Bench 2.0 places OpenHands + Claude Opus 4.5 at 51.9%±2.9 (leaderboard) — strong open platform, not the TB winner.
Eval-specialized / research harnesses. Terminal-Bench 2.0 is itself a Harbor eval harness (harbor run … -k 5, no timeout/resource overrides). Top rows as of the fetched page: NexAU-AHE + GPT-5.5 84.7%; LemonHarness 84.5%; Capy + GPT-5.5 83.1%; then Codex CLI. Also listed: Factory Droid, JetBrains Junie CLI, LangChain Deep Agents (66.5% with GPT-5.2-Codex), Gemini CLI, Warp, Goose (Block), OpenCode, Princeton Mini-SWE-Agent (42.5% with Sonnet 4.5). These are harnesses optimized for containerized terminal tasks, not necessarily daily IDE use.
Layer map (loop, tools, memory, sandbox, orchestration, evals)
Loop. Anthropic and OpenHands both describe a ReAct-style plan → tool → observe → repeat. OpenHands names this the reasoning-action loop inside Agent + Conversation. LangChain adds Ralph-style “don’t let the model exit” hooks that reinject the goal against filesystem state. Anthropic long-running apps (24 Mar 2026) contrasts context resets (clean slate + handoff file; needed for Sonnet 4.5 “context anxiety”) with compaction (summarize in place; enough for Opus 4.5+).
Tools. Anthropic’s load-bearing claim: Claude 3.5 Sonnet hit 49% SWE-bench Verified with only bash + a text editor, and Claude Code is grounded in those same tools (harness design). Skills, programmatic tool calling, and the memory tool are compositions of bash/editor. Dedicated typed tools stay for UX, observability, or hard-to-reverse actions. Codex encodes the same idea as schema-first exec plus a separate permission engine (permissions).
Memory / instructions. Two competing file standards. Codex official: AGENTS.md with global + nested overrides. Claude Code official: CLAUDE.md / .claude/ skills (Agent SDK; dynamic workflows mine sessions back into CLAUDE.md). Anthropic reports a memory-folder lift on BrowseComp-Plus from 60.4% to 67.2% for Sonnet 4.5, and compaction scaling Opus 4.6 to 84% on BrowseComp vs Sonnet 4.5 stuck at 43% (harness design). Discourse: Shopify CEO Tobi Lütke threatened to ban Claude Code until it reads AGENTS.md (X, primary); Claude Code staff Thariq Shihipar said they will add AGENTS.md/system-prompt hackability, but argued model families are not interchangeable so Claude.md stays default (X, primary).
Sandbox. Codex’s documented default is least-privilege local execution with platform enforcement that refuses a command if the policy cannot be applied (permissions). OpenHands’ production path is container/remote isolation (SDK architecture). Claude Code’s published security story is permissions + auto-mode (a second Claude judging bash) rather than a full OS jail in the fetched docs (harness design). OpenAI’s official X post on the Hugging Face incident is a primary that existing agent safeguards can fail in the wild (X, primary).
Orchestration. Two official Anthropic patterns: (1) strip the harness and let the model orchestrate via code exec — BrowseComp 45.3% → 61.6% when Opus 4.6 filtered its own tool outputs (harness design); (2) add a planner/generator/evaluator multi-agent harness for long-horizon apps, with sprint contracts and Playwright QA (long-running apps). Dynamic workflows are the productized version of (2) (dynamic workflows).
Evals. Harbor / Terminal-Bench 2.0 is the public harness-vs-harness table. Same-model swing on the fetched page: Claude Opus 4.6 is 58.0% in Claude Code, 74.7% in Terminus-KIRA, 75.3% in Capy, 76.4% in Stanford IRIS Meta-Harness. GPT-5.5 is 82.2% in Codex CLI vs 84.7% in NexAU-AHE. LangChain claims a harness-only jump of Deep Agents from top-30 to top-5 on TB 2.0 (anatomy post); the fetched leaderboard has Deep Agents + GPT-5.2-Codex at 66.5% (rank 27).
Cost and “best” are not the same axis
Anthropic’s own long-running experiment: solo Opus 4.5 built a broken game maker in 20 minutes for $9; the full planner/generator/evaluator harness ran 6 hours for $200 and produced a playable app (long-running apps). The simplified Opus 4.6 DAW harness was ~4 hours / $124.70. Discourse (not a lab measurement): Xiaoyin Qu claimed the same task cost $150 on Claude Code vs $2 on DeepSeek’s harness and launched AgentSky as an “OpenRouter for agents” (X, discourse).
Claude Code creator Boris Cherny’s recent primary posts are about using the loop, not ranking harnesses: shared memory got simpler (X, primary); Opus is used to “hill climb” profiler-closed loops until a numeric target (X, primary).
Contradictions and open questions
-
Vendor default vs eval-optimized harness. TB 2.0 says Claude Code is not the best container for Opus 4.6 on that bench; specialized harnesses beat it by ~16–18 points. Anthropic and LangChain both say models are post-trained inside a vendor harness and can overfit (LangChain cites Codex
apply_patch). Unresolved: how much of the TB gap is reward-hacking / timeout policy vs a real daily-coding gap. Harbor forbids timeout/resource overrides; that does not prove transfer to a laptop repo. -
Add scaffolding vs strip it. Same lab, same month-range: long-running apps shows a three-agent harness 20× more expensive and qualitatively better than solo; harness design says prune dead weight (“what can I stop doing?”) because context-reset scaffolding for Sonnet 4.5 became useless on Opus 4.5. Dynamic workflows then adds orchestration. The consistent rule is “complexity must earn its keep,” not a universal more-or-less.
-
CLAUDE.md vs AGENTS.md. OpenAI documents AGENTS.md as the instruction standard (official guide). Anthropic still ships CLAUDE.md as native. Tobi (primary) vs Thariq (primary) vs Kun Chen (discourse: “industry already has a standard”) (Tobi, Thariq, Kun Chen). Codex already has
project_doc_fallback_filenames; Claude Code’s promised AGENTS.md support was “working on it” as of 25 Aug 2026, not fetched as shipped. -
OpenHands “preferred eval harness” vs the public TB table. OpenHands SDK docs claim preferred-eval status and SOTA on SWE-bench/SWT-bench/multi-SWE-bench. TB 2.0 has OpenHands well below Codex CLI and several closed CLIs. Those claims can both be true if they refer to different benches and dates; this pass did not fetch SWE-bench.org numbers.
-
Karpathy. Recent @karpathy posts in this window are not a harness ranking. Closest discourse: tearing down abstractions now that agents can do the math and verification (X). No 2026 Karpathy “best harness” primary found.
-
Gaps this pass did not close. OpenAI Codex product overview (
developers.openai.com/codex) timed out. Grokipedia search 502’d twice;tool-useandModel_Context_Protocolpage-preview returnedfound: false. SWE-bench.org / OpenHands Index not fetched. Cursor / Copilot / Windsurf / Devin treated as already-covered product layer and not re-surveyed. Harbor’s own Terminus 2 is an eval agent, not a daily driver.
Provenance
Method: Grok Bot / WebSearch / WebFetch / native X Generated: 2026-08-27 Rounds: 3 (Round 1 definition + shippers; Round 2 official harness posts + TB 2.0 + Codex sandbox; Round 3 AGENTS.md + OpenHands architecture + X hydration). Early-exit not taken: Round 2 opened the CLAUDE.md/AGENTS.md and TB-swing questions that Round 3 resolved enough to write. URLs fetched: 11 successful, 4 failed (15 attempts). X: 7 cited permalinks (plus account scans that produced no extra harness claims).
Web sources:
- Harnessing Claude's intelligence — Anthropic definition + prune-vs-add + BrowseComp numbers
- The anatomy of an agent harness — Agent = Model + Harness
- Claude Agent SDK overview — same loop as Claude Code
- A harness for every task — ultracode dynamic workflows
- Harness design for long-running apps — reset vs compaction; $9 vs $200
- Codex permissions — sandbox policy language
- AGENTS.md — instruction chain
- OpenHands Software Agent SDK — MIT model-agnostic SDK
- OpenHands SDK architecture — workspace swap
- Terminal-Bench 2.0 leaderboard — harness swing
- OpenHands GitHub — thin: stars only
X sources:
- X post by @tobi (2026-08-25) — AGENTS.md ultimatum — primary
- X post by @trq212 (2026-08-25) — Claude.md stays default — primary
- X post by @bcherny (2026-08-26) — shared memory simpler — primary
- X post by @bcherny (2026-08-23) — hill-climb loops — primary
- X post by @OpenAI (2026-08-26) — HF incident safeguards — primary
- X post by @karpathy (2026-08-21) — tear down abstractions — discourse
- X post by @quxiaoyin (2026-08-24) — $150 vs $2 — discourse
- X post by @kunchenguid (2026-08-25) — industry standard — discourse
Grokipedia: not used (search 502; page-preview found: false)