Large language model (LLM) agents are increasingly tasked with long-horizon activities that demand sustained reasoning, tool use, and iterative refinement across many interdependent steps. However, existing agent harnesses keep execution logs, task state, and completion checks all within a growing context window. This makes it hard to track progress and allows incorrect self-assessments to cascade into later decisions.
To address this, researchers propose LongHorizon-Harness, which reframes long-horizon execution as a task-state management problem. The framework maintains the task state explicitly outside the execution flow, updating it only with facts independently verified from the environment. Its Manage-Execute-Audit (MEA) loop uses a manager to maintain the state and decide the next subtask, a fresh-context executor to perform that subtask, and a read-only auditor to verify the resulting environment state before the next round.
A lightweight AgentAdapter allows the harness to work with interchangeable model and harness backends without modifying their native agent loops. This design ensures that the state remains accurate and that decisions are based on verified facts rather than potentially flawed self-assessments.
In experiments, LongHorizon-Harness delivered substantial gains across models and benchmarks. For instance, it improved 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 raised Claude Opus 4.7 from 20.0% to 34.3% on an OSWorld 2.0 subset, demonstrating consistent improvements across different models, harnesses, and interaction domains.