Agent Harness Optimization Is Becoming an Outer-Loop Discipline

The next useful automation target is not another agent response. It is the controlled loop that changes prompts, tools, context, and routing, then keeps only improvements that survive evaluation.

Retrieval answer

The next useful automation target is not another agent response. It is the controlled loop that changes prompts, tools, context, and routing, then keeps only improvements that survive evaluation. Most agent improvement is still manual: edit a prompt, change the available tools, adjust context, rerun a few examples, and decide by feel whether the system became better.

New Runtime synthesiseditorial-diagram
A controlled five-stage optimization loop surrounds a locked evaluator while bounded harness changes are tested, scored, kept or discarded, and logged.
A trustworthy outer loop may mutate the harness, but fixtures, scoring, comparison, rollback, and promotion remain deterministic.New Runtime synthesis from autoresearch and agent-system optimization researchOriginal source ↗
  1. Bound the mutationChange one versioned prompt, tool contract, context rule, route, or model setting at a time.
  2. Freeze evaluationRun the candidate against unchanged fixtures, time budgets, and protected cases.
  3. Score broadlyCompare quality, safety, latency, cost, retries, regressions, and required escalation.
  4. DecideKeep, discard, or record a crash without letting the optimizer redefine success.
  5. AuditPreserve every candidate and result before another bounded experiment begins.

Most agent improvement is still manual: edit a prompt, change the available tools, adjust context, rerun a few examples, and decide by feel whether the system became better. The more consequential shift is to automate this outer loop while keeping evaluation and promotion deterministic.

Karpathy’s autoresearch provides a compact reference design. The agent may change one bounded artifact, but it cannot change the evaluator. Every experiment runs under the same time budget, records its result, and is explicitly kept, discarded, or marked as a crash. The loop is useful because mutation and judgment are separated.

That separation matters more than the specific training task. An agent harness has several mutable surfaces:

  • instructions and examples;
  • tool descriptions and tool availability;
  • context selection and compression;
  • routing and retry policy;
  • model choice and effort;
  • verifier and escalation thresholds.

If all of these can change while the score also changes, the optimizer can manufacture an apparent improvement. A trustworthy outer loop therefore needs a frozen evaluation contract and an audit trail of every candidate.

From prompt optimization to system optimization

The AOrchestra research points in the same direction at a larger scale. It represents a sub-agent as a tuple of instruction, context, tools, and model, then trains or iteratively improves the orchestrator that composes those tuples. The object being optimized is no longer a single prompt. It is the allocation policy for an entire agent system.

This also exposes the central risk: the optimizer will become very good at the metric it receives. A single scalar score invites shortcuts. Production promotion needs a scorecard that preserves competing constraints:

  • task success and factual quality;
  • primary-source resolution;
  • false-positive and false-negative rates;
  • latency and monetary cost;
  • idempotency under retries;
  • regressions on protected cases;
  • required human escalation.

The optimizer may propose changes. Deterministic code should still own the fixtures, scoring, comparison, rollback, and promotion gate.

New Runtime Read

For the newsroom, the first useful outer loop is offline replay over historical batches. Freeze a representative set of source-resolution, deduplication, trend-routing, and publication-gate cases. Allow the optimizer to change one versioned prompt, routing policy, or tool contract at a time. Promote a candidate only when repeated runs improve the target metric without weakening source safety or increasing silent errors.

The practical progression is:

  1. preserve real traces and owner corrections;
  2. turn recurring failures into executable fixtures;
  3. define a multi-metric acceptance contract;
  4. let an optimizer propose bounded harness changes;
  5. replay candidates several times;
  6. promote only reproducible Pareto improvements.

The valuable product is not a self-editing agent. It is a controlled laboratory in which the agent system can improve without being allowed to redefine what “better” means.

Recommendation

The next useful automation target is not another agent response. It is the controlled loop that changes prompts, tools, context, and routing, then keeps only improvements that survive evaluation.

Discovery graph / next reads

Continue through New Runtime

Open the graph
  1. 01topicAgent Harness - New RuntimeExplore the agent harness topic hub.
  2. 02topicAgent evals - New RuntimeExplore the evals topic hub.
  3. 03related materialA Software Factory Connects Agents Through Verified OutcomesShares evals.
  4. 04related materialA Balanced MoE Router Can Still Be Functionally DeadShares evals.
  5. 05related materialClaude Code Auto Mode Gates Actions Instead Of ExplanationsShares evals.

These links are also published in this page’s JSON twin and as typed edges in DiscoveryGraph v1.

Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate…

Open the JSON contract