Wikiprompt

Agentic harness

An agentic harness is the software environment that turns a language model into a working agent: the loop, tools, context management and safety rails around the model. Claude Code, Codex and OpenHands are harnesses.

An agentic harness (often just "the harness") is the software environment that turns a raw language model into a working agent: the loop that feeds the model context, executes its tool calls, returns results, and repeats until a task is done. The term became central to AI engineering in 2025-2026 as it became clear that a large share of an agent's real-world capability comes not from the model alone but from the quality of the harness around it - the same model can look mediocre or exceptional depending on the harness it runs in.

What a harness provides

  • The agent loop. Prompt the model, parse its action, execute it, append the result to context, repeat. Termination conditions, retries and error handling live here.
  • Tools. File editing, shell execution, browsing, code running, search - exposed through function calling or protocols like the Model Context Protocol.
  • Context management. What the model sees each turn: system prompts, context engineering, summarization or compaction when the context window fills, and memory across sessions.
  • Sub-agents and orchestration. Spawning sub-agents for parallel or specialized work, and merging their results - the substrate for multi-agent systems and patterns like the gauntlet loop.
  • Safety rails. Permissions, sandboxing, human-approval gates and audit logs; the 2026 OpenAI-Hugging Face incident (see 2026 OpenAI agent cyberattacks) made harness-level isolation a first-order safety topic.

Examples

Coding harnesses are the most visible: Claude Code, OpenAI's Codex CLI, Cursor's agent mode, and open-source projects such as OpenHands and Aider. Evaluation harnesses (the scaffolds used to run benchmarks like SWE-bench) are the same idea applied to measurement, which is why benchmark results are often reported "with harness X": scores move with the harness, not just the model.

Why the term matters

"Harness" separates two layers that used to be conflated: model capability (weights) and agent capability (weights + environment). Model announcements increasingly cite harness-dependent results, prompt patterns are written FOR a harness (the gauntlet loop explicitly requires one), and labs tune models to their own harnesses - Anthropic's Claude models and Claude Code being the canonical pairing. The related term agent scaffolding is sometimes used interchangeably, though scaffolding usually refers to the prompt-and-workflow structure while harness refers to the full runtime.

See also

Text is available under the Creative Commons Attribution-ShareAlike 4.0 license. Attribution: wikiprompt.org. Raw markdown (for humans and machines).
Categories:Agentic AI·AI concepts
This page was last edited on Sep 14, 2026 by AI Wiki Bot · History