@Potatoloogs: Cursor trains Composer 2: Pre-training lets the model "learn knowledge", RL lets the model know "who it is" a) Why Cursor trains its own models Think of a model like a hard drive—it can only store a limited amount of information. Cursor cares about only one thing: software engineering, and only inside Cursor...

X AI KOLs Timeline Models

Summary

Detailed walkthrough of Cursor's approach to training Composer 2: using Kimi 2.5 as the base, learning code knowledge through large-scale intermediate training, then large-scale RL to teach the model to write correct code in real environments, and using self-summarization to handle long contexts.

Cursor trains Composer 2: Pre-training lets the model "learn knowledge", RL lets the model know "who it is" a) Why Cursor trains its own models Think of a model like a hard drive—it can only store a limited amount of information. Cursor cares about only one thing: software engineering, and only inside Cursor. By dedicating all the weights to this single task, the result is: better performance and orders of magnitude lower inference cost (Composer is an order of magnitude cheaper than models like Opus). Another ceiling: prompt engineering has its limits. To truly influence model behavior, you need fine-tuning to bake the behavior into the weights. b) Composer 2 training plan: two axes in parallel Base model: Kimi 2.5 (1 trillion parameter MoE, 30B activated parameters). Two steps: large-scale intermediate training (code tokens, close to pre-training scale) → large-scale RL. Essential difference between intermediate training and RL: Intermediate training teaches the model "what code looks like" (next token prediction); RL teaches the model "to write correct code": the model acts directly in the Cursor harness, learning to call tools, navigate the environment, and distinguish between "writing code" and "writing correct code." c) The essence of RL: telling the model "who you are" After pre-training, the model has absorbed the full spectrum of human knowledge. Faced with a math problem, it doesn't know "what kind of person it is": an expert, or a student still learning? RL's role is to adjust this knob: you are an expert, you must get it right. SFT = knowledge transfer; RL = behavior sharpening. Thus the scope of RL goes far beyond "tasks with verifiable rewards": even for summaries or style, you can use LLM-as-judge with a clear rubric to guide RL. d) The core challenge of RL infrastructure: the environment must be as close to real production as possible The most powerful RL environment is your own product, because that's where the model will actually work. A counterintuitive finding: models can sense they are in a fake environment and adopt different behaviors during RL training (they "cheat," learning tricks to score high in the fake environment). To solve this, Cursor built a full virtual machine stack that can be rapidly spawned in bulk (requiring the ability to "give me 100,000 VMs right now"). e) Key breakthrough for long-horizon agents: training "self-summarization" into the RL loop Two challenges of long-horizon RL: i. Credit assignment becomes harder (the longer the chain, the harder to tell which step was right/wrong); ii. Limited context window. Cursor's solution: put "self-summarization" directly into the RL training loop. The model jointly learns: generating good summaries + following those summaries to continue the task. Result: although the model has a nominal 200K context window, it can actually handle millions of tokens because it learns to summarize and restart the context when nearly full, while continuing the task.
Original Article
View Cached Full Text

Cached at: 06/05/26, 11:13 AM

Cursor Training Composer 2: Pre-training lets the model “learn knowledge”, RL lets the model know “who it is”

a) Why Cursor trains its own model

Think of a model as a storage hard drive — it has limited capacity for information.

Cursor only cares about one thing: software engineering, and only within Cursor. By dedicating all weights to this single task, the result is: better performance and orders of magnitude lower inference cost (Composer is an order of magnitude cheaper than Opus and similar models).

Another ceiling: prompt engineering has a limit. To truly influence model behavior, you need fine-tuning to bake the behavior directly into the weights.

b) Composer 2 training approach: two axes in parallel

Base: Kimi 2.5 (1 trillion parameter MoE, 30B activated parameters).

Two steps: large-scale intermediate training (code tokens, close to pre-training scale) → large-scale RL.

Essential difference between intermediate training vs RL:

Intermediate training teaches the model “what code looks like” (next token prediction);

RL teaches the model “to write correct code”: the model takes direct actions within the Cursor harness, learning to use tools, navigate the environment, and distinguishing between “writing code” and “writing correct code”.

c) The essence of RL: telling the model “who you are”

After pre-training, the model has absorbed the full scope of human knowledge. When faced with a math problem, it doesn’t know “what kind of person” it is: an expert, or a student still learning?

RL’s role is to turn this dial: You are an expert, you must get things right.

SFT = knowledge transfer; RL = sharpening behavior.

Therefore, RL’s applicability goes far beyond “tasks with verifiable rewards”: even for summarization or style, you can use LLM as judge with clear rubrics to guide RL.

d) Core challenge of RL infrastructure: the environment must be as close to real production as possible

The most powerful RL environment is your own product, because that’s where the model will actually work.

A counterintuitive finding: the model can sense it’s in a fake environment and will adopt different behavior during RL training (it will “cheat”, learning tricks to get high scores in the simulated environment).

To solve this, Cursor built a complete virtual machine stack that can be quickly provisioned at scale (with the burst capacity to “give me 100,000 VMs right now”).

e) Key breakthrough for long-horizon Agents: training “self-summarization” into the RL loop

Two difficulties in long-horizon RL: i. Credit assignment becomes increasingly hard (the longer the trajectory, the harder to determine which steps were right/wrong); ii. Limited context window.

Cursor’s solution: train “self-summarization” directly into the RL loop.

The model jointly learns: to generate good summaries + to continue the task by following those summaries.

Result: the model nominally has a 200K context window, but in practice can handle millions of tokens — because it learns to summarize and restart the context when nearing capacity, while still continuing to complete the task.

Similar Articles

Cursor Introduces Composer 2.5

Hacker News Top

Cursor released Composer 2.5, a major update to its AI coding assistant featuring improved intelligence, behavior, and training via targeted reinforcement learning and increased compute, built on Moonshot's Kimi K2.5.