Skip to content

Coding Agents are Strong Prompt Optimizers

Aug 2026 · 0 citations · 40 references
Computer Science

TL;DR

Results suggest that corpus-scale statistical reflection is a viable alternative to iterative search for prompt optimization, and 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.

Abstract

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 \textit{Coding-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, $\tau^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\times$ 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.

View source

Similar papers

#artificial intelligence Preprint Aug 2026

SEPO: Evidence-Grounded Prompt Optimization via Structural Editing

This paper introduces SEPO (Structural, Evidence-grounded Prompt Optimization), a multi-trajectory prompt optimiser centred on edit-effect lineage feedback that makes prompt optimisation addressable, attributable, and actionable.

Xiao-Yu Ma, Hao-Yue Liu, Yiwen Li et al. · 1 citation
Preprint Aug 2026

CAPO: Constraint-Aware Prompt Optimization for LLM Agents

This work introduces CAPO (Constraint-Aware Prompt Optimization), a primal-dual method that combines pool-based rewrites with adaptive constraint weighting to optimize system prompts under explicit operational constraints.

Victor Ye Dong, Reid Pryzant, Yi Liu et al. · 0 citations
Open access Oct 2026

PromptBridge: AI Coding Agents you can Trigger from Chat and Trust

AI coding agents such as Claude Code, Cursor, Codex, and OpenCode have matured into capable multi-step software engineers, yet nearly all of them still assume a developer is sitting at a terminal. PromptBridge removes that assumption by connecting six messaging platforms, Telegram, Discord, Slack, Microsoft Teams, GitH...

Tripti Singh, Dolly Verma, Parineeta Jha · 0 citations
#artificial intelligence Preprint Sep 2026

MOSCOPT: Mixture-of-Skills Collective Optimization for LLM Agents

Natural language prompts and skills serve as the strategic backbone of LLM-based agents. Recent advances in prompt and skill optimization have achieved notable gains, yet all existing methods optimize a \emph{single} text template---missing the synergy among multiple complementary strategies. We propose MOSCOPT, a text...

Zhen-Yu Zhang, Jiu-Dong Yang · 0 citations
#artificial intelligence Preprint Oct 2026

Teaching Agents to Code Reliably

Autonomous coding agents solve repository issues by reading code, running commands, editing files, and submitting patches. Extra inference-time compute yields gains only when it produces a useful repair and supplies reliable evidence for choosing one. Three behaviors decide both, and we argue they are teachable rather...

Muhammad Ahmed Mohsin, Myeongsoo Kim, Kang-Rui Ruan et al. · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.