Paper, read
Your coding agent isn’t stuck because it’s dumb. It’s stuck because it’s alone.
Give a strong coding agent a hard GPU kernel, a $1,000 budget and several days. How close does it get to the kernel experts wrote?
On one of DeepSeek-V3’s attention kernels, Codex running GPT-5.5 at its highest reasoning setting reached 28% of expert performance. That is the opening result of Evolving Agent Teams, a paper from UC Berkeley’s Sky Computing Lab published on 27 October 2026.
The authors keep the model and the budget the same and add a supervisor agent. It watches a team of agents work, diagnoses why progress stopped, and redesigns the team.
Why agents plateau
The kernel in question is MLA paged decode. A DeepSeek-V3 server runs it for every token it writes.
A model writes its answer one token at a time, and each new token looks back at every token before it. To avoid recomputing, the model keeps a key and a value for each earlier token in a KV cache, which production servers store in fixed-size pages. DeepSeek’s Multi-head Latent Attention, MLA, squeezes each token’s key and value into one small vector to keep that cache small.
Decode is the work of writing the next token, and the kernel is the GPU program that does it. Two matrix multiplies sit at its centre: Q·K scores the cached tokens against the new one, and P·V mixes their values by those scores.
The expert kernel comes from FlashInfer, the open-source library production servers run. Matching it means keeping tensor cores and CUDA cores busy together, with registers that MLA’s wide heads nearly fill.
A fast one needs WGMMA, the tensor-core instructions on Nvidia’s Hopper GPUs for large matrix multiplies. With a wrong shared-memory layout, WGMMA returns wrong values without an error, and the agent has to find which layout is wrong.
Agents working alone tried WGMMA, failed the correctness tests a few times, and switched to WMMA. WMMA is an older, simpler tensor-core API. It is easier to make correct, and it uses less of the hardware. Then they spent the rest of the budget tuning it. Each tweak added a little speed. None of them replaced WMMA, which uses less of the tensor cores and so caps the kernel’s speed.
Claude Code with Opus 4.6 did the same and stopped at 0.44–0.51× of the production FlashInfer kernel. Two systems built only for kernel work, K-Search and CUDAForge, did it too. In two runs each, neither produced a WGMMA kernel.
A local optimum
A coding agent improves a kernel by local search. It makes an edit, compiles, runs the tests and times the result, and it builds on the edit if the kernel is correct and faster. Each move is judged by the score it gets right away.
WMMA designs sit on a low hill. Small edits there compile, pass and add a little speed, so the search climbs. WGMMA designs sit on a higher hill, across a valley where nothing passes. Moving to WGMMA means getting the shared-memory layout, the descriptors and the register layouts right together, and any one of them wrong scores zero. Any single edit from a WMMA design toward WGMMA scores zero, so local search rejects it.
The model’s weights were set in training, which included reinforcement learning on coding tasks where passing tests is a common reward. None of that training scored this kernel’s speed, and the weights do not change during the run. A failed WGMMA attempt adds an error message to the context window and no gradient to the weights, so the tenth attempt runs on the same weights as the first.
How attention loses old findings
Within a run, the model’s only memory is its context window. Every token it writes attends over the tokens before it through a softmax, so the attention weights on all earlier tokens sum to one. The longer the context, the thinner each old token’s share, and position encodings such as RoPE tilt the share further toward recent tokens. Long-context models are measurably worse at using what sits in the middle of a long context.
A new session is the extreme case. Its context starts with the task and whatever files it is told to read. A finding that is not in those files is not in the context, so it gets no attention.
The supervisor cannot change the weights. It changes three inputs instead: the design each team starts from, the edits each role may commit, and the files each new session reads first.
The fix: a supervisor that redesigns the team
The paper describes any agent team as three choices:
Roles: what each agent is responsible for.
Coordination: how agents hand work to each other. A pipeline (research, then implement, then profile), parallel branches, or both.
Knowledge management: where findings are written, and who must read them.
Most multi-agent setups fix all three before the run starts. Here a supervisor agent changes them during the run. It runs when a team finishes and at fixed intervals, and each time it follows the four steps below.
- 1
Monitor
Scores, progress and each agent’s report
- 2
Reflect
Name the failure pattern
- 3
Redesign
Roles, coordination, knowledge rules
- 4
Launch
Start the next team, each agent with a mandate
back to Monitor when a team finishes, or on a timer
Shared file system, kept across every team
- Code and test harness
- Learnings document
- Each team’s kernels and records
- The supervisor’s history of changes
There are no predefined roles. The supervisor invents them from what it diagnoses. On the decode kernel it tried more than 100 team configurations. Some of the roles it created:
Disciplinarian
Blocks any commit that leaves the WGMMA path. One change per commit, so every gain can be traced.
Fresh-Eyes Agent
Retries approaches earlier teams dismissed.
Challenger
Stress-tests claims that the kernel has hit its ceiling.
Knowledge Integrator
Turns findings scattered across teams into one document with a plan.
Table 3 of the paper lists 22 roles in all, from a Roofline Analyst to a Compiler Specialist.
Under every team sits the shared file system in the figure above. Each new team starts from everything earlier teams found.
After the supervisor added the Disciplinarian, the kernel’s speed against FlashInfer fell from 0.15× to 0.065×. The 0.065× kernel was the first correct WGMMA kernel, and every later version was built on it.
The recommendation nobody read
The supervisor numbers its teams V1, V2, V3 and so on. From V3, every team ran into the same wall: getting the P·V multiply onto WGMMA. V3, V4 and V5 each tried and failed on the same root cause.
Team V4 also wrote down a fix. Its report recommended a register-source WGMMA, which keeps the scores (P) in registers. Teams V5, V6 and V7 ignored the recommendation. It sat in V4’s report. It never reached the shared learnings document, the file later teams read.
The supervisor’s diagnosis: “Lost knowledge between teams is the biggest structural weakness.” The learnings document kept single facts. It did not keep strategic advice that spanned experiments.
So the supervisor changed the knowledge rules. It added a Knowledge Integrator and a new file, SYNTHESIS.md, that joins every agent’s findings into one plan. Every later team had to read it.
- V3–V5
Each team tries to put the P·V multiply on WGMMA. Each fails on the same root cause.
- V4
V4’s report recommends a fix for the P·V multiply: a register-source WGMMA. The recommendation stays in the report.
- V5–V7
These teams do not use the fix. It was never added to the shared learnings document, so none of them read it.
- V8
The supervisor adds a Knowledge Integrator and SYNTHESIS.md, required reading. The P·V multiply passes a standalone test for the first time.
- V9
The P·V multiply goes into the kernel.
- V10
A fresh profile of the new kernel guides the next changes: 0.50× → 0.66×, +32%.
The model was the same from V7 to V8. What changed was one file, SYNTHESIS.md, and the rule that every team reads it.
Results
The main comparison is the MLA decode kernel on an Nvidia H100, scored on 47 production DeepSeek-V3 workloads from FlashInfer-Bench. Every system had the same token budget. 1.0× would match production FlashInfer.
- Evolving agent team (Opus 4.6)0.74×
Figure 3a, best of two runs
- Claude Code (Opus 4.6)0.51×
Figure 3a, best of two runs
- Fixed four-role team (Opus 4.7)0.31×
Figure 6, one run
- Codex (GPT-5.5 xhigh)0.28×
Figure 6, one run
FlashInfer = 1.0×
The fixed four-role team is the useful control. Its four roles were Profiler, Hardware Researcher, Planner and Implementer, and they never changed. It ran a newer model than the evolving team. It finished below Claude Code alone.
With more budget, the evolving team’s kernel reached 1.21× the speed of production FlashInfer on average. It was faster on 36 of the 47 workloads and at 0.86–0.99× on the other 11. The best earlier published result was 0.61×, from K-Search.
The authors also ran four further settings with newer models (Opus and Sonnet 5.5):
- KDA prefill, the kernel that reads the prompt for Kimi Delta Attention: 3.01× faster than vLLM’s production kernels on an AMD MI350X, and 3.44× faster than FlashKDA on an Nvidia B200.
- Serving a large model on a Mac: Qwen3.8-Flash-Next, about 79 GB of 4-bit weights, served on a 48 GB M4 Pro by streaming experts from SSD, at 30.3 tokens a second.
- RoboDojo, 42 simulated two-arm robot tasks: a control program scoring 62.1 on held-out seeds, against 55.3 for the best leaderboard entry.
What the numbers don’t settle
Few runs. The main settings ran twice, and the paper reports the better run. The fixed-team and Codex runs happened once, and so did the four newer settings. The authors say this limits statistical conclusions.
At equal spend, the Mac result is a tie. At $200, a single Claude Code agent scored 1.047× and the team 1.056×. The team pulled ahead only with more time and money: 1.083× at $509. On the MI350X at $300 the gap was clearer: 1.65× solo, 2.13× team.
The 1.21× needs extra budget. At a matched budget the team reached 0.74× on MLA decode, still below FlashInfer.
Some runs start strong. The B200 KDA run began from a port of FlashInfer’s kernel that already scored 1.96×. The Mac run began from a server the team had already made 3.2× faster. These measure improvement over a good start, not from scratch.
What this means if you run agents
In the paper, team design moved the result as much as the model did. The fixed team ran a newer model and scored 0.31×, less than half the evolving team’s 0.74×.
When an agent stalls, ask why before adding tokens. Each of the supervisor’s changes answered a named failure. Drift got a Disciplinarian. A debugging problem that blocked all tuning got its own branch, so one agent debugged while another tuned. A lost insight got a synthesis file. A new design got a fresh profile, because the old bottleneck analysis no longer applied.
Write findings where the next session reads. A new session reads the task and the files it is told to read. With Claude Code or Codex, keep one file in the repo that every new session is told to read first, and update it when a finding changes the plan.
Make the hard constraint someone’s job. Agents told to use WGMMA switched to WMMA after a few failed tests. In the paper, a second agent that rejected every commit leaving WGMMA kept the team on it.
Splitting work across agents can hide a bug. The paper traces the fixed team’s slow start to one bug. The researcher knew the layout rule, the implementer wrote the layout, and neither read the other’s file. A single agent would have had the rule and the code in one context.
Try it
We wanted to see the effect with a model small enough to run on a laptop. We gave Qwen3.5-4B a toy tuning task with the same shape as the kernel: six settings, an easy design that tops out at 0.50×, and a fast design worth up to 1.06× that only works once three settings change together. Change one alone and it fails with a compile error or wrong output.
Each run got 40 model calls, and we ran each setup 20 times. The evolving team’s supervisor redesigned it three times per run, and its calls came out of the same 40.
| Qwen3.5-4B | Mean best | Reached the fast design | Tokens per run |
|---|---|---|---|
| Solo agent | 0.69× | 8 of 20 | 42k |
| Fixed team of three | 0.93× | 16 of 20 | 44k |
| Evolving team | 0.89× | 15 of 20 | 30k |
The solo agent plateaued the way the paper describes. In 12 of its 20 runs it tried the fast design, watched it fail, and settled between 0.42× and 0.49× on the easy one. Both teams got past that wall about twice as often.
The supervisor did not beat the fixed team. A 4B model writes fluent diagnoses that are often wrong: in 12 of 20 runs it banned the fast design at least once. What it did do was cut tokens by 30%, because each role reads only its own history. With Qwen3.5-0.8B, no setup beat the solo agent at all.
Our harness, prompts and scorer are in a gist, and every run is replayed call by call in the demo below.
This is a synthetic task with a scorer we wrote, run on one Mac. It illustrates the idea; it does not reproduce the paper, whose supervisor read real compiler and profiler output. We had no part in the paper. For the real thing, read it and run the authors’ code.
Sources
- Shiyi Cao, Ziming Mao, Dacheng Li, Joseph E. Gonzalez and Ion Stoica, “Evolving Agent Teams”, UC Berkeley Sky Computing Lab, arXiv 2610.36848, 27 October 2026. Every figure in this post. Read 28 October 2026.
- Nelson F. Liu and others, “Lost in the Middle: How Language Models Use Long Contexts”, arXiv 2307.03172. Models use information at the start and end of a long context better than in the middle.
- Jianlin Su and others, “RoFormer: Enhanced Transformer with Rotary Position Embedding”, arXiv 2104.09864. Rotary position embedding and its decay with distance.
- The authors’ code: caoshiyi/EAT.
- Our solo-vs-team harness and its results table: gist. Qwen3.5-4B and 0.8B on a synthetic task, run 31 October 2026.
More head-to-head evals
| Measure | GLM-5.3 | DeepSeek V4.1 Flash |
|---|---|---|
| Right, of 75 | 75 | 71 |
| Seconds a question, median | 3.9 | 1.8 |
| Measure | First run | Best since |
|---|---|---|
| Landscape, seconds | 937 | 233 |
| Memo, seconds | 759 | 602 |
| Measure | Qwen3 235B | GLM-5.2 | Gemini 3.8 Flash | Claude Opus 5 |
|---|---|---|---|---|
| Seconds to the plan, median | 27 | 48 | 57 | 94 |
| Plans written, of three runs | 2 | 3 | 3 | 3 |
| Measure | SubQ | jev | Decider | Nimble |
|---|---|---|---|---|
| Found, mean of five columns at section length | 64% | 65% | 66% | 68% |
| Mechanism of action, found at section length | 57% | 51% | 61% | 54% |
| Measure | ask | Apollo | treg |
|---|---|---|---|
| Usable leads | 13 of 40 | 7 of 40 | 6 of 28 |
| Cost per usable lead | $0.037 | $0.27 | $0.23 |
| Measure | ask with jev | ask with Decider |
|---|---|---|
| Questions right, of 92 | 89 | 89 |
| Wrong answers | 1 | 2 |
| Measure | jev | ask |
|---|---|---|
| Our 370 clinical decisions, right | 94.6% | 93.0% |
| PubMedQA, right (best EdgeEvals scored: 62.2%) | 77.0% | 74.4% |
| Measure | ask | Claude Opus 5.5 |
|---|---|---|
| Questions right, of 95 | 59 | 63 |
| Small companies right, of 20 | 13 | 9 |
| Measure | realestate-us | Best of four assistants |
|---|---|---|
| Floor-plan rents right, of 26 | 26 | 23 |
| Amenities claimed the listing doesn't state | 12 | 129 |
| Measure | ask | jev |
|---|---|---|
| Right, of the questions answered | 98% | 79% |
| Wrong answers, of 92 | 2 | 19 |
| Measure | Trained localiser | Best of four frontier models |
|---|---|---|
| Mean overlap with the defect (IoU, 0 to 1) | 0.421 | 0.109 |