JA EN
LearnAgents
·★ MEMBER·PAPER·8 min read

Paper Explained: LongHorizon-Harness — Long-Horizon Agent Tasks Are a State-Management Problem, Not an Execution Problem

Without touching the model at all, keeping task state outside execution and running a Manage-Execute-Audit loop dramatically improves long-horizon task performance — a walkthrough of Alibaba DreamX team's harness-design paper, from analogy to pseudocode.

ModalitytextTaskagents

LongHorizon-Harness: Advancing Long-Horizon Agents for Real-World Tasks

Primary source — what this article is built on

undefined2026-08-03undefined2026-08-13same month

LongHorizon-Harness: Advancing Long-Horizon Agents for Real-World TasksZiyu Ma, Hailang Huang, Shun Zou et al. · 2026-08-03 · v1arXiv:2608.01964Paper page·PDF
undefined

Large language model (LLM) agents increasingly undertake long-horizon tasks that require sustained reasoning, tool use, and revision across many interdependent steps. However, existing agent harnesses maintain task execution, task state, and completion assessment within a growing context, making the state difficult to track and allowing incorrect self-assessments to propagate into later decisions. We reformulate long-horizon execution as a task-state management problem and propose LongHorizon-Harness, which maintains the task state explicitly outside execution and updates it only with facts independently verified from the environment. Its Manage-Execute-Audit(MEA) loop uses a manager to maintain the task state and determine the next subtask, a fresh-context executor to perform it, and a read-only auditor to verify the resulting environment state before the next round. A lightweight AgentAdapter supports interchangeable model and harness backends without modifying their native agent loops. LongHorizon-Harness improves Qwen~3.7-Plus from 51.8% to 80.7% on WeaveBench, from 69.7% to 77.2% on Terminal-Bench~2.1, and from 2.8% to 8.3% on OSWorld~2.0. It also raises Claude Opus~4.7 from 20.0% to 34.3% on an OSWorld2.0 subset, demonstrating consistent gains across models, harnesses, and interaction domains.


The intern who pulls an all-nighter, and the team with a ledger

Hand an AI agent a job that takes hours and a familiar pattern appears: a strong start, then a collapse near the end. The paper we cover here — LongHorizon-Harness, from Alibaba's DreamX team (arXiv:2608.01964) — makes a simple claim: the collapse is caused less by the model's intelligence than by how the work is organized. Without modifying the model at all, changing only the outer framework (the harness), it reports lifting the pass rate on the computer-use benchmark WeaveBench from 51.8% to 80.7% (§3.2).

Start with an analogy. A conventional agent is an intern pulling an all-nighter. Inside one ever-growing conversation (its context), it plans, works, takes notes, and decides for itself whether things are done. Tired, it declares "probably finished" and moves on — and one wrong assumption quietly becomes a premise for every later decision.

LongHorizon-Harness turns this into a team. A coordinator maintains the whiteboard (the task ledger), a worker starts each unit of work with a completely fresh head, and a read-only inspector checks the deliverables against the real thing. The worker's "I'm done" never goes straight onto the ledger. Only facts the inspector has verified against the environment itself get written down. That single rule is the heart of the paper.

Why long tasks fall apart

The paper organizes the difficulty of long-horizon execution into three problems (§1). First, compounding errors and goal drift: small early mistakes distort later decisions, and the trajectory slowly veers away from the original objective. Second, context rot: as the history grows, relevant information becomes harder to retrieve, and performance can degrade sharply once context utilization crosses a threshold. Third, task-state loss: agents fail to keep hold of "what the requirements are, what is already done, and what has been discovered" — their own current position.

FIG 1Try reading the x-axis as the number of steps in a task. The difference between effects that accumulate linearly and effects that compound becomes orders of magnitude as steps increase — that steep take-off is exactly what makes long-horizon tasks frightening

On top of this, the paper points out two structural limitations that remain in existing harnesses like Claude Code and Codex CLI (§1): (i) task execution and task-state management live in the same ever-growing context, and (ii) execution and completion assessment are coupled, so an incorrect self-assessment can be recorded as state and become a premise for subsequent decisions. These harnesses already have planning features and subagents — and still break down on long tasks, the paper argues, precisely because these two couplings survive.

The reframing: make it a state-management problem

The paper's reformulation goes like this (§2.1). Long-horizon execution is not one long conversation; it is a sequence of independently audited state transitions. The task state lives outside execution as an explicit record, updated only with facts independently verified from the environment. Across rounds, only the task state and the audit reports persist; the worker's raw interaction history is discarded every round.

The MEA loop: Manage → Execute → Audit

The implementation of this principle is the Manage-Execute-Audit (MEA) loop. Writing SiS_i for the task state at the start of round ii and ViV_i for the accumulated audit reports, the manager's entire job fits in one equation (§2.2):

(Si+1,  qi+1,  ci+1)=Φmgr(T,Si,Vi)(S_{i+1},\; q_{i+1},\; c_{i+1}) = \Phi_{\mathrm{mgr}}\left(\mathcal{T},\, S_i,\, V_i\right)
(1)

In plain words: looking only at the original task T\mathcal{T}, the current ledger SiS_i, and the pile of verified reports ViV_i, the manager produces the updated ledger Si+1S_{i+1}, the next move qi+1q_{i+1} (one of four: execute, done, blocked, or ask the user), and the next work order ci+1c_{i+1}. The manager cannot touch the environment at all — it sees no screen and runs no commands. It is a role that judges from ledger and evidence alone.

The ledger holds three kinds of records — requirements, artifacts, and facts — each marked completed / pending / blocked / untrusted. A record can become completed only when clean audit evidence supports it (§2.2).

What's behind this

§

Members-only from here

371 walkthroughs, 26 textbook chapters, 48 student units and 6 close readings — all included for $4.99/mo, with three new explainers every day. Cancel any time; access runs to the end of the period.

Already a member? Sign in to keep reading

References

  1. Ziyu Ma, Hailang Huang, Shun Zou, Yong Wang et al.. (2026-08-03) LongHorizon-Harness: Advancing Long-Horizon Agents for Real-World Tasks. arXiv:2608.01964Paper page·PDF

This article is written from the source paper above. Where they differ, the original is authoritative.

Comments

Sign in to comment