Long-Horizon Task

A long-horizon task is a task that requires an AI agent to make many decisions over an extended sequence of steps. It cannot be completed reliably by one prompt, one retrieval operation, or one short exchange.

Examples include fixing a bug in a repository, preparing a due-diligence report, migrating a codebase, reconciling financial documents, planning a multi-step workflow, or coordinating several specialist agents.

Long-horizon tasks typically involve:

The difficulty is not only reasoning depth. Long-horizon work stresses memory, state management, tool reliability, cost, observability, and user trust. A small mistake early in the run can propagate through later actions.

Strong systems break long-horizon tasks into milestones with explicit success criteria. They preserve artifacts, record decisions, validate intermediate outputs, and stop for human review before irreversible actions. Agent traces are essential because the final answer alone rarely explains how the agent arrived there.

Evaluation should measure end-to-end completion, not isolated snippets. For a coding task, this may include compiling, tests, diff quality, and review burden. For research, it may include source quality, citation support, and handling of contradictory evidence.

OpenAI describes modern agents as systems that can operate independently for minutes or hours while orchestrating tool calls and iterating toward solutions in its discussion of how agents are transforming work.

The LLM Knowledge Base is a collection of bite-sized explanations for commonly used terms and abbreviations related to Large Language Models and Generative AI.

It's an educational resource that helps you stay up-to-date with the latest developments in AI research and its applications.

© 2026 Promptmetheus