Towards Long-Horizon Agents: A 149‑Page Survey on Harness Engineering and Model Optimization

This survey analyzes over 900 works to define long‑horizon agents as a system‑level capability emerging from the co‑evolution of external harness engineering and internal model optimization, outlines key challenges, taxonomies, a three‑stage evolution, and future research directions.

Machine Heart
Machine Heart
Machine Heart
Towards Long-Horizon Agents: A 149‑Page Survey on Harness Engineering and Model Optimization

Introduction

Recent years have seen large models evolve from single‑turn chatbots to decision‑making cores in software engineering, deep retrieval, computer operation, multimodal interaction, and scientific discovery. A central question arises: can an agent, even if smart in a single step, maintain its goal, correct errors, manage context, and reliably complete tasks over hundreds or thousands of inter‑dependent actions?

What Is a Long‑Horizon Agent?

Long‑horizon agents aim to answer this question. According to METR measurements, at roughly 50% success rate, frontier agents have increased the “human‑expert equivalent time” for software‑engineering tasks from seconds to tens of hours, with the time span doubling about every seven months (accelerating to a four‑month cycle after 2023), indicating rapid expansion of long‑horizon capability.

Beyond Runtime Length

The survey stresses that merely running longer does not equal long‑horizon ability. The crucial factor is whether an agent can act continuously and effectively on longer, more complex, and more realistic reasoning dependency chains, rather than simply consuming more time or compute.

Survey Scope and Unified View

Covering more than 900 papers, systems, and engineering practices, the work proposes a unified definition, comprehensive classification, and future roadmap using a collaborative‑evolution perspective: External Harness Engineering × Internal Model Optimization .

Key Challenges

Goal Drift & Error Accumulation: After thousands of steps, agents gradually deviate from the original goal, with local errors compounding into a divergent trajectory.

Context Corruption & Window Pressure: Longer context does not always help; accumulated reasoning traces and tool outputs can cause performance drops or premature termination when the window fills.

Sparse/Delayed Rewards & Irreversible Actions: Rewards often appear only at the end, making intermediate credit assignment difficult, while long executions increase the risk of irreversible mistakes such as data deletion or wrong authorizations.

Simply scaling parameters or context windows cannot solve these problems; without planning, state persistence, tool governance, verification, and recovery mechanisms, agents can quickly lose control on long trajectories.

Core Argument

The authors argue that “long‑horizon ability” is a system‑level capability that emerges from the co‑evolution of external “harness engineering” and internal “model optimization.” The harness externalizes planning, memory, tool use, and verification, while the model provides reasoning and action policies. Together they determine whether an agent can stably progress along a long, inter‑dependent trajectory.

Bidirectional Evolution Path

Figure 2 illustrates a two‑way evolution: harness engineering first externalizes capabilities (planning, memory, tools, verification), rapidly extending the model’s functional boundary. Real‑world interaction then generates trajectories and feedback that are absorbed back into the model through data/environment construction, fine‑tuning, reinforcement learning, distillation, and self‑evolution. Strengthened models can subsequently handle more complex harnesses, forming a continuous loop.

Task and Capability Hierarchies

Three task tiers (H1‑H3) and three capability tiers (C1‑C3) are defined:

H1 – In‑Window Tasks: Completed within a single context window but require a coherent multi‑step trajectory.

H2 – Cross‑Window / Cross‑Session Tasks: Extend beyond a single window, lasting hours to days, needing context compression and progress recovery after interruptions.

H3 – Cross‑Task Flows: Ongoing streams of sub‑tasks across environments, demanding persistent operation rather than isolated rounds.

Corresponding capabilities:

C1 – Interactive Reasoning (for H1): Plan‑Act‑Observe‑Correct loop to maintain a coherent path.

C2 – State & Memory (for H2): Read/write memory, checkpointing, reliable recovery.

C3 – Experience Accumulation (for H3): Consolidate reusable skills, generalize from experience, and continuously improve.

Three Stages of Control Evolution

Stage 1 – Prompt Engineering (2020‑2023): Focus on crafting instructions, chain‑of‑thought, task decomposition, and self‑correction to guide single‑call reasoning.

Stage 2 – Context Engineering (2023‑2025): Systems actively organize retrieval results, tool outputs, dialogue history, and compressed summaries, shifting control from prompt design to context selection.

Stage 3 – Runtime Harness (2025‑present): Harness expands control to runtime scaffolding, managing context, tools, memory, workflow, permissions, verification, recovery, and multi‑agent collaboration, turning a single model call into a sustainable agent system.

Six‑Component Harness

Loop & Workflow: Linear execution, plan‑execute, and branch search; explicit task decomposition, sub‑goal tracking, replanning or rollback on failure.

Context & Memory: Discard, compress, and select work context; write long‑term information to persistent memory to avoid unbounded growth.

Tools, MCP & Skills: Connect external capabilities, support tool interfaces, discover tools, and maintain reusable skill libraries.

Orchestration: Task decomposition, role assignment, collaborative topology, and communication protocol management for multiple models/agents.

Hooks & Middleware: Enforce rules, permissions, monitoring, and security policies at input, tool‑call, and protocol boundaries, adapting dynamically to risk.

Verification: Step‑level to task‑end checks for correctness, safety, and goal alignment; drive corrective actions via external signals rather than model self‑approval.

The harness is not merely a “shell” but a state machine, controller, and security boundary that must halt, inspect, switch paths, or recover when the model errs or forgets.

Internal Model Optimization Pipeline

Architecture Base: Explicit long context, compression, hybrid architectures, and high‑throughput decoding.

Task/Environment/Trajectory Synthesis: Build scalable, verifiable, realistic interaction environments and generate long‑trajectory data with successes and failures.

Pre‑mid Training: Inject reasoning priors, long‑context state, multimodal perception, and balanced data mixes.

Fine‑Tuning: Instruction selection, curriculum learning, and distillation to master basic interaction before tackling longer, harder tasks.

Agent Reinforcement Learning: Credit assignment, policy optimization, sampling strategies, and multi‑turn interaction to guide intermediate steps despite sparse terminal rewards.

On‑Policy Distillation: Learn from the model’s own evolving distribution, narrowing the gap between teacher and deployment policies.

Self‑Evolution: Transition from offline experience curation to online self‑improvement, exploring co‑evolution of agents and environments.

Training data must include not only final answers but also realistic environment feedback, process states, tool results, and error‑recovery traces. Optimization objectives should evaluate the entire trajectory for efficiency, recoverability, and constraint satisfaction.

Evaluation Shift

Benchmarks need to move from one‑shot QA to time‑span evaluation, asking whether tasks contain long dependencies, whether intermediate steps can be checked, whether failures can be recovered, and how budget and harness choices affect performance.

Application Forms

Based on agent‑environment interfaces, five representative application categories are identified:

Software engineering – understanding large codebases, maintaining cross‑file plans, iterative fixing based on tests and reviews.

Information retrieval – deep or broad search, multi‑source evidence integration, traceable conclusions over long chains.

Computer operation – continuous perception of UI state on browsers, desktops, or mobile devices to perform real actions.

Multimodal agents – actively select observations from images, video, audio, and achieve cross‑modal understanding and generation.

General agents – personal assistants, embodied systems, and productivity tasks that switch among tools, environments, and long‑term goals.

Future Outlook

The survey groups open problems into four frontier axes with nine concrete directions:

Evolution: Generalization and continual learning; enabling harnesses to evolve, migrate, and be reusable while internalizing experience.

Effectiveness: Deploying in real environments; building verifiable yet realistic training environments to improve sample efficiency.

Efficiency: Budget‑aware reasoning; agents must sense task difficulty, remaining tokens, time, and monetary budget to decide when to think deeply, compress context, or switch models.

Trustworthiness: Recoverable and governable autonomy; early failure detection, external verification, minimal permissions, approval gates, sandboxing, provenance tracking, and independent audits.

Safety and permission boundaries reside primarily in the harness rather than model weights; the model’s alignment is necessary but insufficient.

Conclusion

While past scaling focused on parameters, data, and compute, the next axis is time span. The key metric is not how long a system can run, but whether it can act continuously, effectively, and safely on longer, more complex, and more realistic dependency chains. Long‑horizon ability emerges from the co‑evolution of harness engineering and model optimization, and the survey maps existing work into a six‑dimensional landscape—Foundation, Evolution, Harness, Optimization, Application, and Frontier—while highlighting open research directions.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Model OptimizationAutonomous AgentsHarness EngineeringAI SurveyLong-Horizon Agents
Machine Heart
Written by

Machine Heart

Professional AI media and industry service platform

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.