Planning Horizon
When you plan a day you think in hours; when you plan a career you think in years. The unit matters, and so does how far ahead you bother to look. An agent's planning horizon is exactly that choice: how many steps into the future it commits to before it stops and reconsiders.
Where the horizon comes from
It is rarely a single number in a config file. The effective horizon is set by whatever runs out first:
- The context window — a plan the agent can no longer see is a plan it no longer has.
- The step cap the loop enforces before it terminates.
- The token or cost budget allotted to the run.
- The agent's own planning depth — how many subtasks the planner was asked to produce.
Why the length is a trade-off
A short horizon makes an agent reactive and cheap: it responds well to whatever the last tool returned, but will happily take a locally sensible step that dooms the task — deleting a file it needs three steps later. A long horizon produces coherent multi-step work, and is how an agent completes something like a SWE-bench issue that needs a dozen coordinated edits. It also multiplies the cost of being wrong early, because every later step was reasoned from a stale premise. Practical designs plan long and re-examine often: a plan spanning many steps, re-derived whenever an observation contradicts it.
An agent's planning horizon is how far ahead it reasons before acting or reconsidering — a handful of steps, or an entire multi-stage task. In practice it is set by the context window, the step cap and the cost budget as much as by design. A short horizon keeps the agent cheap and reactive but blind to consequences; a long one sustains coherent multi-step work while making an early mistake expensive to carry forward.
Imagine packing for a trip. You could pack for tomorrow only, or for the whole fortnight. Looking further ahead takes more effort, but you stop forgetting things you will need on day nine.
An agent's planning horizon is how far ahead the software thinks before it acts. A short horizon means it only worries about the very next step — quick, cheap, and liable to do something it regrets later. A long horizon means it maps out the whole job first, which keeps it on track but makes an early misjudgement costly.
In practice the horizon is also limited by how much the agent can hold in mind at once.