KAT-Coder-V2.5: Infrastructure Beats Scale for Agentic Coding

11 min read✓ Done
KAT-Coder-V2.5: Infrastructure Beats Scale for Agentic Coding

KAT-Coder-V2.5: Infrastructure Beats Scale for Agentic Coding

Primary sources: KAT-Coder-V2.5 Technical Report (arXiv:2607.05471) · KAT-Coder-V2.5-Dev on Hugging Face · StreamLake product page

KwaiKAT’s new coding agent is easy to misread as “another leaderboard post.” It is not. The technical report argues that the bottleneck for repository-level agents is not model scale—it is reproducible environments, verifiable rewards, and high-value trajectories. Build those carefully, then do RL that does not collapse under long-horizon tool noise, and you get something that sits next to frontier closed models on software engineering and tool use.

Two artifacts matter:

  1. KAT-Coder-V2.5 — the full post-trained agent system described in the paper and productized via StreamLake.
  2. KAT-Coder-V2.5-Dev — the open-weight language-model release: a 35B MoE with ~3B activated parameters, post-trained from Qwen3.6-35B-A3B, text-only (no vision tower in the public checkpoint).

Figures below are from the report (screenshots taken for this note) and from the Hugging Face model card. Numbers are as reported by KwaiKAT under their evaluation protocols; treat them as source claims until independently reproduced.

The headline numbers: close to Opus 4.8, ahead of everyone else named

Under a unified Claude Code harness (paper §6), KAT-Coder-V2.5 is evaluated against GLM-5.1, GLM-5.2, Kimi-K2.6, and Opus 4.8.

KAT-Coder-V2.5 vs GLM-5.x, Kimi K2.6, and Opus 4.8 across six coding and agent benchmarks.

Figure from the technical report: KAT-Coder-V2.5 (green) vs peer frontier models. Opus 4.8 is the orange star bars.

Reported Table 4 scores (highest bolded in the paper; second underlined):

BenchmarkKAT-Coder-V2.5GLM-5.1GLM-5.2Kimi-K2.6Opus 4.8
SWE-Bench Pro65.2 (2nd)58.462.158.669.2
KAT Code Bench53.1 (2nd)49.650.348.957.3
PinchBench (avg)94.9 (1st)87.080.793.5
KAT Claw Bench85.584.486.885.290.7
Terminal-Bench 2.160.761.877.973.084.6
SciCode50.343.850.553.553.5

What that profile says, in plain language:

  • On repository-level software engineering (SWE-Bench Pro, KAT Code Bench), KAT is second only to Opus 4.8 and clearly ahead of GLM-5.x and Kimi-K2.6.
  • On PinchBench (long-horizon agentic tool use / Claw-style work), KAT beats Opus 4.8 (94.9 vs 93.5) and crushes the other named peers.
  • On KAT Claw Bench, it stays in the pack with the strong open/proprietary peers; Opus still leads.
  • On broader terminal / scientific coding, general frontier models keep an edge—especially Terminal-Bench—while SciCode is roughly on par with GLM-5.2 and a few points behind the top.

So the honest summary is not “beats Opus everywhere.” It is near-frontier on real SWE, best-in-class on PinchBench among the models they name, and ahead of the other open/closed peers on the coding agent suite that matters most for “fix the repo.” That is a serious result for a coding-specialized system.

How they did it: systems first, parameters second

The abstract’s thesis is the whole report: capability is bottlenecked less by scale than by scarce executable environments, verifiable rewards, and high-value trajectories. The post-training stack is an end-to-end answer to that.

1. Environment Scaling Engine + Data Scaling Flywheel (SWE)

Environment Scaling Engine and Data Scaling Flywheel for agentic software-engineering data.

Paper Figure 2: how real repositories become verifiable tasks and high-quality trajectories.

Environment side (AutoBuilder):

  • Mine tasks from real PRs/commits: golden code patch + test patch, then regenerate a self-contained task description (problem statement, requirements, interface constraints) instead of training on noisy raw issue text.
  • Clarity check drops ambiguous, incomplete, underspecified, or inconsistent specs.
  • AutoBuilder reconstructs multilingual sandboxed environments: build agent writes config scripts, verification agent runs them, and acceptance requires >90% of expected tests collected with reproducible pass/fail—not “exit code 0 and hope.”
  • Environment construction success rate is reported to climb from 16.5% → 57.2%, producing 100K+ environments across 12 languages.
  • Git history and other exploitable traces are stripped so the agent cannot cheat by reading the answer out of metadata.

Data side (flywheel):

  • Split rollouts into failed / near-miss / passing.
  • Hint-boosted recovery: process-level hints (what to inspect, not the solution) lift near-miss pass rates (~0% → ~20% on previously zero-pass tasks), then hint-free replay regenerates clean trajectories so training data does not leak scaffold.
  • Process filtering scores exploration, localization, fidelity, minimality, verification, honesty—so “passed by hardcoding” is not treated as good supervision.
  • Harness robustness: randomize tool interfaces and inject realistic mess (missing deps, truncated logs, noisy failures) so the policy generalizes across harnesses.

This is the part that matches Oxygen AI instincts: verification and memory of process, not fluent one-shot codegen.

2. KwaiClawEnv: general agentic tool use at scale

KwaiClawEnv Service / Task / Eval layers with closed feedback loop.

Paper Figure 3: Service layer builds executable capabilities; Task layer rolls out diverse tool chains; Eval layer multi-stage filters into high-quality data.

For non-repo tool work (Claw-style agents), KwaiClawEnv is a three-layer closed loop:

  • Service layer — human skills + LLM-synthesized services → connectivity, task generation feasibility, validated services only.
  • Task layer — real-task seeds expanded with controllable difficulty, tool-chain length, tool source → parallel rollout → interaction trajectories (avg ~15 tool calls; longest >100 steps).
  • Eval layer — hard rules → LLM-as-judge → additional cleaning → high-quality data, with feedback into earlier layers.

The point is transfer: not one brittle sandbox, but a factory for heterogeneous tools and long-horizon trajectories.

3. Agentic RL: any harness in, reliable reward out

Agentic RL training system: Rollout Engine, Train Engine, Gateway Server, sandboxes, experience buffer.

Paper Figure 4: harness-agnostic training. Claude Code, Codex CLI, OpenHands, mini-swe-agent, SWE-agent all plug in through Kwai Env.

Key design choices from the report:

  • Harness scaling during RL: white-box (mini-swe-agent) for clean task-solving signal + black-box production harnesses (Claude Code, Codex, OpenHands, …) so the model does not overfit one tool protocol, context layout, or control flow.
  • Gateway Server mediates all traffic: enforces token-in / token-out consistency (TITO) by talking to the inference backend’s /generate path instead of re-chat-templating—retokenization drift was ~40% of long-horizon samples when they used a chat endpoint.
  • Sandbox hardening: early training saw ~16% of trajectories polluted by sandbox/infra failures mistaken for model failure. After stability + correctness work, feedback error rate fell below 2%, collapses rare. Disk/image GC alone cut timeout-invalid rollouts from ~6–7% to below 1%.
  • Asymmetric actor–critic PPO with hindsight-augmented critic: actor sees only rollout history; critic at train time sees privileged signals (final pass/fail, unit-test distribution, patch-level info). Standard clipped PPO + GAE for turn-level credit.
  • Harness-oriented rewards: core task score (fail-to-pass and pass-to-pass), behavior penalties (repetition, bad tool placement, excessive parallelism, …), and failed-trajectory incentives (file search accuracy, partial unit-test progress) so near-misses still teach.
  • Multi-Teacher On-Policy Distillation (MOPD): five domain experts (SWE, general agent, terminal, web coding, general knowledge) fused in function space on student on-policy trajectories, with off-policy cold start + drift-aware truncation to stop long-context distillation collapse.

Clipped PPO objective as written in the technical report.

Paper §4.3.1: standard clipped PPO—the backbone under the asymmetric critic and harness rewards.

Open weights: KAT-Coder-V2.5-Dev

The community release is Kwaipilot/KAT-Coder-V2.5-Dev: post-trained Qwen3.6-35B-A3B recipe (SFT on 127K examples, then RL), 35B total / 3B active, Transformers / vLLM / SGLang / KTransformers compatible, text-only (use --language-model-only on vLLM).

KwaiKAT’s in-house same-scale peer table (public checkpoints, vLLM/SGLang, unified pipeline—not official peer numbers pasted in) puts Dev on top of the agentic coding column:

Coding AgentKAT-Coder-V2.5-DevQwen3.5-27BQwen3.6-35B-A3BGemma4-31BQwen3.5-35B-A3BOrnith-1.0-35BGemma4-26B-A4BQwen3-Coder-30B
SWE-bench Verified69.4068.6064.4060.6058.6055.8035.8031.80
SWE-bench Multilingual63.0057.6757.0049.3347.6751.6727.3320.67
SWE-bench Pro45.9642.1340.6332.9738.0334.479.5819.84
Terminal-Bench 2.141.0234.8432.0232.5926.1235.9820.9413.50
PinchBench93.4390.7192.2185.5388.7591.6282.0172.3
Scicode44.2025.5837.5333.1927.7330.3430.8418.27
KAT-Code-Bench46.2144.8342.7637.9335.8633.1022.0615.17

KAT-Coder-V2.5-Dev in-house peer benchmarks from the Hugging Face model card.

Model-card figure: Dev leads the same-scale open peer set under KwaiKAT’s unified evaluation. See the card for harness versions and the Qwen/Gemma anomaly notes.

They also report RL cleaned up pathological behavior: abnormal tool labels 9.34% → 0.28%, single-turn continuous repetition 0.34% → 0%. That matches the paper’s story that reward design (especially penalties for parallel tool spam and empty/failed calls) is what kept RL stable for ~10 epochs on the Qwen3.6 base after binary 0–1 rewards collapsed training early.

Caveats they document (and you should keep):

  • Some peer gaps vs official Qwen numbers may be harness/version/test-set differences (~10 pp on SWE in their note)—not automatic proof the peer models are weak.
  • Tool preference mismatches (e.g. hallucinated MultiEdit) hurt some models under this harness; that is environment coupling, not pure “intelligence.”
  • Dev is not the same artifact as the productized V2.5 evaluated against Opus in Table 4. Compare within each table, not across tables as if they were one leaderboard.

Why this matters

Most “coding model” releases still optimize for single-turn fluency. KAT-Coder’s paper is about the quiet infrastructure under agency:

  • Executable truth — fail-to-pass and pass-to-pass tests as the core reward, not vibes.
  • Process memory — near-miss recovery and process scores so trajectories teach more than a binary final bit.
  • Harness invariance — train across protocols so the agent is not a Claude Code cosplayer that dies in another shell.
  • Open path — a 3B-active MoE that claims SOTA among similar scales on agentic coding is the diffusion story: serious capability that can leave the closed API perimeter.

That is the Quiet Layer angle. Frontier Opus still leads several coding columns—and that should be said clearly. But a specialized post-training stack that closes most of the gap on SWE-Bench Pro, wins PinchBench, and ships an open Dev checkpoint that beats the open peers they list is exactly the kind of progress that makes local and plural agent stacks more real.

What I am watching next

  • Independent reproduction of Table 4 under a fixed public harness (Claude Code version pinned, same toolset).
  • How well V2.5-Dev holds up when you own the sandbox—Mac/home-lab constraints vs 8× GPU 256k serving recipes.
  • Whether process-aware trajectory factories (AutoBuilder-style) become standard open infrastructure, not lab-only.
  • Cross-harness generalization: the paper’s white-box / black-box split is the right experiment; more public ablations would help.

Bottom line: KwaiKAT is not claiming to have dethroned Opus 4.8 as a general frontier model. They are showing that environment construction + trajectory quality + harness-aware RL can put a coding agent within a few points of Opus on repository SWE, ahead of Opus on PinchBench, and clearly ahead of the other models they put on the chart—and that a smaller open MoE can lead its scale class when trained the same way. Infrastructure first. That is the interesting half of agentic coding.