Skip to content
Advertisement
Microsoft paper finds coding agents beat dedicated prompt optimizers at tuning other agents

Microsoft paper finds coding agents beat dedicated prompt optimizers at tuning other agents

Microsoft logo (public domain) via Wikimedia Commons

A one-time offline analysis by an off-the-shelf coding agent outperformed published optimization methods on most benchmarks, at a fraction of the cost

Microsoft researchers have a new answer to an old AI question: who should tune the agents? Their latest paper says another agent should do it, specifically an ordinary coding agent you could pull off the shelf.

The study, “Coding Agents are Strong Prompt Optimizers” (arXiv:2609.26261), found that coding agents improved other agents more than published optimization methods did when given a target score and labeled examples. The specialized tools built for this job got outworked by a generalist.

How the method works

The researchers call their approach Coding-Agent Skill Distillation, or CASD. A coding agent makes a single offline pass over a static collection of past agent trajectories, which are logs of how other agents behaved while attempting tasks. From that corpus, the coding agent pulls out three things: performance statistics, recurring failure patterns, and behavioral rules worth keeping.

It then folds all of that into a refined system prompt. The system prompt is the standing set of instructions an AI agent reads before it starts any task, so changing it changes how the agent behaves on every task.

What CASD leaves out is the interesting part. It does not require multiple environment rollouts, iterative optimization loops, or a held-out validation dataset. Most competing methods depend on all three.

The numbers

According to the research findings, CASD delivered an average improvement of +16.6 percentage points over the unoptimized baseline across four agentic benchmarks. That comparison was run under matched data access conditions, meaning the competing methods worked from the same information.

The paper also compares CASD with GEPA, described as a leading reflective prompt optimizer. The head-to-head scores:

ALFWorld: CASD scored 83.3, compared with 74.0 for GEPA.

Advertisement

τ²-bench retail: CASD posted 40.0, against GEPA’s 39.2.

τ²-bench telecom: CASD reached 39.2, while GEPA managed 17.5.

SpreadsheetBench-Verified: CASD came in at 51.3, versus 60.7 for GEPA.

The telecom result is the largest gap. CASD more than doubled GEPA’s score there.

The retail result is much closer. A 0.8-point edge is a win on paper, though nobody should rewrite their roadmap over it.

On spreadsheets, GEPA came out ahead by a clear margin. So the record against GEPA is three wins and one loss.

Against a second rival, SkillOpt, the record is cleaner. According to the research summary, CASD outperformed SkillOpt, a validation-gated reflective search method, in all trials.

The cost story

CASD costs approximately $1.60 per optimized prompt, according to the findings. The research says that is over 22 times cheaper than conventional validation-gated iterative approaches.

The reason is structural. Iterative optimizers work like a student retaking the same exam over and over, checking each attempt against an answer key, and paying a fee every time they sit down. CASD reads the past exams once and writes a study guide.

Each loop of an iterative method usually means running the agent in its environment again and scoring the result. Those rollouts cost compute and time. Removing them changes the economics entirely.

Who wrote it and where it fits

The paper lists six authors: Agamdeep Singh, Srishti Gautam, Priyanshu Gupta, Nikita Mehrotra, Tanmay Bakshi, and Sumit Gulwani. It was submitted in August 2026.

The research summary places the work within a broader Microsoft effort on AI coding agents. That effort reportedly also includes a tool called TokenEconomizer and research into the characteristics of patches written by agents.

What this means

The main implication is a change in where optimization effort goes. Much of the field has treated prompt tuning as a search problem: try variations, test them, keep the winners, repeat. CASD treats it as an analysis problem, where the answers are already sitting in the logs.

Dropping the validation set saves real work. Held-out validation data has to be collected and labeled, then maintained, which is slow and expensive. A method that learns from existing trajectories lowers the barrier for smaller teams that lack that infrastructure.

There are caveats. The SpreadsheetBench-Verified result shows CASD is not better everywhere, and the retail margin over GEPA is thin. Results on four benchmarks are a strong signal, but they are still four benchmarks.

The approach also depends on having a useful corpus of prior trajectories to begin with. An offline method can only distill what is already in the data, so the quality of those logs likely determines the quality of the output.

Disclosure: This article was edited by Diego Almada Lopez. For more information on how we create and review content, see our Editorial Policy.