Home / Articles

Why the Agent Harness, Not the Model, Decides What Becomes Real

A timed-out CRM update shows why agents need tool contracts, unknown-outcome states, idempotent retries and verified completion, plus controls worth keeping.

Publisher: REACTAPP.TOP6 min read1450 words

This article is published in English.

Sources: The Model Is Not the Agent. The Harness Is the Product.

Say an agent has to change the delivery contact on a customer account. It locates the record, drafts the edit and calls the CRM. Then the call times out. Maybe the edit failed. Maybe it went through and only the reply got lost. Maybe the CRM is still working on it.

Answering "Done" with confidence settles none of that, and firing the call again without knowing what happened the first time doesn't either. The story is made up, yet it exposes a genuine design issue. Asking for an action and confirming its result are separate events. A model can follow the request flawlessly while the product still loses track of reality, and that's the job of the harness.

What the harness is

In this piece, the harness is whatever runtime ties together model calls, context, tools, execution rules and progress tracking. It might be several parts, and nobody needs to write a framework to have one. Access control stays with identity services, durable records stay in databases and business rules stay in the outside systems. The harness sits across those lines and coordinates them.

A short formula captures it: the model proposes, and the harness governs what becomes real.

Models can plan, interpret evidence and judge whether work is finished, so the point isn't that software does the thinking around a passive model. The point is that the system must enforce its limits even when the model's judgment is wrong.

OpenAI's description of the Codex agent loop shows the mechanics: prepare input, query the model, run requested tools, hand their output back, and continue until the model emits a message. That final message ends a turn. By itself it proves nothing about whether a customer record changed.

That doesn't make the harness the whole product. Model quality, user experience, domain expertise and integrations still carry weight. One model call is enough for a contained writing job. Editing a CRM record also needs permission to act and proof from the system that was modified.

Tools as contracts

A tool called "update customer" is underspecified. It leaves open which customer and which account, what may change, and what happens if a colleague edits the record after the agent read it. Anthropic's advice on writing tools points to distinct purposes, useful return values and trials on realistic tasks. Descriptions guide the model's choice, while the code behind them has to enforce the rules.

For the delivery-contact example, the contract could cover:

  • Who: the resolved customer ID, within an account the agent is allowed to touch.
  • What: only the delivery-contact fields the request names.
  • Guard: the record version the agent last saw, if the system exposes one.
  • Identity: a stable request ID, provided the service can deduplicate on it.
  • Answer: a structured status, supporting evidence and errors that a person or program can act on.

These are proposed choices, and not every CRM offers them.

Boundaries matter more than comforting wording. A prompt line saying "only update authorized customers" is advice. The service itself must check the true identity, account, target and allowed fields. Reads need scope as well: pulling an entire customer database isn't harmless just because nothing was modified. Anthropic's write-up on containing Claude argues for layered controls around the model, the execution environment and outside content.

In this design, an out-of-scope request is refused before any write. A version conflict becomes a decision about changed evidence, not permission to overwrite.

When the outcome is unknown

After the timeout, the harness should record an unknown outcome. That's neither success nor necessarily failure. Unknown is a legitimate execution state, and it isn't a license to try again.

Recovery gets easier when three kinds of state stay separate:

  1. Working context: the material the model needs to make its next decision.
  2. Durable run record: what was intended, what executed, who approved and whatever is still unsettled.
  3. External business state: what the CRM currently holds.

A chat summary can get a model going again, but it shouldn't be the sole memory of an important operation. Checkpoints have limits too, because the real world keeps moving after one is saved and someone may have changed the contact in the meantime. Anthropic's Managed Agents design shows why lifetimes should be separate: session log, harness and execution environment live apart, so a fresh harness can pick up from persisted events. Smaller apps can keep that split logical inside one service. What counts is being able to recover, not reproducing a distributed setup.

For the contact example, write down the intended operation before sending it. After a timeout, ask the service for the operation's status or look for other trustworthy evidence. If a read-back shows the new contact, that tells you the current state. It doesn't necessarily tell you which request caused it. Whatever gets reported should stay within what the evidence supports.

Retries need idempotency

"Try three times" says how long to persist and nothing about whether another attempt is safe. The AWS Builders' Library describes a stronger arrangement in its idempotent API guidance: the caller supplies a request identifier, the service recognizes repeated intent and it records the duplicate together with the mutation.

A local ID can't make an external write happen once. The service has to honor the contract, including its parameter rules and retention window. For the CRM case, the recovery rule has three branches:

  • If authoritative evidence confirms completion, check the required postconditions and finish.
  • If the service's contract allows safe replay, resend using the same operation identity and identical intent, staying inside its limits.
  • If the outcome stays ambiguous and replay is unsafe, pause and ask for help.

Generating a fresh request ID just to repeat an uncertain write defeats the purpose. And when the CRM has no way to report operation status or deduplicate reliably, choices shrink. That constraint should show up in the product design instead of being papered over with a more convincing prompt.

Explicit exits for the loop

A useful loop observes, decides, acts and verifies, and it also needs clear ways out.

The product should distinguish these end states:

  • Completed: the needed result has been checked and confirmed.
  • Awaiting approval: the following step requires someone with more authority.
  • Blocked on input or a dependency: progress needs something the agent has no way to provide.
  • Cancelled or out of budget: the run ended without any claim of success.

Retries inside a continuing run still follow the recovery rules. Repeated failure isn't progress just because the agent stays busy. The system should keep enough evidence to explain its decisions: the relevant tool calls, returned statuses, authorization checks and outcome checks, with sensitive payloads kept out of logs unless they're needed and protected.

Evaluation follows the same rule: inspect the environment that was modified instead of just reading the final message. A polished reply that names the wrong contact is a failure. A well-explained pause after an unresolved write could be the right result.

Don't build more than you need

This isn't an argument for the biggest possible harness. Anthropic's experiments with long-running applications removed components one at a time and reassessed each as models improved. Extra evaluation helped on harder tasks yet became overhead where a stronger model already did well.

Two kinds of parts emerge. Product controls carry requirements such as authorization, recovery and being accountable for completion. Model-specific scaffolding props up present weaknesses with repeated planning, corrective prompts or extra evaluator passes. After any model upgrade, test the scaffolding again. Keep the product controls for as long as the product needs them. The target is the smallest control system that still keeps work safe, observable and recoverable.

In the made-up CRM task, the final message should be concrete: the record that was checked, the fields that now match the request and anything still open. An unknown outcome is reported as unknown. A pending approval names the action waiting for sign-off. A run cut off by a budget is never presented as a success.

What makes an agent worth trusting isn't persistence. It's being able to see what it did, to recover when something breaks and to rely on the limits it stays inside.