potentialpaper

Code-to-Harness: Learning Language Policies through Executable Practice

Anonymous authors

ICLR 2027

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Learning reusable policies for frozen large language models (LLMs) raises a representation question: must a policy be discovered in the same form in which it is deployed? We introduce Code-to-Harness, which uses executable programs as the discovery representation and compact instructions as the deployment representation. A practice agent proposes and revises optimizer programs from executable feedback; a development competence screen determines which completed runs are eligible for promotion; and a one-shot in-context synthesis compresses the accumulated executable practice into an approximately 200-word frozen policy. Only policies from promoted runs enter the primary transfer evaluation, and no source program is executed at deployment. Across ten completed discovery runs, four satisfy the recorded promotion criterion. On 30 genuinely fresh objective instances per task, promoted policies reduce mean regret relative to the unaided executor by 44.4--60.7% on quadratics and 32.5--50.0% on Rastrigin. One fixed policy attains lower mean regret than all five numerical baselines on eight of ten BBOB families, and all four promoted texts improve a second vendor's executor on both core tasks. On three LCBench/YAHPO-Gym HPO tasks, frozen policies attain the lowest reported mean on two datasets. A five-batch audit further shows that the recorded threshold behaves as a conservative competence screen rather than a calibrated predictor of downstream text quality. Together, the results show that useful search-strategy information can cross an executable-to-language representation boundary without requiring the discovery program at deployment.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
18 Sep 2026ICLR 2027 (under review)submittedICLR 2027Under reviewreviews ↓[1]PDF[1]
Missing a version?

ICLR 2027

Under review · 3 reviews · OpenReview

Updated 24 Nov 2026, 17:15 UTC.

Reviewer SNZjOpenReview ↗
Rating
1/4
Confidence
3/4
Soundness
2/3
Presentation
2/3
Informativeness
3/3
Read review
Summary
  • The paper proposes Code-to-Harness, which discovers a search policy as executable optimizer programs and deploys it as a short natural-language strategy text for a frozen LLM optimizer.
  • A practice agent revises programs from execution feedback on shifted quadratics, a competence screen against a reference program decides promotion, and a one-shot synthesis compresses the practice into a six-principle text.
  • Only texts from promoted runs, a minority of all discovery runs, are frozen and evaluated, and the source program is never executed at deployment.
  • Evaluation covers fresh instances, BBOB families, larger budgets, higher dimension, other LLM executors, and surrogate-served HPO tasks against classical and LLM-based baselines.
  • Additional analyses include text-space discovery controls, distillation-input ablations, an audit of the promotion screen, and a production case study in the appendix.
Strengths
  • Separating the discovery representation (code) from the deployment representation (text) is a clear and interesting idea, distinct from both prompt optimization and program search.
  • The transfer evaluation is broad and reports all promoted texts without task-specific selection, with gains persisting on fresh instances, an off-family task, and a second vendor's model.
  • The paper is candid about negative results, including failures at higher dimension, on a weaker executor, and on some BBOB families.
  • Discovery needs far fewer LLM calls than the tested language-space controls because candidates are evaluated by running code.
Weaknesses
  • The claim that code-space discovery beats language-space discovery rests on task-adapted "-style" controls with very few chains, inconsistent initializations, and a GEPA-style run seeded from the paper's own policy.
  • A zero-shot or human-written "expert optimization principles" prompt is missing as a control, although the promoted texts read like generic optimization advice.
  • Results are conditional on a noisy promotion screen that most runs fail, whose seeds overlap with practice, and which rejects the strongest text's source program on most fresh batches.
  • Practical significance is unclear, since the tasks are low-dimensional and small-budget, the reference program wins on the practice family, and the paper does not say when deploying through an LLM beats running the program.
  • Reproducibility is limited by a missing source trace for one policy, a reconstructed distillation prompt, and an unverifiable production case study.
Questions for the authors
  • How does a zero-shot LLM-written or human-written six-principle prompt, produced without any practice, compare with the promoted texts?
  • How do the champion programs themselves perform on the off-family, BBOB, and HPO tasks, and when is the text preferable to running the code?
  • What is the expected end-to-end outcome per discovery attempt including rejected runs, and when was the promotion threshold fixed?
  • Can the text-space controls be rerun with a matched generic initialization and more independent chains?
  • What is the variance across repeated executions of the same frozen text, and why is regret sometimes higher at a larger budget?
Ethics concerns

NA

Reviewer MgRfOpenReview ↗
Rating
2/4
Confidence
2/4
Soundness
2/3
Presentation
2/3
Informativeness
2/3
Read review
Summary

This paper proposes to discover optimization strategies for a frozen LLM through executable practice. An agent first writes and refines optimizer programs on simple synthetic functions, and the practice is then distilled into a short text of principles. The text is given to the LLM at deployment without running any program, and the paper shows that it improves black-box optimization on new instances and several transfer settings.

Strengths
  1. The paper is well-written and easy to follow.
  2. The idea of learning strategies through executable practice and then turning them into plain text is interesting.
Weaknesses
  1. Unclear Motivation. It is not shown that executable practice is really necessary. A text written directly by the same LLM without any practice may work just as well, but this comparison is missing.
  2. Limited Baselines. The comparison with other prompt optimization methods is too thin, and the original programs are never tested on the transfer tasks, so it is unclear what is gained by turning them into text.
Questions for the authors
  1. How would a strategy text written directly by the LLM without practice perform?
  2. Why is text a better way to carry the strategy than the program itself?
  3. Missing references. https://arxiv.org/abs/2405.20132, https://arxiv.org/abs/2401.02051 and https://arxiv.org/abs/2402.01145 should be discussed.
Reviewer jCb6OpenReview ↗
Rating
1/4
Confidence
3/4
Soundness
1/3
Presentation
3/3
Informativeness
1/3
Read review
Summary

This paper tackles the problem of learning reusable skills for frozen LLMs. They observe that existing works discover skills in language, where advice needn't commit to concrete actions and evaluation requires repeated LLM execution. Therefore, they propose Code-to-Harness, which iteratively revises optimizer programs using execution feedback, then summarizes the practice into a fixed six-principle skill for an LLM executor. The core idea of Code-to-Harness is to discover strategies in code and deploy them through approximately 200 words organized into six prescribed principles. They tested the learned skills on fresh numerical objectives, ten BBOB families, additional LLM executors, and three HPO tasks. The results show that the four skills from ten discovery runs improve the unaided executor on fresh core tasks, while transfer varies across objectives, dimensions, and executors.

Strengths
  1. The method separates executable strategy discovery from language-based deployment without updating model weights.
  2. The frozen skills consistently improve the unaided executor on fresh core-task instances.
  3. The paper reports all promoted skills and documents transfer failures and limitations.
Weaknesses
  1. Although the authors describe their method as a “discovery-deployment representation split,” the underlying idea is a skill-making workflow for a specific class of numerical optimization tasks. They evaluate four extracted skills on related tasks, but do not establish that the workflow can reliably discover skills more broadly. The paper reads more like a development report for these skills than a study of a general skill-learning method.
  2. The contribution of executable practice is not isolated. The distillation prompt already prescribes six strategy topics, including informative probing, incumbent-relative search, budget adaptation, and recovery from failed predictions. The paper lacks a matched control that generates a skill from the same instructions without executable practice. The gains could partly reflect this supplied structure and the model’s existing optimization knowledge.
  3. The six-principle format is imposed rather than discovered. The paper does not explain why six principles are appropriate or compare this format with unconstrained summaries, different principle counts, or a matched human-written skill. Consequently, recurring principles across outputs do not by themselves demonstrate knowledge acquired through practice.
  4. The scope of reuse is narrow and uneven. Most evaluations retain the same bounded continuous optimization interface. HPO is mapped into that interface, and some skills hard-code its bounds. Transfer weakens on Flash-Lite, all four skills worsen performance on Katsuura, and Harness B fails at higher dimension. The evidence supports reuse within this optimization setting, rather than broadly reusable agent skills.
Questions for the authors

see weakness.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…

This paper is under review