Summary (Overview)

  • Novel Framework: Proposes LongHorizon-Harness, a framework reformulating long-horizon agent execution as a task-state management problem, explicitly maintaining state outside execution and updating it only with independently verified facts.
  • Manage-Execute-Audit (MEA) Loop: Introduces a three-role loop: a Manager plans subtasks from audited state, an Executor performs them in fresh contexts, and an Auditor independently verifies outcomes before state updates.
  • Significant Performance Gains: Achieves substantial improvements across benchmarks: WeaveBench PassRate from 51.8% to 80.7%, Terminal-Bench 2.1 from 69.7% to 77.2%, and OSWorld 2.0 binary completion from 2.8% to 8.3% (3.0× increase) with Qwen 3.7-Plus.
  • Model-Agnostic and Backend-Compatible: Demonstrates consistent gains across models (Qwen 3.7-Plus, Claude Opus 4.7) and harness backends (Claude Code, Codex CLI, OpenClaw) via a lightweight AgentAdapter interface.
  • Agent Capability as System Property: Shows that agent performance is a property of the complete model–harness system, where a stronger harness can raise task-level performance achievable with a fixed model.

Introduction and Theoretical Foundation

Large language model (LLM) agents increasingly undertake long-horizon tasks requiring sustained reasoning, tool use, and revision across many interdependent steps. The paper identifies three core challenges:

  1. Compounding errors and goal drift: Errors in earlier actions accumulate along the trajectory, distorting subsequent choices and steering the agent away from its original objective.
  2. Context rot: As interaction history grows, relevant information becomes increasingly difficult to retrieve, degrading performance once context utilization crosses a critical threshold.
  3. Task-state loss: Long-horizon tasks are difficult to complete without an accurate and up-to-date task state (requirements, completed actions, artifacts, discovered facts), but agents often fail to recover, retain, and update this state.

Existing agent harnesses (e.g., Claude Code, Codex CLI, OpenClaw) support planning, tool use, and subagents but suffer from two structural limitations:

  • Task execution and task-state management share the same growing context, making state difficult to track.
  • Task execution and completion assessment remain coupled, allowing incorrect self-assessments to propagate as premises for subsequent decisions.

The paper reformulates long-horizon execution as a task-state management problem, where the state is maintained explicitly outside execution and updated only with independently verified facts from the environment.

Methodology

LongHorizon-Harness Framework

The framework implements a Manage-Execute-Audit (MEA) loop (see Figure 2 in the paper):

1. Manager: Maintains the persistent task state SiS_i and determines how the task should proceed. It has access to the original task TT, current task state, and accumulated audit reports ViV_i, but no direct interface to the environment. After round ii, it produces:

(Si+1,qi+1,ci+1)=Φmgr(T,Si,Vi)(S_{i+1}, q_{i+1}, c_{i+1}) = \Phi_{\text{mgr}}(T, S_i, V_i)

where qi+1q_{i+1} is one of execute, done, blocked, or ask, and ci+1c_{i+1} is the subtask contract.

2. Executor: Performs the contract in a fresh, budget-bounded context. It transforms the environment:

(ei,oi)=Φexec(T,Si,ci;ei1)(e_i, o_i) = \Phi_{\text{exec}}(T, S_i, c_i; e_{i-1})

where oio_i summarizes actions performed but does not establish contract completion. The raw interaction trajectory is discarded after each round.

3. Auditor: Independently verifies the environment state through read-only tools. It produces:

vi=Φaud(T,Si,ci,oi;ei)v_i = \Phi_{\text{aud}}(T, S_i, c_i, o_i; e_i)

The auditor cannot modify task-relevant environment state; any detected mutation is recorded as an integrity violation.

Key Design Principles

  • Task-state update: Records are marked as completed, pending, blocked, or untrusted. A record is marked completed only when supported by clean audit evidence—executor claims do not directly change persistent state.
  • AgentAdapter: A lightweight interface supporting interchangeable backends for all three roles (e.g., Claude Code, Codex CLI, OpenClaw, Hermes Agent).
  • GUI/CLI separation: The harness exposes only the environment interface and tool set assigned to the selected executor role.

Empirical Validation / Results

Benchmarks and Metrics

BenchmarkTasksDomainMetrics
WeaveBench114Cross-interface GUI+CLIPassRate (%), Overall score
OSWorld 2.0108Desktop workflowsBinary (%), Partial score
Terminal-Bench 2.1Command-linePure CLI tasksSuccess rate (%)

Main Results

Table 1: WeaveBench Results (key rows)

ModelHarnessPR↑Overall↑DSKDOCGAMWEBDAVOPSSPADES
Claude Opus 4.7Claude Code41.20.53255.647.123.553.323.150.033.340.0
Qwen 3.7-PlusClaude Code51.80.70283.376.529.446.753.866.716.720.0
Qwen 3.7-PlusLH-Harness (CC)80.70.83588.9100.058.873.384.691.766.780.0

Table 2: OSWorld 2.0 Results

ModelHarness / ModeBinary↑Partial↑
Claude Opus 4.8Batched actions20.654.8
Claude Opus 4.7Batched actions18.248.9
Qwen 3.7-PlusSingle action2.821.5
Qwen 3.7-PlusLH-Harness (hybrid)8.335.2

Table 3: OSWorld 2.0 Opus 4.7 Subset (34 tasks)

ModelHarness / ModeBinary↑Partial↑
Claude Opus 4.7Single action20.655.8
Claude Opus 4.7LH-Harness (hybrid)35.366.9

Cost-Performance Analysis

  • LongHorizon-Harness moves Qwen 3.7-Plus to a substantially stronger point on the OSWorld 2.0 cost–performance frontier.
  • Token consumption by role: Manager accounts for only 2–8% of total tokens; Auditor accounts for 19–38%.
  • On Terminal-Bench 2.1, LongHorizon-Harness consumes 24% fewer tokens while achieving higher success rate—showing no fixed token multiplier.

Agent Capability as System Property

Table 4: WeaveBench Games Subset (17 tasks)

ModelScore (CC)Score (LH)Tokens (CC)Tokens (LH)
Claude Opus 4.70.6800.80916.5M11.1M
Qwen 3.7-Plus0.5240.73310.7M34.3M

Qwen with LongHorizon-Harness reaches a mean score of 0.733, exceeding the 0.680 obtained by Opus with the base Claude Code harness, demonstrating that agent capability is a property of the complete model–harness system.

Theoretical and Practical Implications

Theoretical Contributions

  1. Reformulation of long-horizon execution: The paper reframes the problem from managing a growing trajectory to managing explicit, audited task-state transitions, providing a principled separation of concerns between execution, verification, and planning.

  2. Independent verification principle: By decoupling completion assessment from execution, the framework prevents incorrect self-assessments from propagating as premises for subsequent decisions—a fundamental limitation of prior approaches.

  3. Agent capability decomposition: The work demonstrates that agent performance is a system-level property determined jointly by model capability (quality of actions within rounds) and harness design (reliability of maintaining and converting local progress across rounds).

Practical Implications

  1. Immediate performance gains: The framework provides substantial improvements (up to 3.0×) across diverse benchmarks with multiple model backbones, showing broad applicability.

  2. Cost efficiency: While some benchmarks show increased token consumption, others (Terminal-Bench 2.1) show reduced consumption, indicating that the framework can be cost-effective for certain task types.

  3. Backend compatibility: The AgentAdapter enables integration with existing agent systems without modifying their native loops, lowering adoption barriers.

  4. Task-type applicability: The framework is most beneficial for tasks where the primary bottleneck is long-horizon execution reliability (preserving, inspecting, and revising multiple dependent environment states) rather than individual model capabilities (visual perception, mathematical reasoning, coding).

Conclusion

LongHorizon-Harness introduces a general framework for long-horizon agent execution that separates task-state management from environment interaction through a Manage-Execute-Audit loop. The key innovation is maintaining progress as explicit, audited task state, executing each subtask in a fresh context, and carrying only independently verified outcomes across rounds.

The framework achieves consistent improvements across:

  • Hybrid GUI-CLI workflows (WeaveBench: 51.8% → 80.7%)
  • Professional desktop tasks (OSWorld 2.0: 2.8% → 8.3%)
  • Pure command-line environments (Terminal-Bench 2.1: 69.7% → 77.2%)
  • Different model backbones (Qwen 3.7-Plus and Claude Opus 4.7)

The results demonstrate that long-horizon agent capability is determined not only by the underlying model, but also by the harness that organizes, verifies, and converts its local capabilities into end-to-end task completion. Future directions may include further optimization of the auditor-manager feedback loop, extension to even longer-horizon tasks, and integration with more diverse execution backends and domains.

Related papers