不训练权重,编程 agent 还能从哪里改进
公开研究把改进办法分成几类:搜索规则和脚手架、选择模型和路由、在运行中调整,以及写下可复用的经验。
想让编程 agent 做得更好,研究者并不一定先去训练模型权重。
公开研究里已经出现了几类办法,它们改的是规则、脚手架、路由,或运行当中的决定,而不是模型本身。
一种常见的做法,是让一个 agent 负责写代码,另一个负责审阅。
两边并不直接对话:写的一方改代码,审的一方查看并给出判断,消息都经过中间的宿主,规则则写在方法卡片里。
edits code, runs tests
scouts, verifies, rules
- 1Guardsrepeat, rate, round budget
- 2Method rulesscript or written rules
- 3Deliveryqueue, steer or interrupt
- 4Turn-end contractsreviewed, replied, progress
- 5Loop checkflags a stuck exchange
五种办法改的不是同一种东西
前四类办法改的是规则、脚本、路由或记忆,并不训练模型权重。
一类是搜索提示词和脚手架,例如 GEPA、Meta-Harness、RRSI,以及我们介绍过的 AgentPilot,改的是规则、脚本或外围程序。一类是选择模型和路由,例如 RouteLLM、PILOT 路由器和 CascadeDebate。一类是给正在运行的工人配一个监督者,例如 PILOT in the Loop,监督者可以中途提示,也可以中止已经没有用的一轮。一类是把经验写成记忆和剧本,例如 Reflexion、Agent Workflow Memory 和 ACE。
对模型权重做强化学习,并不适合直接用在改不了权重的闭源系统上。
这一类的例子有 Agent Lightning、OpenPipe ART 和 SWE-RL。它们需要可训练的模型、沙盒和大量试跑。Claude Code、Codex 这类闭源系统改不了权重,所以这一路暂时用不上。
| Family | What it changes | What it needs | Fit | Examples |
|---|---|---|---|---|
| Search over prompts and harness | Rules text, settings, scripts | A re-runnable benchmark with a held-out split | High | GEPA (2025), Meta-Harness (2026), RRSI (2026), AgentPilot |
| Bandits | A small choice: which mode, which reviewer, when to stop | Context, outcome, some randomized exploration | High | RouteLLM (2024), PILOT router (2025), CascadeDebate (2026) |
| A supervisor that steers a running worker | Stop, redirect or continue | Live traces | High | PILOT in the Loop (2026) |
| Memory and playbooks | What is put in the context | Past runs and a success signal | Medium | Reflexion (2023), Agent Workflow Memory (2024), ACE (2025) |
| RL on model weights | The model itself | A sandboxed environment, hundreds to thousands of rollouts, GPUs, serving | Low for now | Agent Lightning (2025), OpenPipe ART with RULER (2025), SWE-RL (2025) |
谁来审稿,符号可能会翻过来
当一个 agent 负责写、另一个负责审的时候,谁写、谁审,结果可能完全相反。
一项在 116 道 LiveCodeBench 中等和困难题目上的对照实验表明,审稿者能看到题目和草稿,但不能跑测试。Codex GPT-5.5 单独作答的通过率是 71.6%,交给 Claude Opus 4.7 审一遍后升到 89.7%;Claude Opus 4.7 单独作答已经是 91.4%,交给 Codex GPT-5.5 去审,通过率反而降到 82.8%。
有用的结对是不对称的,并不能假定再加一个审稿者就一定更好。
这项结果只来自这一对模型和这一个基准,因此不能直接推广到所有搭配。
第二个 agent 也可能帮倒忙
使用者要不要加第二个 agent,应当按任务来决定。
Google 的一项研究比较了 180 种 agent 配置。它发现,在需要逐步满足约束的规划任务上,所有多 agent 方案都比单 agent 差,相对降幅大约是 39% 到 70%;而在更适合并行处理的任务上,多 agent 可以带来很大提升,例如结构化的金融推理在集中式协调下相对提高约 81%。
许多多 agent 失败可以通过更好的设计来改善。
MAST 从 1600 多条多 agent 运行记录里归纳出 14 种失败模式,并把它们归到系统设计、角色之间对不齐,以及任务核验这三类。
旧日志不能代替重跑,自写的教训也不能直接启用
旧日志也不能代替重跑。
The Replay Gap 在 SWE-bench 上发现:如果在轨迹较早的位置换模型,被回放的后续状态里只有约 3% 到 8% 仍然有效。如果只用旧日志去评估换模型或换路由,评到的往往是一个不会真正出现的世界,研究者需要重新跑一遍才能判断候选是否更好。
准备变成默认设置的经验,仍然需要人来把关。
SkillsBench 表明,人工整理的技能能把 87 项任务、18 种配置上的平均通过率从 33.9% 提到 50.5%;但在三个专用配置里,智能体自己写的技能反而比不用技能低 8.1 到 11.5 个百分点。OpenHands 的一篇研究还指出,能对上「PR 被合并」的工作片段大约只有 6%,只用这类标签训练出来的评判模型,AUC 只有 0.58。
- Who reviews whom flips the sign. On 116 LiveCodeBench tasks, Claude Opus 4.7 reviewing Codex drafts raised the pass rate from 71.6% to 89.7%. Codex reviewing Claude drafts lowered it from 91.4% to 82.8%. One benchmark, one model pair, and the reviewer could not run tests, but it is the strongest argument for learning the reviewer choice.
- A second agent can hurt. A Google study of 180 configurations found multi-agent setups degraded sequential tasks by 39% to 70% and helped parallel ones. Pairing should be a per-task decision.
- Failures are mostly design, not model. The MAST study classified 14 failure modes across more than 1,600 multi-agent traces: lost handoffs, a role doing the other's job, loops.
- Lessons an agent writes for itself are unreliable. In SkillsBench, curated skills raised average pass rate from 33.9% to 50.5% across 87 tasks and 18 configurations; in three specialised configurations, self-written skills were 8.1 to 11.5 points worse than using none. Keep a human gate on anything that becomes a default.
- Logs cannot stand in for reruns. "The Replay Gap" found that after an early model swap only 3% to 8% of replayed states were still valid. Judge candidates by running them.
- Usage signals are sparse and weak. One 2026 study found merge labels on about 6% of work segments, with a critic trained on them barely beating chance. Online signals suit coarse choices only.
- Weight-level RL from real usage does exist, at a different scale. Cursor trains its tab model on accept and reject: plus 0.75 for an accepted suggestion, minus 0.25 for a rejected one, zero for staying silent, across hundreds of millions of requests a day.
Cursor 已经把在线强化学习用在 Tab 补全上,不过它和编程 agent 并不在一个量级。
它会按用户接受或拒绝来打分,示例奖励是接受 +0.75、拒绝 −0.25、不展示则为 0,而且每天要处理超过 4 亿次请求。
目前还没有发现把强化学习或赌博机专门用在「一个写代码、一个审稿」这种结对上的公开研究。
来源:Cross-Model LLM Code Review;Towards a Science of Scaling Agent Systems;MAST;The Replay Gap;SkillsBench;OpenHands 评判模型;Cursor Tab 在线强化学习;GEPA;Meta-Harness;RRSI;PILOT in the Loop;RouteLLM;PILOT 路由器;CascadeDebate;Reflexion;Agent Workflow Memory;ACE;Agent Lightning;OpenPipe ART;SWE-RL;AgentPilot 改进循环。