NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Frontier Coding Agents Use Metaprogramming to Adapt to Unfamiliar Programming Languages

Aman Sharma, Sushrut Thorat, Paras Chopra

NeurIPS page · Open on the map

Category: LLM Agents, Evals & Benchmarks › Software Engineering Benchmarks · Type: empirical study · Keywords: coding agents, esoteric programming languages, metaprogramming, LLM evaluation, code generation, agent adaptation

Areas: Code & Coding Agents › Code Verification › Coding agent benchmarks; AI Agents › Agent Benchmarking › Coding agent benchmarks; Evaluation & Benchmarks › Language Model and Agent Benchmarks › Coding Agent Evaluation; Benchmarks for LLMs & Agents › Cross-Domain Agent Evaluation › Software Engineering Benchmarks

Summary

The paper evaluates how LLM-based coding agents adapt to unfamiliar esoteric programming languages, revealing that strong agents use metaprogramming strategies to generate code via helper programs.

Explained to a 5-year-old

Computers that help write code are tested on very strange programming languages. Some of the smart computers avoid writing the code directly and instead make other small programs to do the work. When they are not allowed to use those helper programs, they do much worse. The researchers also gave the computers extra instructions, but that didn't help the slower ones. The study shows that the best computers can learn new languages by using tools and feedback.

Explained to a 5-year-old, longer

Computers that write code are usually tested on common languages like English-like languages. This paper looks at what happens when the language is very weird and not many people know it. They tested six different computer helpers on four of these weird languages. Some of the helpers tried to write the code directly, but the best ones made small programs in Python to generate the code for the strange languages. When the researchers stopped the helpers from using those small programs, the best helpers performed much worse. The researchers also tried giving the slower helpers extra written instructions, but that did not help them much. In contrast, giving the slower helpers ready-made Python helper code that builds generators helped some of them improve a lot, while another helper stayed low. Adding more chances to run the language and see more output helped the strong helpers even more, but the weak helpers stayed about the same. The study shows that the strongest helpers can learn new languages by using tools, feedback, and keeping track of what they have done in their workspace. While metaprogramming is the clearest example, the bigger idea is building and debugging a strategy that works under the rules of the new language.

For a technical reader

We evaluated six state-of-the-art coding agents on four esoteric languages using a sequential workflow that includes file editing, local execution, and hidden-test grading. The strongest agents (Claude Opus 4.6 and GPT-5.4 xhigh) often avoided writing the target language directly, instead generating code via Python helper programs that produce and debug the esoteric code. Restricting this metaprogramming strategy caused large performance drops for top agents, while distilled text guidance did not materially improve weaker agents. Providing Opus-derived Python helper code sharply boosted mid-tier agents (Sonnet 4.6 and GPT-5.4 mini) on the same problems, whereas Haiku 4.5 remained low. Additional interpreter calls and output tokens amplified performance for strong agents but left weaker agents near their original levels, indicating that resources amplify existing strategies rather than create new ones. The findings highlight that strong agents adapt to unfamiliar languages by leveraging tools, feedback, and workspace state to construct a working model of the target language.

Problem

Existing coding agent benchmarks focus on familiar languages and hide agent performance on truly unfamiliar languages. It is unclear how agents behave when the language itself is esoteric and not well understood.

Method

The authors evaluate six contemporary coding agents on four esoteric languages using a sequential protocol that includes file editing, local execution, and hidden-test grading. They analyze agent behaviors, including whether they write code directly or use helper programs to generate target code, and examine the impact of restricting metaprogramming strategies.

Results

Strong agents adapt via metaprogramming, achieving higher performance, while weaker agents see limited gains from additional resources; restricting metaprogramming sharply reduces performance for top agents, and helper code significantly boosts mid-tier agents.

Contributions

A systematic evaluation protocol for coding agents on esoteric languages that reveals capability gaps hidden by mainstream benchmarks, and insights into how strong agents use metaprogramming and workspace strategies to adapt.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction