i
Research
Analysis · 2026-05-06

Long horizons alone can collapse RL training for LLM agents

Cover: Long horizons alone can collapse RL training for LLM agents

There is a lot of noise around LLM agents right now: we teach models to use tools, browse websites, fix code, work through multi-step tasks. It looks as though the central question is the quality of the model itself, the size of the context window, or the cleverness of the training algorithm. But the authors of "On Training Large Language Models for Long-Horizon Tasks" offer a far more mundane and far more useful explanation: sometimes an agent fails not because it cannot reason, but because the goal is simply too far away.

Agents break down because the path is long, not because they are dumb

It is a subtle distinction, but a fundamental one. A model that knows the rules of Sudoku and can solve a puzzle in one shot will not necessarily solve the same puzzle reliably across 25–30 consecutive steps of interaction with an environment. Errors pile up along the way, the reward signal thins out, and reinforcement learning starts behaving less and less predictably.

This paper separates reasoning difficulty from the length of the path to the goal carefully, almost surgically — and shows that a long horizon is a serious bottleneck in its own right. For anyone building agent systems that is a consequential finding: before inventing ever more elaborate RL recipes, it may be worth first cutting the number of steps the agent is forced to take.

What the paper actually tested

The core idea is simple: work out how horizon length affects the training of LLM agents when everything else is held as constant as possible.

By "horizon" the authors mean not just a cap on steps but the actual length of the action chain needed to reach the goal. They separate several things:

the minimum number of primitive actions required to reach the goal;
the maximum interaction budget the environment allows;
the number of steps the policy actually takes.

The key move is to build tasks where the rules and the structure of the reasoning stay the same and essentially only the length of the solution changes.

For that the authors picked two convenient text worlds:

Sudoku, where solution length is controlled through the number of empty cells;
Rush Hour, the sliding-car puzzle, where solution length is the minimum number of moves.

In the Sudoku case the authors deliberately filtered the puzzles so that only basic solving techniques are required. That keeps two causes of failure apart: "the model does not know how to solve this" and "the model knows how, but cannot hold a long sequence of actions together."

The paper's central claim: horizon length is a bottleneck in its own right, and shortening the horizon stabilizes training and improves transfer to longer tasks.

Another strong methodological move: the authors checked whether the model could solve the same instance in a compressed, short-horizon format — emitting the entire finished board at once instead of filling Sudoku in cell by cell. If the model handles that, the underlying solving ability is there, and whatever goes wrong afterwards can be pinned on the length of the interaction.

The main result: a long horizon breaks RL all by itself

The central finding reads almost like a diagnosis: increase only the length of the solution and reinforcement learning becomes unstable, and can collapse outright.

The authors trained Qwen3-1.7B, first with SFT on expert trajectories and then with RL on top. On short tasks everything looks familiar: RL helps, scores go up. As soon as the distance to the goal grows, the picture changes sharply — heavy oscillation first, then a collapse in performance.

Training dynamics at different path lengths to the goal: RL is stable on short tasks and quickly becomes unstable on long ones.

What makes this valuable is that the authors do not stop at "long tasks are worse." They try to isolate the cause, and their conclusion is that the task has not necessarily become intellectually harder. Even when the reasoning is essentially the same, adding steps by itself makes training far more brittle.

Why does this happen? The paper points to two mechanisms.

First, exploration of the action space. The longer the chain, the smaller the chance of stumbling into a successful trajectory by accident or half-intent. A mistake near the start poisons everything that follows.

Second, credit assignment. When reward is sparse and arrives only at the end, a failure pushes a bad signal onto the whole chain — including intermediate steps that may have been correct. For a language model that is particularly nasty: a negative signal does not carefully nudge it toward the right answer, it spreads probability mass across an enormous vocabulary and amplifies noise.

The observation maps cleanly onto real systems. A coding agent may know how to fix an individual bug, but if success requires twenty dependent steps — reading logs, editing a file, running tests, fixing the errors that fix caused, checking again — training becomes far less reliable.

Horizon reduction turns out to be a surprisingly plain fix

The most practical takeaway: you do not necessarily fight a long horizon with cleverer RL, but with a structural cut in the number of steps.

The authors call this the horizon-reduction principle and propose two main ways to apply it:

use macro-actions, where a single turn carries several primitive actions at once;
break the goal into subgoals, so that a long task becomes a chain of short, checkable segments.

This is where the paper is at its most convincing: the idea looks obvious, and the experimental effect is very large.

Primitive actions versus macro-actions in Sudoku and Rush Hour: horizon reduction markedly improves stability and final performance on long tasks.

In Sudoku the agent was allowed to fill several cells per step rather than one. In Rush Hour it could make larger moves. The result: training is steadier, converges faster and, most importantly, does not fall apart on the long scenarios where the primitive-action baseline fails outright.

The authors checked separately whether the gain is a side effect of "a stronger policy." The ablation is elegant: a policy trained with macro-actions was made to act in the environment as though only single primitive steps were available. Stability degraded again. So the operative factor really is the reduction of the effective horizon, not the model simply having gotten smarter.

Separately interesting: not all macro-actions are equally useful. Rigidly fixed batches of steps work worse than flexible macro-actions whose length the policy picks for itself. That matches a sound engineering instinct: aggregation that is too coarse can hurt as much as no aggregation at all.

Subgoals work too, which is good news for real agents

The second route is decomposition into subgoals. In Sudoku the authors used intermediate, checkable targets such as correctly completing an individual block. That turns one long episode with sparse reward into a sequence of shorter segments with dense signal.

Splitting the task into subgoals helps RL on long Sudoku instances, where the sparse-reward baseline barely makes progress.

This matters beyond puzzles. In real systems we already build agents around intermediate checkpoints by instinct: find the relevant file, then localize the bug, then propose a fix, then run the tests. The paper gives that habit an empirical justification rather than a merely engineering one: subgoals shrink the effective horizon and make training easier.

In effect, the paper leads carefully to the thought that many successful agent architectures work not because their planning is especially elegant, but because they quietly shorten the horizon — through action hierarchies, API calls, code as a high-level action, intermediate checks and dense feedback.

The best part: horizon reduction helps even on longer tasks the model never saw

One of the most satisfying parts of the work is an observation the authors call horizon generalization. A model trained on tasks of moderate length can transfer decently to longer instances, as long as the reasoning difficulty stays the same.

Horizon generalization: policies trained on a bounded task length transfer to longer scenarios, and the horizon-reduction variants do it markedly better.

It is an important result and, honestly, a slightly counterintuitive one. You would expect an agent that never trained on very long episodes to do badly on them. It turns out that if training was stable and per-step accuracy is good enough, the model can stretch further than anything it saw during training.

The macro-action variants transfer best, for two reasons:

they raise accuracy at every step;
they reduce the number of points at which error can accumulate.

In practice that means this: you do not always have to train an agent on the longest and most expensive scenarios from the start. It is often smarter to get it through shorter trajectories reliably first, then rely on transfer and a curriculum over task length.

The authors test that idea too. In Rush Hour they compare training directly on long instances against a schedule that starts short and then moves to long. The curriculum wins. That is one more argument that short-horizon competence is not a pleasant bonus but the foundation everything else is built on.

Why this paper matters beyond Sudoku

At first glance the work can look like "another RL-on-toy-environments paper." That would be a shallow reading.

Its real value is that it offers a simple axis for analyzing agent systems: before arguing about model size, optimizer tricks and prompt quality, ask what the effective horizon is here.

That question is useful across a lot of applied settings:

a coding agent that can generate and run a script in a single step will often be more robust than one making dozens of small calls;
a web agent with high-level actions through an API may train better than one imitating every click;
systems with verifiable intermediate results get more than "a nicer interface" — they get a structural reduction in the difficulty of training.

The authors also show that the effect is not confined to one task, one model or one optimizer. Similar patterns show up in WebShop, on a larger model and under a different style of optimization. That strengthens the central claim: horizon length is not a quirk of one implementation but a constraint that cuts across the whole class of LLM agent systems.

There is an important limitation as well. The paper is honest that horizon generalization does not mean generalization across reasoning techniques. Once Sudoku starts demanding fundamentally harder techniques, transfer breaks. That is a sober conclusion: RL is good at stretching abilities a model already has over longer trajectories, but it is under no obligation to produce qualitatively new ones.

The takeaway

The value of this paper is not in headline numbers but in how precisely it names the problem. For LLM agents the bottleneck is often not the reasoning itself but the length of the path to the goal. And if that is right, the best next move is not necessarily to complicate RL but to shorten the effective horizon.

What follows is close to an engineering manifesto:

design actions at a higher level;
break tasks into verifiable subgoals;
build curricula that run from short horizons to long ones;
measure not only "can the model solve the task," but "how many dependent steps does it have to take."

For anyone building agent systems — from web automation to developer tooling — this is a very practical lesson. Sometimes the way to a stronger agent runs not through a bigger brain but through a shorter path.

AI paper breakdowns

Every day we read the new AI papers and retell what matters in plain language — no hype, no filler. If you want to see where AI agents are heading before everyone else, subscribe.

New breakdowns every day

On Telegram