For the past two years, the cutting edge of automatic prompt optimization has meant search: propose an edit, run the agent again, score the result, keep what helps, repeat. A new paper from Microsoft researchers argues that the whole loop can be skipped. Hand an ordinary coding agent a folder of old agent logs and a one-paragraph instruction, they report, and it will write a better prompt than the leading search-based optimizers, in a single pass, for about $1.60.
The paper, "Coding Agents are Strong Prompt Optimizers" (arXiv 2609.26261), comes from Agamdeep Singh, Srishti Gautam, Priyanshu Gupta, Nikita Mehrotra, Tanmay Bakshi and Sumit Gulwani. It introduces a method the authors call Coding-Agent Skill Distillation, or CASD. The central claim is blunt. "We show that this optimization loop is unnecessary," the authors write in the abstract, describing the propose-rollout-score cycle behind systems such as GEPA. Given only a static corpus of agent trajectories, they say, an off-the-shelf coding agent "can directly synthesize an optimized prompt, requiring neither environment access nor validation data."
One Pass Over the Whole Corpus
CASD's difference is what the authors call reflection scope. Reflective optimizers like GEPA, an ICLR 2026 oral paper from researchers at Berkeley, Stanford and elsewhere, look at a small batch of sampled trajectories at each step, reason about what went wrong in natural language, and propose a revised prompt that then has to prove itself on a validation set. CASD instead lets a coding agent (Claude Sonnet 5 running in Claude Code, in the paper's experiments) write and run analysis code over every logged episode at once. It computes per-category pass rates, tool-call histograms, duplicate-call counts and how often arguments were hallucinated, then reads the specific episodes those statistics flag and turns what it finds into behavioral rules in a "skill file" that becomes the new system prompt.
The authors say this finds things minibatch reflection can't. In one telecom example, the agent found that 123 of 284 calls to a single lookup tool were exact duplicates, which the paper calls "a one-liner in pandas, but invisible in a context-window reflection." The top rule in the telecom skill targeted fabricated identity-lookup arguments that showed up in 16 of 50 episodes, a failure the paper says GEPA's telecom prompts never addressed. In one case study, the root cause of a failure showed up in the logs only as something missing: a payment call that no rollout ever made. Only CASD wrote a rule for it.
The team tested on four agentic benchmarks: ALFWorld, the retail and telecom environments of τ²-bench, and SpreadsheetBench-Verified. The target model was GPT-5.4-mini with reasoning turned off. With every optimizer limited to the same static rollout corpus, one CASD pass raised the unoptimized baseline by 16.6 percentage points on average. GEPA managed 10.9 and SkillOpt, a validation-gated reflective search method, managed 5.3. CASD beat GEPA on three of the four benchmarks and SkillOpt on all four. On ALFWorld, CASD pushed accuracy from 56.7% to 83.3%. On telecom it roughly doubled the score, from 19.2% to 39.2%.
The cost gap is just as large. Optimizing prompts for all four benchmarks cost $6.40 with CASD, against $8.40 for GEPA and $142.50 for SkillOpt, which spent $74.70 on telecom alone. That puts CASD more than 22 times cheaper than validation-gated search. When the search methods got extra validation data and unlimited environment access that CASD never used, they gained ground: GEPA reached 46.7 on retail and SkillOpt 44.2 on telecom. CASD still stayed ahead on two of the four benchmarks.
Why It Matters
Prompt optimization has mostly been something you can do only if you have a simulator, a grader and a held-out validation split, and can afford to rerun an agent hundreds of times. CASD needs none of those. The rollout corpus is, as the authors put it, "a byproduct of rollouts that were already generated," meaning production logs a team already has could become the training data. That makes the method usable in exactly the places search can't go: live customer-service agents, internal tools with no sandbox, and workflows where every extra rollout costs real money or carries real risk.
The paper also offers a statistical argument against search. Methods that keep an edit only when a small validation batch approves it tend to overfit that batch and swing widely between runs. SkillOpt's retail results had a standard deviation of 10.1 points. CASD has no acceptance gate to overfit, and three independently distilled skills landed within 3.1 points of each other on three of four benchmarks.
An ablation points further. On ALFWorld and retail, the no-reasoning model with a CASD skill beat the same model with reasoning turned on, and on telecom it recovered 78% of the gap, all while producing 2.9 to 4.5 times fewer output tokens per episode. The authors argue that much of what reasoning models re-derive in every episode is "policy-like" and can be written down once, offline. If that holds more broadly, distilled prompts could stand in for some expensive test-time reasoning.
The authors are candid about limits. Every result uses one target model and one coding agent, so how much the method depends on the distiller's strength is untested. CASD also "inherits the corpus": it can't learn behaviors that never appear in the logs, and small or failure-free corpora may leave little to distill.
What to Watch
The obvious next test is whether the recipe holds with weaker or open-weight coding agents, and on target models beyond GPT-5.4-mini. The authors don't argue for abandoning search. They see a division of labor: "offline corpus-scale reflection may become the default first step of prompt optimization, with search reserved for the final gains when additional interaction is inexpensive." Watch whether frameworks like DSPy and GEPA's own open-source tooling add a corpus-analysis stage up front, and whether teams running agents in production start treating their trajectory logs as an optimization asset rather than exhaust.
“We show that this optimization loop is unnecessary.”— Agamdeep Singh, Sumit Gulwani et al., Authors, Microsoft