Papers
Topics
Authors
Recent
Search
2000 character limit reached

Composer 2: Agentic Coding Model

Updated 5 July 2026
  • Composer is a family of domain-specialized coding agents defined by its innovative use of Mixture-of-Experts and reinforcement learning for agentic software engineering.
  • The model employs a transformer-based MoE architecture with self-summarization and multi-token prediction to enhance long-term planning and multi-step reasoning.
  • Composer 2 achieves superior performance on real-world coding benchmarks by tightly integrating environment fidelity, interactive tool use, and efficient deployment methodologies.

Composer, in the software-engineering literature, denotes a family of domain-specialized coding agents culminating in Composer 2, a 1.04 trillion–parameter, Mixture-of-Experts (MoE)–based coding agent specialized for “agentic” software engineering. Composer 2 is described as a frontier-level coding model developed to improve long-term planning, multi-step reasoning, and high-fidelity interaction with real codebases while remaining efficient for interactive use. Its training recipe combines continued pretraining with large-scale reinforcement learning in the same Cursor harness used at deployment, and its evaluation emphasizes both internal real-world software tasks and public coding benchmarks (Research et al., 25 Mar 2026).

1. Scope, lineage, and problem setting

Composer 2 builds on Composer 1 and Composer 1.5. The report identifies two primary challenges motivating the system: agentic long-horizon coherence, defined as the ability to chain many tool calls without drifting off task, and real-world software engineering complexity, including ambiguous prompts, large diffs, production logs, and developer-style code quality (Research et al., 25 Mar 2026).

The family is positioned as a specialized alternative to general-purpose LLMs for coding. In this framing, specialization is not limited to code pretraining; it also includes the structure of the environment, the tool interface, the reinforcement-learning objective, and the benchmark design. This suggests that Composer is intended as a full-stack training and deployment methodology for coding agents rather than merely a base model fine-tuned on code.

A recurrent theme in the report is the distinction between interactive coding and long-horizon software work. Composer 2 is described as maintaining the ability to efficiently solve problems for interactive use while also demonstrating substantially stronger long-term planning and multi-step reasoning. The emphasis on “agentic” software engineering therefore refers not only to code generation, but to sustained execution across reading, editing, testing, debugging, and search operations inside a realistic development environment (Research et al., 25 Mar 2026).

2. Architecture and agentic capabilities

At its core, Composer 2 extends a transformer-based MoE architecture, specifically Kimi K2.5, with several components targeted at long-horizon coding. The report lists Mixture-of-Experts transformer layers with Context Parallelism (CP) and Expert Parallelism (EP), Multi-Token Prediction (MTP) layers for speculative decoding, latent attention supporting up to a 256 kB context window, and self-summarization modules that generate concise “memory” summaries to carry state across very long rollouts (Research et al., 25 Mar 2026).

These components are tied to three operational capabilities. First, long-term planning is implemented by chaining multiple “thought” and “tool-call” phases, each summarized for subsequent steps. Second, multi-step reasoning is improved by sampling best-of-KK trajectories under a policy πθ(aisi1)\pi_\theta(a_i \mid s_{i-1}) and refining them via reinforcement learning. Third, interactive coding is mediated by a tool interface embedded in the language-model prompt, including read/write files, run shell, semantic search, and web search (Research et al., 25 Mar 2026).

The architectural emphasis is therefore not solely on raw parameter count or context length. The report places equal weight on mechanisms that preserve state across rollouts and on the integration of external actions into the prompting and training loop. A plausible implication is that Composer’s design treats long-horizon coding as a sequential decision process with memory compression rather than as a single-pass text-generation problem.

3. Two-phase training regime

Composer 2 is trained in two phases. The first phase is continued pretraining on a code-dominated corpus combining public repositories, internal monorepo snapshots, and curated coding tasks. The primary objective is standard next-token cross-entropy,

LCE(θ)=t=1Tlogpθ(xtx<t).\mathcal{L}_{\mathrm{CE}}(\theta) = -\sum_{t=1}^{T} \log p_\theta(x_t \mid x_{<t})\,.

The schedule proceeds through a 32 kB sequence length for bulk compute, a 256 kB extension for long-context, and a short supervised fine-tuning stage on targeted code tasks. MTP is trained with self-distillation to match the main-head logits. The reported impact is that cross-entropy loss on an internal codebase decreases log-linearly, and improved FreshBench and LoCoDiff correlate with higher downstream RL rewards (Research et al., 25 Mar 2026).

The second phase is large-scale reinforcement learning. The report states that Composer 2 maximizes expected reward under an on-policy group-PG objective:

J(θ)=Eτπθ[R(τ)]λKL(πθπold).J(\theta) = \mathbb{E}_{\tau \sim \pi_\theta}[R(\tau)] - \lambda\,\mathrm{KL}\bigl(\pi_\theta \,\|\, \pi_{\mathrm{old}}\bigr)\,.

Here each rollout is τ=(a1,y1,,aT,yT)\tau=(a_1,y_1,\dots,a_T,y_T) with total reward R(τ)R(\tau). The environment for each problem is launched in the exact Cursor harness, using Anyrun Firecracker VMs and the same RPC tool library comprising file I/O, shell, grep/semantic-search, and browser proxy. Intermediate chain summaries are treated as part of the rollout, and good summaries receive high reward. The system also uses auxiliary rewards for code style and communication, plus a concave, increasing length cost

Clength(x)=(1+kx)1q1k(1q),C_{\mathrm{length}}(x)=\frac{(1+kx)^{1-q}-1}{k(1-q)}\,,

which discourages unnecessary tool calls on easy tasks while tolerating longer deliberations on hard tasks (Research et al., 25 Mar 2026).

The training scheme explicitly connects latent coding ability, factual code knowledge, state tracking, rollout quality, and end-to-end coding accuracy. The report’s ablations further state that masking “overlong” rollouts was tested with no benefit, so Composer 2 omits rollout length masking, and that group-size and advantage-variance experiments confirm improvements in both average and best-of-KK performance with no trade-off observed (Research et al., 25 Mar 2026).

4. Environment fidelity and systems infrastructure

A central claim of the Composer 2 report is that training occurs in the same environment as deployment. The Cursor harness is described as identical to production, with pods scheduled at more than 500 pods/s, Anygress-controlled egress, and fork/snapshot support for mid-trajectory checkpointing. This environment-level identity is presented as a way to close the train–deploy gap and to obtain faithfully measured performance (Research et al., 25 Mar 2026).

The training stack is an asynchronous Ray+PyTorch job spanning 3 GPU regions and 4 CPU regions. The Ray object store holds rollout futures, and a fault-tolerant slot-based reconciler manages execution. For inference, the Fireworks AI engine runs the model, while expert indices are returned and replayed in the training forward pass to eliminate MoE routing mismatch. Weight deltas are hot-loaded via S3 (Research et al., 25 Mar 2026).

This infrastructure is not ancillary to the modeling claims. The report treats asynchronous MoE RL, router replay, and the use of equivalent tools and structure between training and production as technical innovations in their own right. In that sense, Composer 2 is partly a systems paper: it argues that realistic agent training for software engineering depends on reproducing the deployed toolchain, scheduling constraints, and inference behavior inside the learning loop.

5. Benchmarks and empirical performance

To measure increasingly difficult tasks, the report introduces CursorBench, an internal suite derived from real developer tasks in large codebases including the authors’ own. CursorBench is characterized by underspecified prompts with median 390 chars versus 1 185–3 055, and large diffs with median 181 lines changed versus 7–10. Public evaluations are run in the same harness and include SWE-bench Multilingual and Terminal-Bench (Research et al., 25 Mar 2026).

Model CursorBench SWE-bench Multilingual Terminal-Bench
Composer 2 61.3 73.7 61.7
Composer 1.5 44.2 65.9 47.9
Composer 1 38.0 56.9 40.0
Kimi K2.5 (base) 36.0 65.1 47.3

On these evaluations, Composer 2 yields a 37% relative gain over Composer 1.5 on CursorBench. The abstract also states that on public benchmarks the model scores 61.7 on Terminal-Bench and 73.7 on SWE-bench Multilingual in the authors’ harness, comparable to state-of-the-art systems, while the report describes the model as occupying a superior cost–accuracy Pareto frontier and as competitive with GPT-5.4 and leading frontier models (Research et al., 25 Mar 2026).

These results are significant chiefly because the report emphasizes evaluation in a consistent harness. The same infrastructure is used for internal and public benchmarks, and online evaluations run on a pinned production backend. This suggests that the reported numbers are meant to reflect not only raw model capability but also agent performance under deployment-matched tooling and execution constraints.

6. Technical contributions, limitations, and broader implications

The report organizes Composer 2’s main contributions into four areas: environment fidelity, self-summarization, asynchronous MoE RL, and behavioral reward engineering. Environment fidelity refers to training in the exact production harness. Self-summarization is presented as a mechanism for effective use of very long-context tasks without blowing up attention cost. Asynchronous MoE RL combines Context Parallelism for 256 kB context, router replay for MoE consistency, and the k1=logrk_1=-\log r KL estimator for stability. Behavioral reward engineering combines nonlinear length penalties and style rewards to produce efficient, developer-friendly agent behaviors (Research et al., 25 Mar 2026).

The limitations and next steps are stated directly. Under horizon, the report calls for extending support beyond current rollouts to tasks that span hours of human time. Under size, it proposes exploring larger active-parameter MoE models for further gains. Under algorithms, it identifies the need to improve RL signal for ultra-long outputs and to reduce residual coherence failures (Research et al., 25 Mar 2026).

The report also advances a generalization claim: the same recipe—domain-matched continued pretraining, high-fidelity environment RL, self-summarization, and behavior rewards—can be applied to other agentic domains such as data analysis, scientific experimentation, or multi-agent coordination where long-horizon planning and interactive tool use are crucial. This is explicitly presented as future-facing rather than empirically established within the paper. Still, it indicates that Composer 2 is intended as an instance of a broader design pattern for domain-specialized agentic models rather than as an isolated coding benchmark result (Research et al., 25 Mar 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to COMPOSER.