Coding Agents are Strong Prompt Optimizers
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Search-based prompt optimizers improve prompts through iterative search: they propose edits, execute fresh rollouts, score the resulting trajectories, and retain only edits that improve a validation metric. We show that this optimization loop is unnecessary. Given only a static corpus of agent trajectories, an off-the-shelf coding agent can directly synthesize an optimized prompt, requiring neither environment access nor validation data. We call this approach textitCoding-Agent Skill Distillation (CASD). The key insight is reflection scope. Rather than reasoning over a small batch of trajectories at each optimization step, the coding agent writes and executes analysis code to compute corpus-wide statistics, identifies systematic failure modes, inspects representative episodes, and distills the resulting insights into behavioral rules. Across four agentic benchmarks (ALFWorld, τ2-bench retail and telecom, and SpreadsheetBench-Verified), under matched data access, a single CASD pass outperforms GEPA, a state-of-the-art reflective prompt optimizer, on three of four benchmarks and outperforms validation-gated reflective search (SkillOpt) on all four, improving the unoptimized baseline by 16.6 percentage points on average versus 10.9 for GEPA and 5.3 for SkillOpt. Because CASD performs a single offline analysis pass rather than iterative search, producing an optimized prompt costs approximately 1.60---over 22× cheaper than validation-gated search. Even when competing methods are granted additional validation data and unrestricted environment access, CASD remains ahead on two of four benchmarks. These results suggest that corpus-scale statistical reflection is a viable alternative to iterative search for prompt optimization.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 25 of its 40 references that are in the map. First posted on arXiv 13 Aug 2026.
Builds on
25 of 40 references.
Closest ancestors · 1
Same direction, newest first
Other references · 24
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,928
- 2020Offline Reinforcement Learning: Tutorial, Review, and Perspectives on Open Problemscited by 1,873
- 2020Conservative Q-Learning for Offline Reinforcement Learningcited by 1,777
- 2024τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domainscited by 1,280
- 2018Off-Policy Deep Reinforcement Learning without Explorationcited by 1,227
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
- 2022Large Language Models Are Human-Level Prompt Engineerscited by 1,020
12 more
- 2023ExpeL: LLM Agents Are Experiential Learnerscited by 814
- 2023Automatic Prompt Optimization with "Gradient Descent" and Beam Searchcited by 628
- 2025τ2-Bench: Evaluating Conversational Agents in a Dual-Control Environmentcited by 558
- 2023Promptbreeder: Self-Referential Self-Improvement Via Prompt Evolutioncited by 521
- 2025Agentic Context Engineering: Evolving Contexts for Self-Improving Language Modelscited by 349
- 2024Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programscited by 270
- 2023PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimizationcited by 226
- 2021Offline RL Without Off-Policy Evaluationcited by 150
- 2025Dynamic Cheatsheet: Test-Time Learning with Adaptive Memorycited by 146
- 2024Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluationscited by 130
- 2024SpreadsheetBench: Towards Challenging Real World Spreadsheet Manipulationcited by 100
- 2024Trace is the Next AutoDiff: Generative Optimization with Rich Feedback, Execution Traces, and LLMscited by 62
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026SPEAR: Code-Augmented Agentic Prompt Optimization
- 2026The Optimizer Is the Agent: Reasoning-Driven Search across Prompts, Programs, and ML Workflows
- 2026Prompt-Induced Waste in Coding Agents: Reasoning, Effort, Harness Design, and End-to-End Cost
- 2025MAPGD: Multi-Agent Prompt Gradient Descent for Collaborative Prompt Optimization
- 2026RealSWE: A Compositional Evaluation of Coding Agents under Realistic User Requests
- 2025Lessons Learned: A Multi-Agent Framework for Code LLMs to Learn and Improve
- 2026Analyzing and Mitigating Cost-Inefficient Behaviors in Coding Agents
- 2026SePO: Self-Evolving Prompt Agent for System Prompt Optimization