Marathoner: Ultra-Long-Horizon Autonomous Intelligence

Zhang Ruiyang, Ou Jinpeng, Xie Yifan, Zhou Jingang, Pan Lirui, Guo Qingpei, Zheng Zhedong

University of Macau · Peking University · Ant Group

Published September 28, 2026 · on the feed September 30, 2026 · ▲ 37 · arXiv 2609.34378

Agents No code arXiv ↗Hugging Face ↗

The abstract

Humans naturally possess the ability to work persistently toward long-term goals. Given a challenging task, humans can continuously work for months or even years to accomplish a specific objective. In this paper, we propose Marathoner, an autonomous agentic model possessing the ability of ultra-long-horizon execution. Specifically, we propose a comprehensive post-training pipeline to instill this critical capability into base model. For Ultra-Long-Horizon Task Synthesis, we leverage major release PRs containing 1000+ lines of new code from diverse GitHub repositories as the primary source for synthesizing challenging task-level data. Additionally, we introduce Multi-Task Chaining, which chains multiple generated tasks into a single more challenging task, enabling the synthesis of tasks with frontier-level difficulty. For rejection sampling finetuning, we combine strong teacher model with diverse harnesses to generate trajectories on our synthesized tasks and conduct supervised finetuning on base model with rejection sampled trajectories. For reinforcement learning, cold-started model performs real-world execution through harnesses in independent sandboxes during rollout process, effectively facilitating the acquisition of genuine ultra-long-horizon execution capability. We further propose a novel reward strategy, Later Stage Bonus Reward, which explicitly encourages model to perform meaningful maneuvers during later stages of execution. Through extensive evaluation on 5 benchmarks containing ultra-long-horizon tasks, Marathoner achieves consistent and substantial performance improvements over base model and even surpasses performance of strong proprietary model. Further analysis shows that Marathoner can consistently work for 10+ hours and conduct 1000+ tool calls on highly challenging tasks.

The Brief

2:56

A short podcast summary of the paper. Written and voiced by AI.

Transcript

Marathoner. Ultra-Long-Horizon Autonomous Intelligence. By Zhang Ruiyang and six others, from the University of Macau, Peking University, and one other institution. Published on the twenty-eighth of September. No code repository is linked to it.

People can work persistently toward a long-term goal. Given a hard task, a person may keep at it for months or even years until a specific objective is met. Marathoner sets out to give an autonomous agentic model a version of that: the ability to execute over an ultra-long horizon. The capability has to be instilled into a base model, and that requires tasks hard and long enough to train on.

The authors' answer is a comprehensive post-training pipeline. It has three stages: synthesizing ultra-long-horizon tasks, rejection sampling fine-tuning, and reinforcement learning. A new reward strategy is added on top. Each stage feeds the next. The synthesized tasks are what the teacher's trajectories are generated on, and the model fine-tuned on those trajectories is the starting point for reinforcement learning.

Task synthesis draws on major release pull requests from diverse GitHub repositories, specifically ones that add more than a thousand lines of new code. These are the main source of challenging task-level data. On top of that, Multi-Task Chaining strings several generated tasks together into a single, more challenging one, which lets the synthesis reach difficulty at the frontier level.

For rejection sampling fine-tuning, a strong teacher model is combined with diverse harnesses to generate trajectories on the synthesized tasks. The base model is then fine-tuned on the trajectories that survive rejection sampling. Only the runs that pass the filter become training examples, so the base model learns from the teacher's successful attempts rather than from all of them.

Reinforcement learning starts from that cold-started model. During rollouts, it performs real-world execution through harnesses, each run in its own independent sandbox, which the authors credit with building genuine ultra-long-horizon execution capability. The reward includes a new strategy, Later Stage Bonus Reward, which explicitly encourages the model to make meaningful maneuvers during the later stages of execution.

Evaluation spans five benchmarks containing ultra-long-horizon tasks. Across them, Marathoner achieves consistent and substantial improvements over its base model, and even surpasses a strong proprietary model. Further analysis shows that it can work consistently for more than ten hours, and make more than a thousand tool calls, on highly challenging tasks. Those two figures are the point of the exercise: a session measured in hours, and an agent that is still acting at the end of it.

The name fits the design. Training data comes from pull requests of a thousand lines and more. Tasks are chained into longer ones. Rollouts are executed for real in sandboxes. And the reward pays specifically for meaningful work late in a run. Each piece pushes on endurance, on what the model is still doing hours in, rather than on any single step.

Paper Quest · 7 chapters · about 40 min

Play this paper

Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.

Chapter 1 🧩 · The problem

Some goals take hours. Your agent quits after minutes. Start there.

You want an open coding agent that keeps going for hours: planning, calling tools, fixing what breaks. People do this for months on one goal. Your base model gives up long before that.

The road ahead

  1. 1 · The problem ~7 min Open coding agents stop long before a person would, because training never shows them hours-long work or rewards useful work late in a run.
  2. 2 · What came before ~3 min
  3. 3 · The key idea ~8 min Build long, hard tasks from big code releases, fine-tune on a teacher's successful runs, then use sandboxed reinforcement learning with a late-stage bonus.
  4. 4 · Choose your own research ~3 min
  5. 5 · Build the method ~8 min Mine release PRs, chain tasks, generate teacher runs with many harnesses, fine-tune on passing runs, then run reinforcement learning in sandboxes.
  6. 6 · The experiment ~6 min You’ll guess: On highly challenging tasks, how many hours could Marathoner consistently keep working?
  7. 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Join free to play the whole quest ›

Free, with Google or an email address. Your stars and progress are kept.

KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.