A Million-Token Context Window Still Isn’t Enough: LongCat-2.5 Uses 6 Training Methods to Enable Agents to Complete Entire Projects

A Million-Token Context Window Still Isn’t Enough: LongCat-2.5 Uses 6 Training Methods to Enable Agents to Complete Entire Projects

Author’s note: This article explores why LongCat-2.5 doesn’t rely on its 1M context window alone, but instead strengthens an Agent’s ability to complete an entire project across six training directions. It also covers engineering practices developers can apply to their own work.

Most developers who’ve built AI Agents have seen this happen: a task fails halfway through, the Agent repeatedly tries the same incorrect command, and it eventually produces a summary that looks complete but leaves out several key deliverables. With LongCat-2.5, officially released by Meituan on 2026-11-02, the focus is on helping long-running Agents complete entire projects, rather than simply emphasizing a 1M context window.

This isn’t a spec-sheet promotional piece. Meituan’s engineering blog has disclosed the details of its long-horizon reinforcement learning approach, and a third party tested the release on long-running tasks on launch day. This article separates three types of evidence: the official training design, official benchmark results, and third-party hands-on experience. It also explains what each can—and can’t—prove.

What you’ll learn: Why a million-token context window doesn’t guarantee project completion, how LongCat-2.5 addresses long-horizon task capabilities, and how to apply those ideas to your own Agent engineering.

longcat-2-5-long-horizon-agent-training-explained-en-image-0


LongCat-2.5 at a Glance

LongCat-2.5 is a native multimodal Large Language Model released by Meituan’s LongCat team, designed for long-horizon agentic tasks. Building on LongCat-2.0, it incorporates more long-horizon task trajectories, with a focus on developing complex codebases and building complete projects.

Item Details
Release date Preview launched on 2026-09-25; official release on 2026-11-02
Released by Meituan LongCat team
Model size 1.6T total parameters, with sparse MoE activation of approximately 48B per token
Context window 1,048,576 tokens (approximately 1M), including input and output
Core focus Long-horizon agents, agentic coding, visual programming, multi-step tool calls
Availability Official website and API are available; public release of the final model weights has not been confirmed

As of 2026-11-03, APIYI had published an introduction to LongCat-2.5, noting that the model wasn’t yet available on the platform but was planned for future integration. Check the live model list at APIYI apiyi.com for models currently available for invocation. The code examples in this article use a generic OpenAI-compatible format and can be adapted to any integrated model.


Why a Million-Token Context Window Isn’t Enough for Long-Horizon Agent Tasks

Long context refers to the total number of tokens a single request can hold. A 1M context window means a model can read more source code, documents, and message history at once, which certainly helps it understand large repositories. But that number alone doesn’t mean the model will always retrieve information accurately from long documents, make successful tool calls throughout a task, or produce correct output files.

Long-horizon agents are a different matter. They require a model to carry out multiple interdependent steps in an external environment: read a repository, write code, call tools, run tests, find errors, fix them, verify the results, and finally deliver the work. If any step goes wrong, subsequent steps may build on an incorrect state.

Dimension Long-context capability Long-horizon agent capability
What it measures Capacity of a single request Reliability across multiple steps
How it’s measured How many tokens fit Whether the final task passes acceptance checks
Key dependencies Attention mechanisms and long-text training Planning, tool calls, use of error feedback, and knowing when to stop
Typical failure Missing information in a long document Losing sight of the goal, making repeated calls, or failing to deliver
Relationship to project success One necessary resource A more direct factor in success or failure

In other words, context determines “how big the workbench is,” while long-horizon capability determines “whether the job gets done.” No matter how large the workbench is, a project can still fail halfway through if the model can’t adjust its approach after a test failure or forgets the original constraints. That’s the fundamental reason LongCat-2.5 focuses its training on long-horizon tasks.

longcat-2-5-long-horizon-agent-training-explained-en-image-1


LongCat-2.5 Long-Horizon Agent Benchmark Improvements

Meituan has published a comparison of LongCat-2.5 and its predecessor across several long-horizon agent benchmarks. The figures below come from the official release. The improvement column shows score differences, not relative percentages.

Benchmark LongCat-2.0 LongCat-2.5 Improvement What it measures
Terminal Bench v2.1 70.8 88.4 +17.6 Completing real-world tasks in a terminal environment
Terminal Bench v4.0 3.0 38.5 +35.5 More difficult long-horizon terminal tasks
DeepSWE v1.1 9.7 64.6 +54.9 Long-horizon software engineering tasks
Program Bench Almost Resolved 2.5 25.5 +23.0 How close program-building tasks are to completion
NL2Repo 40.9 60.5 +19.6 Generating a repository from natural-language requirements
MCP Atlas 61.8 83.1 +21.3 Using multiple tools
JobBench 44.4 65.4 +21.0 Professional deliverables for job-related tasks

The gains are substantial, but there are a few caveats. DeepSWE jumped from 9.7 to 64.6, yet it’s still below GPT-5.6-Sol’s 72.7 in the official comparison. Terminal Bench v4.0’s 38.5 is slightly higher than GPT-5.6-Sol’s 37.3, but 15.4 points below Claude Opus 5’s 53.9. Difficult terminal tasks are far from solved.

Evaluation conditions matter, too. Terminal Bench uses Claude Code Harness, DeepSWE uses mini-swe-agent, and JobBench is scored using LLM-as-Judge. Each score is tied to its specific execution framework. In the official table, some competitor scores come from public reports, while others were tested by Meituan itself, so it shouldn’t be treated as an independent leaderboard with uniform conditions. The internal LongCat AppDev benchmark (47.7 → 73.7) also isn’t publicly reproducible.

longcat-2-5-long-horizon-agent-training-explained-en-image-2

📊 Comparison note: Benchmarks only reflect performance under specific frameworks. You’ll still need to validate models on your own tasks. You can use APIYI apiyi.com to compare multiple supported models with the same task scripts, then use the official scores to help guide your selection.


How LongCat-2.5 Trains Agents to Complete Entire Projects

The long-horizon training approach described in Meituan’s technical blog can be grouped into six areas. The key to understanding them is to see which real-world failure in a long task each one addresses.

LongCat-2.5’s Real-World Task Environments and F2P/P2P Validation

The training data comes from pull requests and related issues in public GitHub repositories, along with real coding tasks from within Meituan. The process involves selecting tasks, using agents to label them automatically, building code environments, and generating runnable tests. The model then attempts each task, and the actual execution results determine whether it solved the problem. Unlike simply feeding the model large amounts of code, this approach provides feedback on whether the solution actually works.

Validation uses two types of tests: F2P (Fail-to-Pass) checks whether tests that originally failed pass after the fix, while P2P (Pass-to-Pass) checks whether tests that originally passed still pass. The first guards against leaving the problem unsolved; the second guards against fixing one thing and breaking two others. Meituan also uses training trajectories and pass rates to check the tests themselves for false positives and false negatives. The results still depend on how thoroughly the test cases cover the requirements.

LongCat-2.5 Failure Trajectory Learning and Asynchronous Partial Rollout

The team behind LongCat-2.5 turns failure trajectories from real Agents into reproducible, verifiable tasks. These tasks help identify capability gaps and expand the training environments. It’s like keeping a notebook of mistakes instead of learning only from successful examples. The public documentation doesn’t specify how many failure trajectories were used or the correction rate for each error category.

Long tasks can vary greatly in duration, and one complex trajectory can slow down an entire training batch. Asynchronous Partial Rollout addresses this by sampling multiple tasks in parallel. Once a batch is full, unfinished trajectories are paused and saved for the next round. It also filters out sample groups where every attempt succeeds or every attempt fails, since they don’t provide a useful gradient.

The trade-off is that tokens in a single trajectory may come from models at different training stages. To control the resulting bias, the team clips logprob differences and adjusts each trajectory’s gradient contribution based on its accumulated historical differences. This technique improves training efficiency; it doesn’t imply a proportional speedup in task execution for users.

LongCat-2.5 Reward Hacking Prevention and Cross-Harness Training

Reward Hacking happens when a model exploits loopholes in the reward design to earn a high score without actually completing the task—for example, by peeking at the answer or bypassing tests. Meituan’s countermeasures include restricting network access in training environments, clearing Git history and file caches, using an LLM Judge to inspect trajectories, and penalizing repetitive thinking, repeated tool calls, and overthinking. These measures reduce risk, but they don’t mean the problem has been completely solved.

A Harness is the surrounding system that organizes how a model executes tasks, including tools, context management, and task-loop rules. LongCat-2.5 adds a small number of framework adaptation examples during cold start, then mixes frameworks such as Claude Code and Codex with different task types during RL. This reduces the risk of adapting to just one prompt template, but it can’t guarantee identical behavior across different versions of those tools.

Training method Real-world problem it addresses Known limitations
Real task environments Writing code without being able to run it successfully in the environment Depends on the quality of environment construction
F2P / P2P verification Appearing to complete a task while introducing regressions Limited by test coverage
Failure trajectory learning Repeated errors of the same kind Trajectory counts and correction rates haven’t been published
Asynchronous Partial Rollout Low training efficiency on long tasks Doesn’t mean faster inference
Reward Hacking prevention False success through exploiting loopholes Not claimed to be a complete solution
Cross-Harness mixed training Failing when switched to a different Agent framework Doesn’t guarantee consistency across versions

longcat-2-5-long-horizon-agent-training-explained-en-image-3


Third-Party Testing: Why LongCat-2.5 Sometimes Leaves Long Tasks Incomplete

Beyond the official training design and benchmarks, third-party testing offers another perspective. On November 2, 2026, TOKRACE integrated the release version of LongCat-2.5 into Claude Code and used it with tools including Blender and a browser to tackle 15 creative tasks.

One successful case was a parametric bookshelf: both the 0.8-meter, three-compartment version and the 1-meter, four-compartment version met the dimensional requirements, including 18mm board thickness. The model also delivered six views, taking about 36 minutes and 47 requests. Other tasks, however, exposed common failure modes in long-running work:

  • Structural and unit errors: A planetary gearbox required a 140mm dimension, but the generated project used 140m. The video wasn’t delivered either.
  • Partial delivery: For a Chinese temple courtyard, a 60-minute task produced only three final images, with some shots and the video missing.
  • Spatial relationship issues: A two-bedroom model had doors and windows without openings, and a bed overlapping a partition wall.
  • Interrupted long-running execution: A math explainer video wasn’t completed after repeated request timeouts.

These cases show that for long tasks, it’s not enough to check whether there’s some output—you need to verify every requirement. It’s also worth noting that the tests imposed request, time, or execution budget limits, so not every missing deliverable can be attributed to the model’s capabilities. Nor was this a rigorous comparative experiment across models.


Impact of LongCat-2.5’s Long-Horizon Training Approach

Impact on Agent Developers

  • Model selection criteria are changing: Context length is becoming less important when evaluating models. Long-horizon benchmarks and completion rates on real-world tasks deserve more attention.
  • Validation is still essential: Even if a model has undergone F2P/P2P training, you still need your own tests and acceptance criteria in production. Independent testing has already demonstrated this.
  • Harness design matters just as much: Scores are closely tied to the execution framework. Change the task loop, and the same model can produce very different results.

Impact on the Large Language Model Industry

  • Training is shifting toward the “process”: The focus is expanding from single-turn code generation to complete projects and multi-step engineering tasks. The ability to build reinforcement learning environments is becoming a new competitive differentiator.
  • Evaluation methods are under greater scrutiny: Terminal-Bench 2.1 fixed 28 of the 89 tasks in version 2.0. This shows that the test version itself can significantly affect results, and the industry needs more transparent reporting of evaluation conditions.

Designing Long-Horizon Agent Systems with Ideas from LongCat-2.5

LongCat-2.5’s training methods offer a straightforward lesson for application developers: if the model is trained on stage validation, failure recovery, and avoiding shortcuts, the Agent system should explicitly incorporate those mechanisms too. The recommendations below are derived from the publicly described training methods; they aren’t features the developers officially claim to have implemented.

Engineering mechanism Corresponding training concept Implementation
Stage validation F2P validation Run a check script after each subtask
Regression protection P2P validation Run the full regression test suite after every change
Failure logging Learning from failure trajectories Write errors to a progress file and feed them into the next iteration
Budget limits Penalties for repeated calls Limit the number of rounds, timeouts, and tool calls
Delivery acceptance Preventing reward hacking Check the actual files instead of relying on the model’s summary

Here’s a minimal example of an Agent loop with stage validation, showing progress tracking, failure feedback, and a budget limit:

import json, subprocess, openai

client = openai.OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.apiyi.com/v1"  # APIYI OpenAI-compatible API
)
MODEL = "gpt-4o-mini"  # Use a model ID that's actually available in the platform's model list
MAX_ROUNDS = 8         # Budget limit to prevent infinite loops

def run_check(cmd: str) -> tuple[bool, str]:
    r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=300)
    return r.returncode == 0, (r.stdout + r.stderr)[-2000:]

def run_stage(stage: dict, progress: dict) -> bool:
    failures = []
    for i in range(MAX_ROUNDS):
        prompt = (f"阶段目标:{stage['goal']}\n"
                  f"已完成阶段:{progress['done']}\n"
                  f"历史失败(请避免重复):{failures[-3:]}")
        resp = client.chat.completions.create(
            model=MODEL, messages=[{"role": "user", "content": prompt}])
        # Omitted here: parse the model output and write it to code files
        ok, log = run_check(stage["check"])          # Stage validation (F2P-like)
        reg_ok, reg_log = run_check("pytest -q")     # Regression testing (P2P-like)
        if ok and reg_ok:
            progress["done"].append(stage["name"])
            return True
        failures.append(log if not ok else reg_log)
    progress["blocked"] = stage["name"]
    return False

progress = {"done": [], "blocked": None}
stages = [{"name": "api", "goal": "实现用户接口", "check": "pytest tests/test_api.py -q"}]
for s in stages:
    if not run_stage(s, progress):
        break
json.dump(progress, open("progress.json", "w"), ensure_ascii=False)

The key to this structure is that each stage has an executable acceptance command, failure logs are fed back into the next prompt, and progress is written to a file rather than kept only in the context. Even with a sufficiently long context window, storing progress and constraints externally as structured state can significantly reduce the risk of drifting off course during a long task.

🚀 Quick-start tip: When building an Agent prototype, you can get test credits through APIYI at apiyi.com, then use the same API key to switch between models and run the stage validation loop above. See which model delivers the most complete results for your task.

If your project has high reliability requirements, you can also add “cross-validation”: have another model check the final deliverables against the requirements list item by item. With the unified API from APIYI at apiyi.com, you can call both the execution model and the validation model from the same codebase, making it easy to switch between them.


Frequently Asked Questions

Q1: Does LongCat-2.5’s 1M context window mean it can complete large projects?

Not necessarily. The 1M context window is the capacity of a single request, including both input and output. It lets the model read more code and documentation, but completing a project also depends on planning, tool calls, error correction, and delivery checks. Those are the areas LongCat-2.5 was specifically trained on using long-horizon reinforcement learning.

Q2: How does LongCat-2.5 compare with GPT-5.6-Sol and Claude Opus 5 on long-horizon tasks?

According to the official table, LongCat-2.5 scores slightly higher than GPT-5.6-Sol on BrowseComp (91.9) and Terminal Bench v4.0 (38.5). However, its DeepSWE score of 64.6 is lower than GPT-5.6-Sol’s 72.7, and its Terminal Bench v4.0 score is 15.4 points below Claude Opus 5’s. The tests use different frameworks, so they shouldn’t be treated as a single overall ranking.

Q3: When was the final version of LongCat-2.5 released? Are its weights open source?

The Preview version launched on the API platform on 2026-09-25, and the final version was released on 2026-11-02. The official website and API are available, but as of 2026-11-03, the final model weights hadn’t been confirmed as publicly available. The official team says they’ll be released on GitHub and Hugging Face later.

Q4: Can I access LongCat-2.5 through APIYI now?

According to the public announcement on 2026-11-02, LongCat-2.5 wasn’t yet available on APIYI, though integration was planned. Check the model list at APIYI apiyi.com for current availability. In the meantime, you can use models already available on the platform to build an Agent framework with stage validation and feedback from failures, then simply switch the model ID once LongCat-2.5 becomes available.

Q5: How can I test a model’s long-horizon Agent capabilities on a budget?

Prepare 3–5 multi-step tasks relevant to your business, each with an automated acceptance script. Record each model’s end-to-end completion rate, average number of turns, and failure types. With the OpenAI-compatible interface at APIYI apiyi.com, you can compare multiple models using one API key and the same scripts. New users also get free testing credits for initial validation.

Q6: What are the known limitations of LongCat-2.5’s long-horizon capabilities?

Third-party tests have reported incorrect measurement units, spatial relationship errors, undelivered videos, and interruptions caused by request timeouts. The official team hasn’t claimed that reward hacking has been fully resolved, and the number of failure trajectories and their correction rate haven’t been disclosed. Engineering dimensions, factual accuracy, and delivery completeness still need human verification.


LongCat-2.5 Long-Horizon Agent: Key Takeaways

  • Context ≠ completion: 1M tokens is a capacity figure, not a project success rate. Long-horizon capability requires separate training.
  • Training in real environments: Executable environments built from GitHub PRs, issues, and internal tasks provide feedback.
  • Two-way test validation: F2P checks whether the problem is fixed; P2P checks for regressions.
  • Learning from failure: Real agent failure traces are reconstructed into verifiable training tasks.
  • Results depend on conditions: Benchmarks are closely tied to their harnesses, and independent tests still show missed deliverables.
  • Engineering design matters too: Stage-by-stage validation, failure logging, budget limits, and delivery acceptance are all essential. You can use APIYI apiyi.com to compare and validate multiple models.

Summary

The biggest signal from the LongCat-2.5 release isn’t another million-token context window. It’s a shift in training focus from “how much can it read?” to “can it finish the whole project?”:

  1. A more accurate problem definition: Long-horizon agents tend to fail during execution, validation, and delivery—not because they lack context.
  2. Targeted training methods: Real task environments, F2P/P2P, failure traces, Partial Rollout, anti-gaming measures, and cross-harness training each address a different type of real-world failure.
  3. Clear evidence boundaries: Official results show substantial progress, but there’s still a gap with leading models. Independent tests also show that complete delivery still needs human oversight.

For developers, the more practical approach is to apply the same thinking to your own agent systems: evaluate models against executable acceptance criteria rather than relying solely on parameters and leaderboards. Try comparing models on real tasks through APIYI apiyi.com using a unified interface, then decide which combination to use in production.


📚 References

  1. Meituan Technology Team – LongCat-2.5 Technical Article: An in-depth look at long-horizon agent training methods
  2. Link: tech.meituan.com/2026/11/02/Meituan-LongCat-2.5.html
  3. Description: The original source for training designs such as F2P/P2P, Partial Rollout, and reward hacking prevention

  4. LongCat Official Blog: Benchmark results and evaluation methods

  5. Link: longcat.ai/blog/longcat-2.5
  6. Description: Complete evaluation tables, including the harness and parameter settings for each benchmark

  7. LongCat Model Parameters Documentation: Context and output parameters

  8. Link: longcat.ai/platform/docs/zh/api/model-params
  9. Description: Model invocation parameters, including context length, max_tokens, and thinking budget

  10. Terminal-Bench: A benchmark for terminal agents

  11. Link: tbench.ai
  12. Description: Learn how scores depend on the agent harness and how versions differ

  13. DeepSWE: A benchmark for long-horizon software engineering agents

  14. Link: deepswe.datacurve.ai
  15. Description: A test design covering 113 original tasks across 91 open-source repositories

  16. TOKRACE – LongCat-2.5 Hands-On Test Report: Third-party testing across 15 creative tasks

  17. Link: tokrace.com/zh-CN/guides/longcat-2-5-release
  18. Description: Real-world examples, including partially completed long tasks and unit errors

Author: APIYI Technical Team
Technical discussions: Visit the APIYI homepage at apiyi.com to contact us and discuss long-horizon agent engineering practices and multi-model selection.

Similar Posts