← Latest papers
🤖 machine learning

Composer 2 Technical Report

Composer 2 is a frontier-level agentic software engineering model that achieves state-of-the-art performance on benchmarks like SWE-bench Multilingual and Terminal-Bench through a two-phase training process of continued pretraining and large-scale reinforcement learning within a real-world Cursor environment.

Original authors: Cursor Reseach, :, Aaron Chan, Ahmed Shalaby, Alexander Wettig, Aman Sanger, Andrew Zhai, Anurag Ajay, Ashvin Nair, Charlie Snell, Chen Lu, Chen Shen, Emily Jia, Federico Cassano, Hanpeng Liu, Haoyu
Published 2026-03-26
📖 5 min read🧠 Deep dive

Original authors: Cursor Reseach, :, Aaron Chan, Ahmed Shalaby, Alexander Wettig, Aman Sanger, Andrew Zhai, Anurag Ajay, Ashvin Nair, Charlie Snell, Chen Lu, Chen Shen, Emily Jia, Federico Cassano, Hanpeng Liu, Haoyu Chen, Henry Wildermuth, Jacob Jackson, Janet Li, Jediah Katz, Jiajun Yao, Joey Hejna, Josh Warner, Julius Vering, Kevin Frans, Lee Danilek, Less Wright, Lujing Cen, Luke Melas-Kyriazi, Michael Truell, Michiel de Jong, Naman Jain, Nate Schmidt, Nathan Wang, Niklas Muennighoff, Oleg Rybkin, Paul Loh, Phillip Kravtsov, Rishabh Yadav, Sahil Shah, Sam Kottler, Alexander M Rush, Shengtong Zhang, Shomil Jain, Sriram Sankar, Stefan Heule, Stuart H. Sul, Sualeh Asif, Victor Rong, Wanqi Zhu, William Lin, Yuchen Wu, Yuri Volkov, Yury Zemlyanskiy, Zack Holbrook, Zhiyuan Zhang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

🚀 The Big Picture: From "Smart Assistant" to "Junior Developer"

Imagine you have a coding assistant.

  • Old Assistants (Composer 1) were like a very knowledgeable intern. They could answer questions, fix a typo if you pointed it out, and write a small function if you gave them a very specific recipe. But if you asked them to build a whole feature from scratch, they'd get confused, forget what they did five minutes ago, or give up.
  • Composer 2 is like a promising junior developer. It doesn't just wait for instructions; it can look at a messy project, figure out what's broken, write a plan, fix the code, test it, and even handle the boring stuff like updating documentation. It can work for hours without getting tired or losing its place.

The paper explains how they built this "Junior Developer" and why it's so good at it.


🏗️ Phase 1: The "Boot Camp" (Continued Pretraining)

Before teaching the model to be an agent, they had to make sure it knew its stuff.

  • The Analogy: Imagine taking a brilliant university graduate (the base model, Kimi K2.5) who knows a little bit about everything, and sending them to a specialized coding boot camp.
  • What happened: They didn't just teach them syntax; they fed them millions of lines of real-world code, bug reports, and technical documentation.
  • The Result: The model went from "knowing what a loop is" to "knowing how to debug a complex loop in a massive, messy codebase." This step was crucial because you can't teach someone to be a detective if they don't know what a crime scene looks like.

🧠 Phase 2: The "Gym" (Reinforcement Learning)

This is the magic sauce. Once the model knew the basics, they put it in a gym to learn how to think and act.

  • The Analogy: Think of this as training a dog to fetch, but the dog has to solve a puzzle to get the treat.
  • How it works:
    1. The model is given a real-world problem (e.g., "Fix this bug that crashes the app").
    2. It tries to solve it. It might open files, run commands, make mistakes, and try again.
    3. The Reward System: If it fixes the bug, it gets a "treat" (a high score). If it breaks things or gets stuck in a loop, it gets a "time-out" (a penalty).
    4. The Twist: They didn't just give it easy puzzles. They gave it real, messy problems from their own company. They even added a rule: "Don't waste time on easy tasks, but think hard on the scary ones." This taught the model to be efficient (don't overthink a simple typo) but persistent (don't give up on a hard bug).

🎯 The "Real-World" Test (CursorBench)

Most AI papers test models on "textbook" problems (like solving a math puzzle from a competition). The authors realized this is fake. Real coding is messy, vague, and huge.

  • The Analogy: Testing a car on a perfectly paved racetrack (public benchmarks) vs. testing it in heavy traffic with potholes and construction (CursorBench).
  • The Problem: Public benchmarks are like a racetrack. The instructions are perfect, the road is clear, and the destination is obvious.
  • The Solution (CursorBench): They built a benchmark using actual bugs and tasks their own engineers faced.
    • The Prompt: Instead of "Write a function to sort this list," the prompt is a vague Slack message: "Hey, the app crashed when I clicked the button. Here are some logs. Fix it."
    • The Challenge: The model has to read the logs, guess what went wrong, find the file, fix it, and make sure it doesn't break anything else.
  • The Result: Composer 2 crushed this test. It proved that by training on real chaos, the model became much better at handling real chaos.

🛠️ The Engine Room (Infrastructure)

To train this giant brain, they needed a massive, custom-built engine.

  • The Analogy: Imagine trying to train a choir of 1,000 singers. If they all sing at once without a conductor, it's noise. If they sing one by one, it takes forever.
  • The Innovation: They built a system where:
    • The Singers (Inference): Thousands of computers generate solutions simultaneously.
    • The Conductor (Training): A central system watches the results, picks the best ones, and instantly updates the singers' "sheet music" (the model weights).
    • The Secret Sauce: They made sure the "singers" and the "conductor" were perfectly synchronized so no one got confused about which version of the song they were singing. They also built a system to snapshot the work. If a computer crashes halfway through a 10-hour task, they can restart exactly where they left off without losing the progress.

🏆 The Scoreboard (Results)

  • Performance: Composer 2 is now competitive with the most expensive, powerful AI models on the market (like GPT-5 or Opus), but it's cheaper to run.
  • Efficiency: It doesn't just get the right answer; it gets it faster and with less "thinking" (tokens) than the giants.
  • The Takeaway: You don't need the biggest, most expensive model to be the best coder. You need a model that has been specialized and trained on real-world problems.

💡 Summary in One Sentence

Composer 2 is a coding AI that was trained not just by reading books, but by actually doing the job in a simulated real-world office, learning to be efficient, persistent, and smart enough to handle the messy, vague problems that humans actually face every day.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →