OkayTeacher
EN English 한국어 日本語 中文 हिन्दी বাংলা اردو Español Português Français Deutsch Русский العربية Bahasa Indonesia Tiếng Việt ไทย Türkçe

How to enable notifications

Notifications are unavailable in this browser or on this address. Try a supported browser on the secure SONUB site.

If notifications are blocked, allow them in your browser settings.

  1. Open the site controls beside the address bar, or your browser’s site settings. Set Notifications for this site to Allow.
  2. In your device settings, allow notifications for your browser and check Do Not Disturb or Focus.
  3. Return to SONUB, reload the page, and use the bell to enable notifications.

On iPhone or iPad, add SONUB to your Home Screen, open it there, then allow notifications.

What run on

Harness

A is the that wraps an and gives it tools, instructions, and a loop. and are harnesses. Everything about the harness is gathered here.

A purple orb (the model) floats inside a workbench frame in the middle; a round arrow loops through the files, wrench, terminal, permission gate and notebook fixed to the frame. A person sends a speech bubble from the left and a finished card comes out on the right

In one sentence

Every ordinary sent to or uses the , even when the answer is immediate and no is called. A prompt triggers the harness; it is not itself the whole execution system. 's broader definition also includes system prompts among harness components.

Think of it like this
Think of a kitchen: even a small order uses the kitchen's working setup.
Example
Send a greeting to Codex. Input → → answer is already a path through the harness's loop.
Common mistake
Using a harness does not require or repeated attempts. A user prompt and the harness that processes it have different roles.

The harness in three sources

1. Codex: a prompt starts the harness's agent loop

the Codex harness, which provides the core agent loop and execution logic that underlies all Codex experiences

OpenAI — Unrolling the Codex agent loop

describes the Codex harness as providing the core agent loop and execution behind every Codex experience. Even a short input starts that loop. In the diagram, USER INPUT leads to MODEL INFERENCE, then either AGENT RESPONSE or TOOL CALLS followed by another inference. A direct answer also passes through this loop. Therefore, every ordinary Codex prompt uses the harness; the prompt is the input that triggers it.

Agent loop: user input enters model inference, which leads to an agent response or tool calls that return to model inference.
OpenAI's Agent loop diagram, reproduced unchanged. A direct answer and a path using tools both begin with the same user input and model inference.

Even one word, "hello", goes through the harness

Type just hello into Codex. The model greets you back without using a single tool, and it is over. That makes it easy to think "this time the harness was not used". Follow the four steps below, though: that short exchange has already gone once around the agent loop.

  1. Type hello You
  2. Build the prompt Harness
  3. Model inference Model
  4. Show the reply, end Harness

With a tool call: run it, add the result, back to step 3. hello ends after one round.

  1. Type helloYou

    You type hello in the . This is only the user input. Nothing has run yet.

  2. Build the promptHarness

    The harness does not send hello on its own. It adds the system instructions, (if there is one), the list of tools the model may call and the conversation so far, and sends all of it to the model as one prompt.

  3. Model inferenceModel

    The model reads the prompt and decides that a greeting needs no tool. So it writes only a reply such as "Hi! What can I help you with?". There is no tool call.

  4. Show the reply, endHarness

    The harness checks the model output for tool calls. There are none, so it shows the reply on the screen and ends this . Had there been a tool call, the harness would have run the tool, added the result to the prompt and gone back to step 3.

2. Claude Code: the harness supplies the means to act

The tools, context management, and execution environment that turn a language model into a capable coding agent. Claude Code is the harness; Claude is the model inside it. The harness supplies file access, shell execution, permission gating, memory loading, and the loop that chains actions together.

Claude Code — Glossary: Agentic harness

defines the harness as the tools, and execution environment that make a a . Claude Code is the harness; is its model. File access, execution, checks, and the loop connecting actions come from the harness. A short request can use these capabilities as needed, so a simple prompt also uses the harness.

3. LangChain: everything around the model

If you're not the model, you're the harness.

A harness is every piece of code, configuration, and execution logic that isn't the model itself. A raw model is not an agent. But it becomes one when a harness gives it things like state, tool execution, feedback loops, and enforceable constraints.

LangChain — The Anatomy of an Agent Harness

In this article's broad definition, everything in the agent system except the model itself belongs to the harness: its , configuration and execution logic. A model becomes an agent when this surrounding system supplies state, tool execution, feedback and enforceable constraints. The article includes:

  • System prompts.
  • Tools, , MCPs and their descriptions.
  • , sandbox and infrastructure.
  • spawning, and model routing.
  • and for , continuation and checks.

This perspective focuses on designing systems around model intelligence. System prompts are part of that design; a user's prompt is input processed by the system.

Models and harnesses grow together

Model and harness design evolve together. LangChain explains that products such as Codex and Claude Code use models and harnesses together during , improving file operations, bash, planning and subagent work. Useful capabilities enter the harness and then the next model's training. Models become more capable in that environment, but changing tool logic can also lower performance. This is the article's account of their co-evolution.

Three faces of the harness

The harness built into a coding agent, the harness a project builds itself, and the work of building good harnesses — see each one in its tab.

Harness

  • A glowing purple orb sits in a workshop frame with a magnifier, a wrench and a terminal box joined by a loop arrow.

    Built-in harness

    The harness that comes inside an agent program

    Read more
  • A conveyor belt brings task boxes to a robot worker, then through a checking gate to a logbook.

    Project harness

    A runner built for one project that calls the agent as a worker

    Read more
  • A small robot stacks purple blocks inside a scaffold of guide rails while a distant hand holds a compass.

    Harness engineering

    Designing the environment that lets agents work reliably

    Read more

Learn it in the AI Course too

The Harness chapter of the AI Course — goals, tasks and progress