What a harness is
A model by itself only turns text into text. A harness is everything wrapped around it that lets it act: the agent loop, tool definitions (read, write, edit, shell), context management, the system prompt, permissions and the interface a person works through. One survey puts it plainly: a wrapper around an LLM that gives it tools to read and write files, run commands and iterate on code autonomously.
The vocabulary is still settling, so it helps to separate four layers. The lower two are used to build agents. The upper two are run as tools.
Substrate libraries: what harnesses are built from
LangChain's own taxonomy is the clearest found. It splits the space into frameworks (abstractions that make building easier), runtimes (production infrastructure such as durable execution and persistence) and harnesses (opinionated, batteries-included agents built on top). Under that scheme, most of the names people call “agent frameworks” belong below the harness line.
| Name | Role | Core abstraction | Reach for it when |
|---|---|---|---|
| LangChain | Framework | Standard components for models, tools and chains; v1.0 is built on LangGraph | A common interface across providers and tools is wanted |
| LangGraph | Runtime + framework | Stateful graph of nodes and transitions, with persistence and human-in-the-loop | Explicit control over branching, looping and recovery is needed in production |
| CrewAI | Framework | Role-based crews of agents working through tasks | Fast prototyping of multi-agent workflows |
| OpenAI Agents SDK | Framework | Agents, handoffs and guardrails | Quick onboarding on OpenAI's stack |
| Google ADK | Framework | Agent Development Kit for composing agents | Work is built on Google's models and cloud |
| AutoGen | Framework | Conversational agents exchanging structured messages | Research on agent-to-agent dialogue |
| Vercel AI SDK, LlamaIndex | Framework | Model and retrieval abstractions for application code | An agent embedded in a product, not run as a standalone tool |
| Temporal, Inngest | Runtime | Durable workflow execution | Long-running agents must survive crashes and retries |
| Deep Agents, Claude Agent SDK | Harness as library | Planning, filesystem and sub-agents packaged as a programmable agent | A Claude Code-style agent is wanted inside an existing application |
Harness comparison
These are the harnesses that recurred across independent comparisons. The table can be filtered by licence or model strategy and scrolls sideways on small screens.
| Harness | Licence | Models | What sets it apart | Extension | Cost (as reported) |
|---|---|---|---|---|---|
| Claude CodeAnthropic · CLI, IDE, web | Proprietary | Claude only (Anthropic, Bedrock, Vertex, Azure) | Deepest feature set: sub-agents, agent teams, hooks, scheduling, cloud sessions | MCP, skills, plugins, hooks, mods (TypeScript, Oct 2026) | $20/mo Pro; heavy use often $100–200/mo. Alternatively billed per token through an Anthropic API key, or through Bedrock, Vertex or Azure by setting provider environment variables (for example CLAUDE_CODE_USE_BEDROCK or CLAUDE_CODE_USE_VERTEX) |
| Codex CLIOpenAI · CLI, IDE, web, desktop | Apache 2.0 | GPT-5 family by default; Ollama supported; community routes to others | Rust core; OS-level sandboxing; one harness behind every Codex surface | App Server (JSON-RPC), MCP server, codex exec, TypeScript SDK | Included with ChatGPT plans; BYOK free |
| Cursor 3Anysphere · IDE / agent workspace | Proprietary | Multi-model plus its own Composer 2 | Agents Window to run many agents; /best-of-n across models in worktrees; cloud agents on VMs | Self-hosted cloud agents for Enterprise; design-mode browser | Free; $20 Pro; $60 Pro+; $200 Ultra |
| PiMario Zechner / Earendil · CLI | MIT | 15+ providers | Deliberately minimal: four tools, a system prompt under 1,000 tokens, branching JSONL sessions. No built-in sub-agents or plan mode | TypeScript extensions, skills, prompt templates, npm/git packages; MCP via Codemode since Pi 1.0 (Oct 2, 2026) | Free; provider billed directly |
| OpenCodeAnomaly · CLI, desktop | MIT | 75+ providers; optional managed “Zen” models | Client/server design: sessions survive disconnects and can run remotely or in Docker | Docker sandboxing; phone and browser remote access | Free BYOK; $10/mo Go plan |
| Gemini CLIGoogle · CLI | Apache 2.0 | Gemini only | Consumer free and Pro access ended June 18, 2026; repository remains Apache 2.0 with public prompts and memory logic. Successor: Antigravity CLI (closed source) | None to speak of (Gemini-only) | Paid API keys or enterprise licences only |
| AiderPaul Gauthier · CLI | Apache 2.0 | 100+ via LiteLLM | Git-first: every AI edit becomes a commit. Closer to pair programming than autonomy | Community forks; any LiteLLM provider | Free; provider billed directly |
| GooseBlock · CLI, desktop | Apache 2.0 | 15+ providers, local models | MCP-native with a large extension catalogue and sub-agents | 70+ MCP extensions | Free; provider billed directly |
| AmpAmp Inc. (from Sourcegraph) · CLI | Proprietary | Claude, GPT and Gemini via modes (Smart, Deep, Oracle); no direct BYOK | Mode-based model routing; went CLI-only in Feb 2026 | JetBrains, Neovim, Zed integrations | Pass-through at cost; free daily allowance |
| FactoryFactory AI · cloud, IDE, CLI | Proprietary | Claude, GPT, Gemini, open models, BYOK | Enterprise “Droids” for code, review, docs and tests on persistent cloud machines | GitHub, GitLab, Jira, Linear, Slack, PagerDuty | $20/mo; enterprise by model multiplier |
| Command CodeCommandCodeAI · CLI | Proprietary | Claude, GPT, Gemini, Grok, DeepSeek, Qwen, Kimi, open models | Learns personal taste from accepts and rejects, stored as readable markdown. Very early (first release May 2026) | IDE extensions (early) | $1/mo open models; $15/mo frontier models |
Limitations of each harness
Every harness above trades something away. The table groups the documented limitations into access and cost, capability gaps, and operational or safety concerns. Several entries rest on one reviewer's test or one report, and those are worded as such. Where a limitation has since been fixed, only the current state is listed.
| Harness | Access, cost and lock-in | Capability gaps | Operational and safety |
|---|---|---|---|
| Claude Code | Claude models only; closed source. The $20 Pro tier was described as limited, with sustained use typically needing the $100+ tier; the subscription is not the only billing route, since cloud-provider and API-key billing are also supported. Subscription access was restricted to the official client in January 2026, so third-party harnesses cannot draw on it. | Model choice is limited to Claude. Project instructions (CLAUDE.md) must be kept accurate by hand to stay useful. | Highest token use in one four-harness test (741k tokens per task) and called the heaviest spender in another comparison. One CLI process per invocation: about 230 MB resident and 73–94 MB of private memory per concurrent child in a mock-model test, with public reports of memory leaks and idle processes that never exit. |
| Codex CLI | Default models are OpenAI's; other providers depend on community routes. The VS Code extension is closed. Usage is subject to rolling five-hour limits on subscription plans. | Described as less consistent on longer task chains (a single author's impression, not a measurement). | Slowest median run in one test (245 s against 123 s for Claude Code). The sandbox ships with network access off, so web access needs workarounds. |
| Cursor 3 | Closed source. Usage-based pricing was described as confusing, and a public apology was issued over earlier pricing changes. | Agents still require developer review; the agent-first workspace does not remove the verification step. | Cloud-agent reliability problems and environment-setup failures are documented. |
| Pi | MIT licensed, with the provider billed directly. | Four built-in tools. Sub-agents and plan mode are absent by design (the oh-my-pi fork adds them). MCP arrived only with Pi 1.0 on October 2, 2026, through a Codemode sandbox. Long-running support is a separate experimental package (Pi Durable). TypeScript only. | No permission prompts and full system access by default. No turn, deadline or budget limit setting was found in the SDK documentation. Cache hit rates were variable in a community benchmark. |
| OpenCode | MIT licensed. Claude Pro and Max subscriptions cannot be used after the January 2026 enforcement, so an API key is required. The supported billing method depends on the provider. | Quality depends entirely on the model behind it. Lowest pass rate in one four-harness test (46.7%). | No OS-level sandbox. Heavier resource use than expected in one review. |
| Gemini CLI and Antigravity CLI | Gemini CLI stopped serving free, AI Pro and Ultra users on June 18, 2026. It remains available through paid API keys and enterprise licences, and the repository stays Apache 2.0. The successor, Antigravity CLI, is closed source and billed by consumption. | Gemini models only. The successor adds subagents, hooks and skills, but community feedback reported missing functionality compared with its predecessor. | The successor was reported to consume quota quickly with no cost controls. Roughly 432K tokens per task was reported for the earlier tool. |
| Aider | Apache 2.0; provider billed directly. | An edit-centred, git-first workflow, not broad agent orchestration. Automatic testing only runs when the test command and auto-test option are configured. | Pair-programming style keeps a person in the loop, so it is a weak fit for unattended runs. |
| Goose | Apache 2.0; provider billed directly. | Not zero-config: providers and models must be set up before the tool is productive. IDE support (VS Code, JetBrains) trails Claude Code, and the desktop interface is secondary to the terminal. | Reliability drops on long tool chains with smaller local models. A vendor red-team exercise showed a poisoned shared recipe compromising a laptop. Permission settings need care because of autonomous shell access. No authoritative benchmark exists. |
| Amp | Closed source. No direct bring-your-own-key option; models are reached only through modes. Enterprise use carries a 50% markup on pass-through pricing. | CLI only since February 2026: the VS Code and Cursor integrations were removed. | Not documented in the sources read. |
| Factory | Closed source. Pricing is by model-dependent multipliers at enterprise level. | Aimed at enterprise software-lifecycle automation (Droids for code, review, docs and tests) rather than individual use. | Not documented in the sources read. |
| Command Code | Closed source; a very young product (first release May 2026). | IDE extensions were early, with some non-functional at release. Personalisation depends on the vendor's own learned model. | Little operating history to judge reliability from. |
Where harnesses actually differ
The same model can feel very different in two harnesses. A small hands-on test of Claude Code, Codex, OpenCode and Pi found large differences in speed, token use and cost per successful task on the same work, which supports a point several authors make: the harness, not just the model, decides how fast, safe and expensive the result is. The figures are illustrative, since they came from one reviewer's run.
Model strategy
Locked harnesses (Claude Code, Gemini CLI, Codex by default) are tuned to one vendor's models. Open ones (OpenCode, Pi, Aider, Goose) trade tuning for freedom to switch.
Prompt and tool surface
Pi ships four tools and a tiny published prompt. Claude Code ships ten or more tools plus sub-agents and hooks. Less surface means fewer tokens and more transparency; more means more built-in capability.
Safety posture
Codex leans on OS-level sandboxing (Seatbelt, seccomp). Pi runs with full system access and no prompts by default. OpenCode has no OS sandbox. The choice depends on where the agent will run.
Extensibility
Claude Code: skills, plugins, hooks, MCP. Pi: TypeScript extensions and packages. Codex: an embeddable App Server protocol that JetBrains and Xcode use.
Where it runs
Local terminal, IDE, desktop app, or a cloud VM to which work is handed. Cursor 3, Codex and Claude Code all now offer a cloud mode.
Embeddability
Whether it can be driven from code. Codex (SDK, exec, App Server), Claude (Agent SDK) and Pi (SDK) can; this is what makes the next layer possible.
Process footprint
A CLI call starts a full runtime each time. In a mock-model test, each concurrent Claude Code CLI child added about 73–94 MB of private memory, while each concurrent Pi session in a shared process added about 0.1–4 MB. See the next section.
Cache discipline
Where the harness places prompt-cache breakpoints and how stable it keeps the prefix. See the caching section.
Process footprint: CLI versus library
Most of the harnesses above are Node or similar runtimes wrapped as a command-line tool. Each time one is invoked as a command, a new process is started with its own runtime, loaded tool definitions, session state and any MCP servers it launches. For one person in one terminal this is invisible. For a script, a CI job, an orchestrator or a service that invokes a harness many times at once, the memory cost accumulates quickly. The question measured here was narrow: what does each additional concurrent request cost in memory when a harness runs as a subprocess, compared with when it runs as a session inside the host process?
73–94 MB of new memory per concurrent request
Claude Code CLI children, launched one per request, each added about 73 MB with a trivial reply and about 94 MB when the request had read twelve large files. The figure grows with the context a child holds.
About 0.1–4.0 MB per concurrent session
Pi sessions hosted in a single Node process grew the process from about 133 MB to 200 MB at 600 trivial concurrent requests, and to 2,510 MB at 600 requests that each read the twelve files.
Resident size misleads
Each child reported 226–251 MB resident, but most of that is one binary image shared between children. At 28 children the resident figures sum to 6.2 GB while the machine actually used 2.0 GB.
How it was measured, and why
- A mock model. A local server that imitates the Anthropic Messages API stood in for the model. This isolates harness overhead from model behaviour, avoids credentials and paid calls, and lets every reply be held open for 30 seconds so that all N requests are provably in flight at the same moment. The mock’s own counter was required to equal N before each sample was taken, and it did at every level. One level (400 sessions with file reads) was re-run after the measurement script’s own polling request to the mock failed; the re-run completed with no errors.
- Subprocess side. The Claude Code CLI (version 2.1.292, the binary bundled with the Claude Agent SDK) was started once per request in the way the SDK starts it, with streaming JSON over stdin and stdout, a clean environment and only the Read tool enabled. Levels ran from 1 to 28 concurrent children.
- In-process side. The Pi coding-agent SDK (version 1.0.4) created N sessions inside one fresh Node process per level, with in-memory session storage, compaction off, no resource discovery and only the read tool, against the same mock. Levels ran from 1 to 600.
- Two workloads. In the trivial workload the model returned one short streamed reply. In the tool workload the model first asked to read twelve text files of about 117 KB each (about 1.4 MB of tool output) and then replied, so the harness had to hold real tool results in memory.
- Three memory readings. Resident size (RSS) counts a shared page once in every process that maps it, so it overstates the total when children share a binary. Proportional size (PSS) divides each shared page among the processes sharing it. Private anonymous memory is what one more process adds that no other process holds. System memory used (total minus available, read before and after the children started) gives an independent cross-check, and its slope against N is the marginal cost per child.
- Environment. One Linux sandbox with 2 vCPUs and 8 GB of RAM on x86-64. One run per level; the per-child values were stable across levels, which is the evidence that the readings are not noise.
Result: one process per request
| Concurrent children | RSS per child | PSS per child | Private per child (trivial) | System memory used (trivial) | Private per child (12 file reads) | System memory used (12 file reads) |
|---|---|---|---|---|---|---|
| 1 | 232 MB | 230 MB | 80 MB | 67 MB | 97 MB | 88 MB |
| 2 | 231 MB | 154 MB | 79 MB | 154 MB | 96 MB | 208 MB |
| 5 | 232 MB | 109 MB | 79 MB | 374 MB | 96 MB | 570 MB |
| 10 | 228 MB | 91 MB | 76 MB | 750 MB | 93 MB | 1,078 MB |
| 20 | 228 MB | 82 MB | 74 MB | 1,470 MB | 94 MB | 1,864 MB |
| 28 | 226 MB | 78 MB | 72 MB | 2,034 MB | 94 MB | 2,700 MB |
Memory with all N requests in flight. System memory used is the increase over the machine’s memory before the children started.
- Resident size is flat and large. It stayed between 226 and 251 MB per child at every level. This is the figure a process monitor shows, and it is what a naive estimate would multiply by N.
- Most of that is shared. About 154 MB of each child is the executable image (the bundled binary is 240 MB on disk), mapped from the same file by every child, so it is paid for once. PSS therefore falls from 230 MB per child with one child to 78 MB with 28.
- The marginal cost is the private part. The slope of system memory against N is 72.7 MB per child in the trivial workload and 94.3 MB in the tool workload. An idle, initialised child with no request yet added 61.2 MB, so a trivial request in flight added about 11.6 MB more and twelve large file reads added about 33.1 MB more.
- Sizing follows from that. By linear extrapolation, 100 concurrent children would need roughly 7.1 to 9.2 GB beyond the shared image, and more as conversations lengthen. These figures are floors for this version and workload, not constants.
Result: sessions inside one process
| Concurrent sessions | Process RSS (trivial) | Growth over empty process (trivial) | Process RSS (12 file reads) | Growth over empty process (12 file reads) |
|---|---|---|---|---|
| 1 | 137 MB | 2.9 MB | 141 MB | 8.8 MB |
| 10 | 135 MB | 3.9 MB | 190 MB | 55.1 MB |
| 50 | 142 MB | 8.3 MB | 388 MB | 248.3 MB |
| 100 | 146 MB | 10.1 MB | 636 MB | 509.7 MB |
| 200 | 158 MB | 21.4 MB | 1,116 MB | 981.7 MB |
| 400 | 179 MB | 44.9 MB | 1,976 MB | 1,844.1 MB |
| 600 | 200 MB | 68.8 MB | 2,510 MB | 2,382.5 MB |
Memory of the single host process with all N sessions in flight. The empty process (Node plus Pi loaded, no sessions) was about 133 MB in every run.
- A fixed base, then slow growth. Loading the runtime and Pi cost about 133 MB once. In the trivial workload each additional in-flight session added about 0.1 MB; at 600 sessions the whole process was 200 MB.
- Tool output is the dominant cost. With twelve file reads per session, growth was about 4.1 MB per session, because each session holds roughly 1.4 MB of tool results as strings in the same heap. At 600 sessions that came to 2,510 MB. A session is a message array, a stream parser and an open HTTP request The code and the runtime are shared by all sessions.
- Memory is released only partly and lazily. In the trivial run, resident size fell by 15 MB once the replies finished and the sessions were disposed; a JavaScript runtime does not always hand freed heap back to the operating system at once.
- No errors. Every one of the 2,722 sessions completed without error.
Ways to call a harness, and what each costs in processes
| Harness | Programmatic route | Process model | Many callers |
|---|---|---|---|
| Pi | CLI, or library: createAgentSession() from @earendil-works/pi-coding-agent | In-process as a library; one process per call as a CLI | The library route was the one measured above. One AgentSessionRuntime can create, switch and fork sessions inside a single process, and SessionManager.inMemory() avoids session files. The CLI was not measured separately; as with any Node CLI, one runtime is started per call. In the SDK, the MCP, codemode and tool-search extensions are not loaded unless added explicitly. |
| Claude Code | claude -p in scripts; Claude Agent SDK (Python, TypeScript) | Subprocess either way: the SDK spawns the CLI and communicates over stdin/stdout | The SDK does not remove the per-process cost. Its one-shot query mode starts and stops a process per call; client mode keeps one process across several queries. Pooling and reusing clients is preferable to spawning per task. |
| Codex CLI | App Server (JSON-RPC), codex exec, MCP server, TypeScript SDK | Long-lived server via App Server; one process per call via exec | OpenAI describes the App Server as a long-lived process hosting many Codex threads, the shape suited to concurrency. It is preferable to repeated exec calls. Its footprint was not measured here. |
| OpenCode | Client/server: clients attach to a running server | Long-lived server | The server keeps sessions alive across disconnects, so many clients share one runtime. Its footprint was not measured here. |
| Managed Agents | REST API | Remote | No local process. The provider carries the footprint and bills session time instead. |
Prompt caching and cache breakpoints
An agent resends nearly the same prompt on every step: tool definitions, system prompt, project instructions, then a conversation that grows with each tool result. Prompt caching lets the provider reuse its work on the unchanged beginning of that prompt, so that only a fraction of the normal input price is paid for it and the wait for the first token is shorter. A cache breakpoint is a marker on a block of the prompt that says “cache everything up to and including here”. For a long-running coding agent, the difference between good and bad breakpoint placement is often the largest line in the bill.
How breakpoints work on Anthropic's API
Cached prefix, left to right. Each marker is a breakpoint; the new turn is always processed fresh.
- Prefix order is fixed: tools, then system prompt, then messages. A change at any point invalidates everything after it. Edit one tool definition and the whole cache goes cold.
- Up to four explicit breakpoints per request. Automatic placement can also be requested, where the breakpoint sits on the last cacheable block and moves forward as the conversation grows; that uses one of the four slots.
- Writes only happen at breakpoints, and a lookup checks about 20 blocks back from each one. In a long agent turn with many tool calls, an old entry can fall outside that window, so long sessions need a second breakpoint further back.
- Lifetime: five minutes by default, refreshed each time the entry is read; one hour at a higher write price. Pricing as published: writes cost 1.25× the base input price (2× for the one-hour option) and reads cost a small fraction, 0.1× on most models and lower on some.
- Minimum size: a prefix below the model's minimum (512 tokens on the current Sonnet and Opus models, more on older and smaller ones) is silently not cached.
Why it matters when choosing a harness
The harness decides what goes in the prefix, in what order, and where the markers go. Two harnesses on the same model can differ several-fold in cached share and in total tokens processed. Things to look for:
- Static content first, dynamic content last; dates and file status injected into messages rather than the system prompt.
- A tool list that stays fixed for the session. Adding one MCP tool mid-conversation invalidates the cached history, which is why Claude Code defers unused tools as lightweight stubs.
- No model or reasoning-level switching mid-session; caches are per model.
- Breakpoints anchored on the stable head (tools and system prompt) as well as the growing tail.
- Cache read and write token counts exposed in usage output, so that it can be verified whether caching works.
What each harness does, as far as is documented
| Harness | Approach to breakpoints | Notes |
|---|---|---|
| Claude Code | Explicit cache_control layered static to dynamic: system prompt, tool definitions, project instructions (CLAUDE.md), then conversation | Tools are locked at session start. Changing tools, switching model or editing CLAUDE.md breaks the cache. Dynamic details travel as system reminders inside messages. Compaction reuses the cached prefix. |
| Claude Agent SDK | Inherits Claude Code's loop | No separate documentation was found; the same layout and pitfalls are assumed. |
| OpenCode | Anthropic-style providers: markers on the first two system messages and the last two non-system messages. OpenAI-style providers: a cache key set to the session ID | Opt-in setCacheKey option for providers that do not cache automatically. Its larger stable prefix (about 6,300 tokens in one benchmark) warms the cache early. |
| Pi | Historically anchored on the last one or two messages only, a rolling window; the stable head did not get its own marker | The oh-my-pi fork reported hit rates well below competitors for this reason and fixed it in version 18.2.1 by anchoring on the system prompt and last tool definition. The version in use should be checked. Pi's very small prefix (about 1,100–1,400 tokens) also leaves little to cache. Pi 1.0 (October 2, 2026) added cache warming for Anthropic models, which postdates these findings. |
| Codex CLI | No manual markers on OpenAI models: prefix matching is automatic, with a session-level cache key for routing | Newer OpenAI models add an optional explicit mode and a configurable lifetime. Current OpenAI documentation should be checked for the model in use. |
| Gemini CLI | Automatic caching on the provider side | No breakpoint control is exposed. |
| Cursor, Amp, Factory, Aider, Goose | Not publicly documented | Cache read and write tokens can be measured through a proxy. |
Caching and the harness of harnesses
The wrapper layer can help or hurt. A loop that restarts the agent with fresh context every iteration, as ralph-orchestrator does by design, pays a cold prefix on each pass unless the next iteration begins inside the cache lifetime and rebuilds the same prefix byte for byte. A fleet of N parallel agents on the same repository writes N separate cache entries unless they share an identical prefix. Hosted runtimes manage this but cannot be tuned. This is an inference from how the mechanism works, not a measured result, so cache read counts should be checked on real runs before it is relied upon.
Practical habits include keeping the prefix identical across runs (same tools, same order, same instructions), using the one-hour lifetime for work that pauses between steps, placing volatile content at the end, and logging cache read and write counts on every call.
The harness of harnesses
Once a harness can be driven programmatically, the next step is obvious: write something that starts it, watches it and restarts it. These tools do not replace Claude Code or Codex; they treat them as workers. They are grouped here by what they add.
Loop wrappers: keep one agent going until it is done
ralph-orchestrator is the clearest example. It implements the “Ralph Wiggum” technique: run the same agent again and again against a task until it reports completion or hits an iteration limit. It is a Rust tool (MIT) that wraps whichever CLI is already in use: Claude Code, Codex, Gemini CLI, Amp, Copilot CLI, OpenCode, Pi, Kiro and others. It adds hats (specialist personas that hand off through events), backpressure gates (tests, lint and type checks that reject unfinished work), persistent memories and tasks, and a Telegram channel for asking a human.
The design idea worth noting is backpressure: instead of trusting the agent's claim that it is finished, the wrapper makes the environment say no.
while true loops around claude -p or codex exec.Parallel fleets: many agents, isolated worktrees
A human assigns several tasks; the tool gives each agent its own git worktree so they do not collide, then shows status and diffs for review. Three to ten agents is the range commonly reported as workable on one machine. The bottleneck moves from generating code to verifying it.
/best-of-n are the same idea built into a harness.Hierarchies: roles, supervisors and merge queues
Gas Town (MIT) models an engineering org: a Mayor coordinates, Polecats do the work, a Witness and Deacon watch for stuck agents, and a Refinery runs a merge queue. State lives in git-backed hooks and a structured issue tracker called Beads so work survives crashes. Heavier than a fleet manager, aimed at running many agents continuously.
Hosted runtimes: hand over the sandbox too
The provider runs the harness, the sandbox and the session log. Work is assigned, and a pull request or result is returned later. This is where vendors are putting the most effort in 2026.
Anthropic's agent products
Anthropic now sells several things that touch this stack at different levels, so it is worth separating them. “Anthropic's new Agents” is read here as the Managed Agents line, with the Agent SDK and Claude Code features beside it.
Claude Code
The reference harness. Recent additions include agent teammates (agent.spawn), a background “side agent” that monitors sessions, and mods: TypeScript functions that can rewrite prompts, add UI or replace built-in features (October 1, 2026).
Claude Agent SDK
Python and TypeScript. Runs the Claude Code loop by spawning the bundled CLI as a subprocess of the host application, with built-in file and shell tools, skills, sub-agents, MCP, session resume and permission controls. The loop, the sandbox and the session store are operated by the host’s own infrastructure.
Claude Managed Agents
A hosted REST API (public beta since April 8, 2026). An agent (model, prompt, tools, MCP, skills) and an environment (a configured cloud container) are defined, and sessions that exchange events are started. Anthropic runs the loop, sandbox and durable log. Reported pricing: standard token rates plus $0.08 per active session-hour.
Managed Agents also carries the features that look most like orchestration: outcomes (a separate grader agent checks work against a rubric and the agent iterates), multi-agent coordination (a lead delegates to specialists on a shared filesystem, auditable in the Console) and memory with a scheduled “dreaming” pass that curates it. Per the launch coverage, outcomes, multi-agent and memory were research-preview features needing separate access at the time of checking. Anthropic's stated guidance is to prototype locally with the Agent SDK and move to Managed Agents for production.
Compare this with ralph-orchestrator. Ralph wraps any CLI that is run locally and uses tests as the stop condition. Managed Agents wraps Anthropic's harness, hosts it, and uses a grader agent as the stop condition. Same shape, opposite trade: portability against convenience and lock-in.
Choosing
| Need | Start with | Why |
|---|---|---|
| The most capable out-of-the-box coding agent | Claude Code or Codex CLI | Deepest tooling from the model vendors themselves; both embeddable |
| Switching models freely or running local ones | OpenCode, Pi, Aider or Goose | Open source, many providers, no vendor lock |
| A small, inspectable harness to modify | Pi | Four tools, public prompt, extension packages |
| An IDE-centred workflow with parallel agents | Cursor 3 | Agents Window, worktrees, cloud handoff |
| Strong sandboxing by default | Codex CLI | OS-level isolation on macOS and Linux |
| A custom agent inside a product | Claude Agent SDK, Deep Agents or LangGraph | Harness-as-library or runtime, depending on how much control you need |
| Many concurrent callers on one machine | Pi as a library, Codex App Server or OpenCode server | One shared runtime instead of a process per call |
| Low cost on long sessions | A harness with a stable prefix and breakpoints on the stable head | Cached reads are a fraction of the base input price; see the caching section |
| An agent to grind on a task unattended | ralph-orchestrator around the chosen harness | Test-gated loop, harness-agnostic |
| Several agents in parallel on one repo | Claude Squad, Conductor, dmux or Agent Teams | Worktree isolation and status view |
| No infrastructure to run | Managed Agents, Codex cloud or Cursor cloud agents | Provider hosts sandbox and state |
One pattern holds up across sources: use the thinnest layer that does the job. Most teams that reach for a graph runtime or a fleet manager first would have been served by a harness in a loop.
Sources and caveats
- Environment variables (Claude Code documentation): provider-selection variables for Bedrock and Vertex. The Azure (Microsoft Foundry) route uses separate variables that were not confirmed for this page.
- Coding Agent Harness Comparison 2026 (TechStackups): harness definition, vendors, licences, pricing.
- Agent frameworks, runtimes and harnesses, oh my (LangChain): the framework / runtime / harness taxonomy.
- Best AI Coding Agents in 2026: I tested Claude Code, Codex, OpenCode and Pi (Tensorlake): hands-on speed, token and cost comparison.
- pi.dev deep dive (urandom.io): Pi's design and package structure.
- Unlocking the Codex harness (OpenAI): App Server and embedding options.
- Cursor 3 (DataCamp): Agents Window, cloud agents, Composer 2, pricing.
- ralph-orchestrator README (GitHub, mikeyobrien): hats, backpressure, supported backends.
- Gas Town (GitHub, steveyegge): roles, hooks, Beads.
- The Code Agent Orchestra (Addy Osmani): tiers of multi-agent orchestration.
- Best multi-agent coding orchestrators in 2026 (amux): orchestrator licences and backends.
- Claude Agent SDK and Managed Agents (HatchWorks) and Claude Managed Agents explained (LowCode Agency): components, pricing, status.
- Code with Claude 2026: new agent features (MindStudio): outcomes, multi-agent orchestration, dreaming.
- Anthropic release notes, October 2026 (Releasebot): Claude Code mods and agent updates.
- LangGraph vs CrewAI vs AutoGen vs OpenAI Agents SDK (AIAgentRank): framework abstractions.
- Prompt caching (Anthropic docs): breakpoints, prefix order, lookback, lifetimes, pricing.
- How prompt caching actually works in Claude Code (Claude Code Camp): layering and cache-breaking events.
- Benchmark: Pi vs OpenCode vs Codex token overhead, prompt caching, MCP and cost (Pi discussion #6646) and oh-my-pi issue #10560: Pi cache behaviour and breakpoint anchoring.
- How does prompt caching work across models? (OpenCode forum): OpenCode breakpoint placement and
setCacheKey. - Prompt caching (OpenAI docs) and OpenClaw prompt caching reference: automatic caching on OpenAI and Gemini.
- Pi SDK docs:
createAgentSessionand in-process sessions. Inside the Claude Agent SDK: the SDK spawns the CLI as a subprocess. Claude Code issue #11122: per-instance memory and idle processes. - Best AI Coding Agents in 2026 (Firecrawl) and Claude Code vs Codex CLI vs Aider vs OpenCode vs Pi vs Cursor (thoughts.jock.pl): cost, usage-limit and consistency caveats.
- Goose by Block review (DEV Community): Goose setup, reliability and security caveats.
- Pi coding agent pulls a 180 and adds MCP support (The Register) and Pi 1.0 (Techzine): MCP, Pi Durable, cache warming.
- Transitioning Gemini CLI to Antigravity CLI (GitHub discussion): June 18, 2026 change in access.
- Anthropic cracks down on unauthorized Claude usage by third-party harnesses (VentureBeat): subscription access and third-party harnesses.
- Measurements run for this article: a local mock of the Anthropic Messages API, Claude Code CLI 2.1.292 launched as one subprocess per request, and the Pi coding-agent SDK 1.0.4 hosting sessions in one Node process; Linux sandbox with 2 vCPUs and 8 GB of RAM. Method and limits are described in the process-footprint section.