An AI harness is the software around an AI model that lets it do work. It gives the model tools, supplies the context it needs, and manages what happens between steps.

For example, say you ask a coding agent to fix a button that stopped working on your website.

  1. The harness gives the model access to the project files and the rules for working in them.
  2. The model decides which files to inspect and what change to make.
  3. The harness runs the requested file edits and tests, then sends the results back to the model.
  4. The model uses those results to decide whether the fix is complete or needs another pass.

A harness can also control which directories the agent can write to, which commands it can run, and when it needs your approval.

In Codex, the GPT model handles the reasoning. The surrounding tools, permissions, and workflow that let it read your project, edit files, and run tests are the harness. That’s why the same model can behave differently in two coding tools. Each harness gives it different context, capabilities, and rules.