Harness, agent, loop, orchestrator: what each one is, shown on one PC that runs all four

Ravi Menon, Developer tooling editor (AI-assisted) · · updated

On a single 16 GB Windows PC running Claude Code, Codex, and a self-hosted harness across three repositories, logs from nine days show how much time heavy commands spent waiting in a queue. The agent, loop, harness, and orchestrator each played a distinct role on it [1].

Each word points to a real running part

The terms agent, loop, harness, and orchestrator are each grounded in a separate, running component on this PC [1]:

  • Agent: This is the model making decisions step by step—what file to read, what edit to make, what command to run—until it believes the task is done. Here, every Claude Code or Codex session, and each self-hosted agent served by the harness, counted as an agent. Their tools included basic actions like reading, editing files, and running commands [1].
  • Loop: There were two distinct loops. The *inner loop* is the agent cycling through "think-act-observe" steps, managed under a task-specific step budget. The *outer loop* is the schedule—rerunning a task every hour, or a nightly review every 30 minutes [1].
  • Harness: Everything outside the agent's direct control—the step budget, what tools are available, the success check, and the log—was managed by the harness. For example, the harness would clamp the step budget, determine if a result met criteria, and log all actions [1]. The harness defines what "done" means; the agent only claims to be done [1].
  • Orchestrator: On this PC, orchestrator duties were handled by a claims file (tracking who owns what work), a gate for heavy commands (to avoid memory exhaustion), and handoff notes. These together decided which agent did what, and when, so agents did not collide or starve the machine of resources [1].

This separation is more than vocabulary: each part failed in its own way. For example, before claims were moved to a shared file, agents duplicated work; after, they negotiated or were refused [1].

Waiting in the queue cost as much time as running

Over nine days on a 16 GB PC running several AI coding agents, heavy commands spent about as long waiting in the queue as they spent running [1]. It did not measure the time agents spent thinking, so it cannot say how that compares. Here is what the log captured (29 October to the evening of 6 November 2026):

  • 2,100 heavy commands—builds, test suites, and installs—were run through a gate that allowed at most two concurrent jobs, blocking new starts when memory was low [1].
  • 76.2 total hours were spent waiting in the queue, compared to 72.2 hours spent actually running the commands [1].
  • 827 commands out of 2,100 waited at all, while the rest started immediately; the median wait time was zero, so congestion was clustered in busy periods [1].
  • 421 commands ended with a non-zero exit code; these were failed builds or tests [1].
  • The worst memory pressure recorded: a command launched with just 0.33 GB free out of 16 GB installed [1].
MetricValue
Heavy commands executed2,100
Total queue wait time (hours)76.2
Total run time (hours)72.2
Commands that waited827
Median wait time0 sec
Failed commands421
Installed RAM16 GB

Waiting concentrated in crowded hours; most commands still ran without delay, but when the machine backed up, waiting matched active work [1].

Orchestrator: The simple controls that stopped real failures

Orchestration was not handled by a single tool or framework, but by a set of plain files: a JSON claims file, a CSV log for heavy commands, and markdown notes for area handoffs [1]. These measures were adopted only after concrete failures:

  • Before the claims file, two sessions built the same change within minutes, and three took the same sites, duplicating work [1].
  • After, the claims file successfully blocked a session from taking a topic held by another, and in one case, two sessions agreed to split a feature rather than duplicate effort [1].

The orchestrator’s other job was to avoid overloading memory. The gate would refuse new heavy commands if memory was close to full, preventing the system from stalling or killing processes [1].

The orchestrator here was minimal, but effective: each control was added only after the lack of it resulted in a real problem [1].

Harness: What defines and stops the agent, and where it failed

The harness sets the rules and boundaries for the agent, including:

  • Step budget: Every task was clamped to a maximum of 30 steps, whatever it asked for, until this was raised to 60 after a review showed that some tasks (like nightly site review) were being stopped before completion [1].
  • Success checks: The harness used a local judge model to decide if criteria were met. It failed on criteria like "every X has Y" when there were zero X, causing tasks to continue running even though they were done [1].
  • Logging: The harness kept logs of every action, tool call, and final outcome [1].

Most harness failures were not dramatic, but led to wasted cycles or tasks that never stopped. For instance, one task spent 3.0 million tokens because its success criterion kept flipping between met and not met, which the harness interpreted as ongoing progress [1].

This matches published evidence that, for long tasks, the harness often matters more than the model itself. In controlled studies, changing the harness produced larger performance shifts than swapping models, sometimes even reversing which model ranked higher [3].

A worked example: How a simple claims file prevented duplicated work

Take two agent sessions that both try to claim the same topic. Before the claims file, nothing noticed, and both could build it. With the file:

  1. Session A requests the topic and is granted it. The claims file records this.
  2. Session B tries to claim the same topic, but the claims file refuses, identifying Session A as the current holder.
  3. The agents negotiate by message and agree to split the work, rather than both building the same feature [1].

This is not a theoretical fix: the log records this refusal and the negotiated split [1]. Without the orchestrator’s claims file, duplicated work is not just possible, but observed.

Questions readers ask

How do I know if I have an agent or just a workflow?

If your system lets a model dynamically decide which tools to use and when, and it directs its own steps, you have an agent. If each step is predetermined and the model simply fills in blanks, it's a workflow [2].

Will a more powerful model fix my failures?

For long-horizon, multi-step tasks, published studies and this PC’s logs show that the harness (the rules, checks, and limits around the model) often matters more than the model itself [3, 1].

What is the first part to check when work is duplicated or stalls?

Check your orchestrator: is there a clear record of which session owns which resource, and is there a gate to prevent overload? In these logs, most duplication and stalling happened before claims and gating were enforced [1].

How the numbers work

These figures were computed for this article, not estimated by its writer. Inputs come from the numbered sources or are assumptions, labelled as such; change an assumption and the results change with it.

FigureValueWhere it comes from
Installed RAM on test PC16 GBsource [1]
Test period duration9 dayssource [1]
Heavy commands executed2,100 commandssource [1]
Total heavy command wait time76.2 hourssource [1]
Total heavy command run time72.2 hourssource [1]
Heavy commands that waited827 commandssource [1]
Heavy commands failed (non-zero exit)421 commandssource [1]
Total work claims recorded283 claimssource [1]
Average wait time per heavy command0.0363 hourscomputed: Total heavy command wait time ÷ Heavy commands executed
Average run time per heavy command0.0344 hourscomputed: Total heavy command run time ÷ Heavy commands executed
Percent of heavy commands that waited39.381 %computed: Heavy commands that waited ÷ Heavy commands executed × 100
Percent of heavy commands failed20.048 %computed: Heavy commands failed (non-zero exit) ÷ Heavy commands executed × 100
Total waiting time as percentage of running time105.54 %computed: Total heavy command wait time ÷ Total heavy command run time × 100

*Corrected 2026-11-06: Source 1 was the site home page; it is the material, now published as the lab page.*

*Corrected 2026-11-08: Our own measurements were called 'test data' or 'our test' in the text, which reads as a test of something else and as a claim of testing; they are the site's own measurement or count. Wording only; no figure changed.*

*Corrected 2026-11-08: The headline claim was narrowed to what the gate log shows: heavy commands waited 76.2 hours and ran 72.2 hours; the log does not measure agent time or why commands failed. The figures are as of the evening of 6 November. An internal topic name, the sliders on logged counts and a Wikipedia source were removed.*

*Corrected 2026-11-14: A highlight box showed no figure; it now gives the two totals. One garbled sentence about the nine-day log was rewritten. No figure changed.*

Sources

  1. Our own records: the material behind this article
  2. Building effective AI agents \ Anthropic
  3. Stop Comparing LLM Agents Without Disclosing the Harness

More articles