Agent Harness

An agent harness is the opinionated wrapper that turns a model into a working operator: context, tools, permissions, memory, verification, state, UI, and recovery around the model loop.

Why this page exists

The wiki already has strong concrete harness pages: Cursor Harness, Claude Code Harness, Codex Harness (OpenAI), Hermes Harness (Nous Research), OpenClaw Harness, and AI SDK HarnessAgent. It also has Harness Engineering, which describes the discipline. The missing primitive was the thing those pages all instantiate: the agent harness as a product and systems boundary.

This matters because 2026 agent capability is rarely explained by model quality alone. OpenAI's 2026 harness-engineering writeup describes engineers building a large internal product by steering agents, instrumenting feedback loops, and making the codebase and UI legible to Codex. Anthropic's agent guidance similarly emphasizes simple composable workflows, evaluator loops, routing, and orchestrator-worker patterns over magical autonomous blobs. The frontier is the model plus the environment around it. Source: OpenAI, https://openai.com/index/harness-engineering/, 2026-02-11; Anthropic, https://www.anthropic.com/engineering/building-effective-agents, 2026-06-18

Boundary stack

Layer Owns Example
Model Inference, latent knowledge, reasoning, generation GPT, Claude, Gemini, open-weight models
Agent framework Developer primitives for tools, handoffs, guards, messages OpenAI Agents SDK, LangGraph, Vercel AI SDK
Agent runtime Running the loop, persisting state, dispatching tools, tracing runs Agent Runtime Architecture
Agent harness Productized working environment, rules, permissions, workspace, skills, memory, verification, UX Cursor, Claude Code, Codex, Hermes, OpenClaw
Control plane Fleet provisioning, identity, schedules, routing, observation, billing Agent Control Plane Architecture, Agent Machines

The harness is not just the runtime. The runtime executes. The harness decides what the agent is allowed to know, do, remember, verify, ask, and show.

What a harness must own

Surface What good looks like Failure when missing
Context assembly Reads the right docs, files, state, and history before acting Repeats exploration, misses local conventions
Capability surface Tools are discoverable, typed, scoped, and routed by task Random tool choice, bloated tool lists, auth failures
Workspace A durable filesystem/sandbox with dependencies and project state Agent cannot reproduce, test, or resume work
Permissions Clear approval/cancel paths, policy gates, least privilege Silent destructive actions or constant human babysitting
Memory Durable notes, skills, project docs, and timelines Every session starts as an amnesiac tutorial
Verification Tests, doctors, evals, screenshots, traces, CI feedback Plausible completion without evidence
Observability Run logs, spans, artifacts, costs, state, and provenance Nobody can debug why the agent succeeded or failed
Human interface Compact progress, interruptions, approvals, resumability The user cannot supervise long-horizon work

IRL comparison

Harness What it optimizes for Core tradeoff
Cursor Harness IDE-native code editing, rules, MCPs, background agents Strong inside editor context, weaker as a neutral fleet runtime
Claude Code Harness Terminal-first coding loops with hooks, skills, and repo-local instructions Strong for shell work, product UX is intentionally sparse
Codex Harness (OpenAI) Background/app coding tasks, threads, automations, OpenAI-centered runs Strong task execution, depends on Codex app/runtime affordances
Hermes Harness (Nous Research) Long-lived self-hosted personal agent with skills, memory, cron, messaging More assembly required, but durable and owned
OpenClaw Harness Personal assistant gateway across message channels and coding sub-CLIs Gateway-centric, not only a coding harness
AI SDK HarnessAgent App embedding of external harnesses behind one AI SDK surface Adapter layer, not a full fleet control plane
Claude Tag Shared team-channel agent in Slack with scoped tools, memory, and ambient follow-up Hosted Anthropic product surface, not a generic local gateway
Agent Machines Persistent skilled workers across runtimes and substrates Product scope is larger: harness plus control plane plus machine
Local Coding Agents Open-weight model + local runtime + coding harness on user hardware More control/privacy, but quality and integrations must be receipt-tested against hosted harnesses

The pattern is converging in the real world: agent runtimes are becoming swappable, and the harness layer is where product differentiation moves. Vercel's HarnessAgent makes this explicit by exposing Claude Code, Codex, Pi, and future harnesses behind one app-facing API. Source: AI SDK docs, https://ai-sdk.dev/v7/docs/ai-sdk-harnesses/overview, 2026-06-18; Vercel changelog, https://vercel.com/changelog/program-agent-harnesses-with-ai-sdk, 2026-06-12

Capsule routes

Runtime-specific knowledge should now route through Agent Harness Capsules before falling back to generic agent pages:

Runtime Brain capsule Use it for
Claude Code Harness claude-code-agent-stack Claude Code hooks, workflows, skills, rules, memory, subagents, and CLI-centered coding operations.
Hermes Harness (Nous Research) hermes-agent-stack Persistent self-hosted agents, cron, memory, approvals, /goal, /learn, and eval-loop automation.
OpenClaw Harness openclaw-agent-stack Multi-channel assistant gateways, Nodes, ClawHub skills, MCP/ACP, session lanes, and skill security.
Codex Harness (OpenAI) codex-agent-stack Codex CLI/app/cloud, OS sandboxing, AGENTS.md, automations, Record & Replay, and OpenAI coding-model routes.

Generic harness questions still start here. Runtime-specific work loads the relevant capsule so the agent sees the right docs, bookmarks, tools, skills, and failure modes together.

2026 state of the art

  • Harness portability. Applications want to swap agent harnesses the way they swap model providers. AI SDK HarnessAgent is the clearest current sign.
  • Filesystem-first agents. Skills, instructions, schedules, traces, and artifacts increasingly live as files, not only hidden chat state. This validates Agent-Docs Mesh and Kevin's wiki-backed operating model.
  • Markdown as substrate, not agency. .md files do not make an agent by themselves. The harness becomes interesting when agents use those files to select context, take actions, write updates, preserve state, and verify results. Source: X/@kevskgs, 2026-03-19
  • Durable sessions. Agents need resumable workspaces, long-running state, and pause/resume semantics, not only stateless API calls. See Durable Agent Execution Architecture.
  • Trace-first debugging. A serious harness captures the trajectory: model calls, tool calls, handoffs, guardrails, approvals, and artifacts. See Agent Trajectory Evaluation.
  • Registry-governed capabilities. Tools, MCP servers, skills, CLIs, and remote agents need discovery plus local approval. See Agent Capability Registry.
  • Agent legibility. Repos, logs, docs, and UIs should be readable by agents, not only humans. See Agent Legibility.
  • Stack-wide source maps. Hitchhiker's Guide to Agentic AI is useful as a checklist for whether a harness design has covered the whole stack: model substrate, reasoning/alignment, retrieval and memory, harness/context management, skills/tools, MCP/A2A coordination, multi-agent topology, UI, evaluation, and deployment. It is a research map, not an implementation route by itself. Source: arXiv:2606.24937, checked 2026-07-04
  • Training-environment standardization. Open-source models need shared environments for harness-aware RL instead of every trainer, harness, and benchmark rebuilding bespoke glue. OpenEnv is the current project to watch here: it standardizes a reset() / step() / state() environment loop while letting MCP serve as the agent-facing tool boundary for compatible environments. Source: Hugging Face, https://huggingface.co/blog/openenv-agentic-rl, 2026-06-08; Hugging Face docs, https://huggingface.co/docs/openenv/index, accessed 2026-06-20
  • Local/open-weight harness stacks. A coding harness can be paired with a local model served through Ollama, llama.cpp, LM Studio, or an OpenAI-compatible runtime. That route optimizes for privacy, cost, modifiability, and learning, but it should be evaluated with the same receipt suite as hosted Codex/Claude Code runs. See Local Coding Agents. Source: Sebastian Raschka, 2026-06-27

Kevin rule

When creating or updating a concrete harness page, answer these five questions:

  1. Who owns the loop?
  2. Where does state persist?
  3. How are capabilities discovered and permissioned?
  4. What proves the agent is done?
  5. How does a human inspect, interrupt, resume, or replay the run?

If a page cannot answer those, it is probably a tool note, not a harness article.


Timeline

  • 2026-07-12 | Reabsorbed the spatial-context, Cloud/Desktop Hermes, Vercel SDK, and agent-skill-library launch cluster. It reinforces the harness boundary: agent capability is a product of the durable workspace, skill projection, human-visible surface, and verification path—not a model-only feature. Source: X Bookmark Ingest 2026-07-12
  • 2026-07-04 | Added Claude Tag as the shared team-channel harness surface: Claude moves from private chat into Slack channels with scoped tools, channel memory, future planning, and ambient follow-up. Source: Anthropic, 2026-06-23; Source: X/@karpathy, 2026-06-23
  • 2026-07-04 | Added Hitchhiker's Guide to Agentic AI as a stack-wide research map for harness-adjacent design coverage, while keeping concrete implementation routes on the specific harness/runtime/tool pages. Source: arXiv:2606.24937
  • 2026-07-04 | Added Kevin's .md files don't make an agent row as the concise harness boundary: files are substrate, while agency is the loop that reads, writes, acts, and verifies through them. Source: X/@kevskgs, 2026-03-19
  • 2026-06-29 | Added runtime-specific capsule routing via Agent Harness Capsules so Claude Code, Hermes, OpenClaw, and Codex each expose their own source-backed brain interface instead of sharing one generic agent bucket. Source: User request, 2026-06-29
  • 2026-06-30 | Added Local Coding Agents as the open-weight/local runtime route for harness work, with receipt-based comparison against hosted harnesses. Source: X/@rasbt, 2026-06-27
  • 2026-06-20 | Added OpenEnv as the open-source agentic RL environment standard to watch, because it sits below harnesses but may become the common training/evaluation socket for harness-aware open models. Source: User request, 2026-06-20; Hugging Face, https://huggingface.co/blog/openenv-agentic-rl
  • 2026-06-18 | Created after a graph audit found many concrete harness articles but no canonical agent-harness concept page. Source: whole-wiki graph audit, 2026-06-18