Long-Horizon Task

A long-horizon task is one an agent cannot finish in a few steps: it needs a sequence of dependent actions, often over minutes or hours, where later steps rely on earlier ones having been done correctly. Migrating a dataset, working a support case to resolution, or refactoring across a repository are long-horizon; answering a question from one retrieval is not. The defining property is compounding. If each step is independently likely to be right, the chance that a whole chain is right is the product of those chances, not the average, so reliability that looks perfectly acceptable per step becomes poor across a long run. This is the single best explanation of why agent demos are convincing and agent deployments disappoint: the demo is short, and the difference between a five-step task and a fifty-step one is not five times harder but a different regime. Errors also change character as the horizon lengthens. A mistake early is not just wrong, it becomes an assumption every later step builds on, and the agent has no natural moment of doubt about work it believes it already completed. Meanwhile the context fills with its own history, the goal competes for attention with a growing transcript of tool output, and the thing being optimised drifts towards whatever was discussed most recently. The practical responses are unglamorous. Break the horizon into stages with a checkable result at the end of each, so a failure is caught at the stage boundary rather than at the end. Persist state so an interrupted run resumes instead of restarting, because restarting repeats every side effect the first attempt already caused. Verify between stages with something other than the model that did the work. And cap the run, since an agent that cannot finish will otherwise keep spending. The honest strategic move is often to shorten the horizon rather than to strengthen the agent. Many tasks described as long-horizon are a fixed pipeline with one genuinely uncertain step in the middle, and are far more reliable when written that way: the deterministic parts as code, the agent used only where the number and order of steps really cannot be known in advance.

Related terms

More AI Agents terms