AGL-SKILL: Coding Harnesses as Agentic Optimizers

Ryan Tsui, Yuge Zhang, Yuqing YangarXiv 2026

TL;DR

Instead of building bespoke algorithms to tune AI agents, what if we just pointed an off-the-shelf coding agent at another agent's codebase and told it to make the score go up? In AGL-SKILL, researchers show that unguided coding agents (like Claude Code or Codex) handily beat specialized optimization algorithms across five diverse benchmarks. Give a frontier coding agent a clear metric and a modest dollar budget, and it turns out to be a remarkably resourceful engineer—sometimes improving the target agent by writing better code, and sometimes by realizing the target doesn't need an LLM at all.

What Problem Does This Paper Address?

Modern LLMs rarely work alone; they operate inside harnesses—software wrappers like Claude Code, OpenAI Codex, or GitHub Copilot that give models tools, execution environments, and memory. To make these agents better at specific jobs, developers give them skills: folders containing reusable instructions, reference docs, and helper scripts.

Handcrafting skills is tedious and brittle. Recent research treats skill creation as an automated optimization problem, using custom search algorithms to iteratively tweak prompts and keep edits that improve benchmark scores. However, these hill-climbing pipelines are narrow and inefficient: they usually keep the target agent frozen and only tweak a single text file. Meanwhile, general-purpose coding agents already know how to read logs, diagnose bugs, edit code, and run tests. The authors ask: can off-the-shelf coding agents optimize other agents all on their own?

Methods

The authors introduce AGL-SKILL, a setup separating an optimizer agent from a target agent. Unlike prior methods that rely on rigid search loops over a frozen agent, AGL-SKILL gives an off-the-shelf coding harness (Claude Code running claude-opus-5, or Codex/Copilot running gpt-5.6-sol) full access to an editable target agent (gpt-5.4-mini) and a benchmark's training split.

Unlike prior methods that only tweak a skill file for a frozen agent, AGL-SKILL lets a coding agent inspect outputs and edit the target agent's prompts, code, and tools.

Operating under a strict API dollar budget ($5, $10, or $25) with web access blocked, the optimizer inspects training examples, edits the target's skills, prompts, tools, or Python code, and runs evaluations on whatever training subsets it chooses. Once the budget runs out (or the agent decides it's done), the target agent is frozen and scored on a held-out test split.

The authors test five variants of instructions for the optimizer:

  • Vanilla: Just the basic task prompt.
  • Two-phase: Maximize accuracy first, then cut inference costs.
  • Agent Lightning skill: Pre-loading a custom "how-to-optimize" skill into the optimizer.
  • Subagents & Git worktrees: Instructing the optimizer to explore parallel solutions via subagents or separate Git branches.

Datasets

No new benchmarks are introduced; the authors evaluate across five existing, diverse benchmarks:

  • SpreadsheetBench: Editing Excel workbooks via Python (120 train / 280 test).
  • ALFWorld: Completing text-based household tasks via sequential actions (3,553 train / 134 test).
  • OfficeQA: Retrieving Treasury Bulletin data for numerical QA (50 train / 172 test).
  • SearchQA: Answering questions from noisy web snippets (400 train / 1,400 test).
  • LiveMath: Solving theorem-level five-choice math problems (35 train / 125 test).

Key Insights and Ideas

  • Meta-guidance barely matters: Giving the optimizer specialized optimization skills, subagents, or Git worktree workflows did not consistently beat the Vanilla unguided agent. Left to their own devices, coding agents naturally converge on clean, practical engineering fixes (like adding execution retry loops or normalizing output formats).
  • Bigger budgets don't buy much: Bumping the optimization budget from $5 to $25 improved accuracy by only 0.03 on average. At $25, a quarter of the optimizers actually stopped early with over 20% of their budget unspent. Extra money mostly acts as safety slack to recover from rare mistakes.
  • Agents will ruthlessly "game" the task by deleting the LLM: Because the optimizer can edit code, it sometimes realizes the target LLM is dead weight. On ALFWorld, almost every Vanilla run replaced the LLM entirely with a deterministic Python controller—driving test-time API costs to $0.00 and accuracy to ~100%! On LiveMath, optimizers exploited structural patterns in the multiple-choice options to answer a subset of questions without calling the model at all.

Key Results

Unguided Vanilla coding agents outperformed every published skill-optimization baseline (including SkillOpt, GEPA, TextGrad, and Trace2Skill) across all five benchmarks, averaging a +0.15 absolute accuracy gain (a 35% relative improvement) over the strongest prior methods:

  • LiveMath: Jumped from 0.328 (previous best) to 0.649—nearly doubling performance—while cutting test-time inference cost by about a third.
  • SpreadsheetBench: Improved from 0.475 to 0.694.
  • ALFWorld: Climbed from 0.858 to 0.998, slashing test-time cost from ~$7.50 down to virtually zero.
  • OfficeQA & SearchQA: Reached 0.539 (vs. 0.488) and 0.824 (vs. 0.802), respectively.
  • Differences between Claude Code, Codex, and Copilot were minimal and mostly within run-to-run variance.

Limitations and Future Work

  • Clean rewards and Goodhart's Law: All five benchmarks offer labeled training examples and crisp, scalar automatic graders. Real-world tasks often have noisy, sparse, or subjective feedback. Furthermore, clear metrics invite benchmark-specific shortcuts (like deleting the LLM in ALFWorld or exploiting multiple-choice artifacts in LiveMath) that boost test scores without making the agent genuinely smarter.
  • Experimental scope: Model and harness effects aren't fully isolated (Claude Code ran a different model than Codex/Copilot), only one target model (gpt-5.4-mini) was tested, and runs capped at three repetitions.
  • Future directions: Testing cross-harness transfer, recursively optimizing the optimizer's own skill, and building continual-learning optimizers that retain lessons across runs rather than starting fresh every time.

Summary updated

Abstract

Frontier models are increasingly used through harnesses as agents, with growing autonomy to do useful work. Agent performance can often be enhanced by the use of skills: reusable workflows, code, and prompts that provide task-related information or guide the behaviour of the model. Skills, being textual in nature, present themselves as another editable surface to be optimized; current methods have improved on handcrafting and one-shot generation by treating skill development as an iterative process, using score-driven search to tweak and improve performance. In this paper, we demonstrate the efficacy of the agents themselves as optimizers: across five benchmarks, a coding agent without guidance substantially improves every target and outperforms published skill-optimization methods. More broadly, this shows the capability of agents to do such work and to refine their own behaviour to provide task-specific context, as long as they are given a metric to measure against.
BibTeX
@misc{tsui2026agl,
  author = {Ryan Tsui and Yuge Zhang and Yuqing Yang},
  title = {{AGL-SKILL: Coding Harnesses as Agentic Optimizers}},
  year = {2026},
  eprint = {2611.31794},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.31794},
}
Figure