Frontier Coding Agents Use Metaprogramming to Adapt to Unfamiliar Programming Languages
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
LLM-based coding agents are usually evaluated in familiar software settings: mainstream languages, common libraries, and public repositories. These benchmarks remain important, but they can hide how agents behave when the language itself is unfamiliar. We evaluate six contemporary coding agents on four esoteric programming languages using a sequential setup with file editing, local execution, and hidden-test grading. Our protocol exposes capability differences between these agents that mainstream coding and agentic benchmarks such as SWE-Bench Verified and Terminal-Bench 2.0 compress into much narrower bands. We observe that the strongest agents, Claude Opus 4.6 and GPT-5.4 xhigh, often avoid writing the target language directly. On Brainfuck and Befunge-98, they write Python programs that generate target-language code and debug those generators locally. Forbidding this metaprogramming strategy causes large performance drops. Text guidance distilled from this strategy does not materially improve weaker agents. In contrast, Opus-derived Python helper code for building generators, with no solved benchmark programs or hidden-test answers, sharply improves Sonnet 4.6 and GPT-5.4 mini on the same problems, while Haiku 4.5 remains low. More interpreter calls and output tokens improve stronger agents but leave weaker agents near their original performance, indicating that these resources amplify useful strategies rather than create them. Together, these results show that strong coding agents adapt to unfamiliar languages by using tools, feedback, and workspace state to build a working model of the target language. Metaprogramming is the clearest case, but the broader gap is constructing and debugging a strategy that works under the target language's rules.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 45 of its 72 references that are in the map. First posted on arXiv 9 Jun 2026.
Builds on
45 of 72 references.
Closest ancestors · 2
Same direction, newest first
- 2024Agentless: Demystifying LLM-based Software Engineering Agents1 Jul
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
Other references · 43
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2024τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domainscited by 1,280
- 2024OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environmentscited by 1,134
31 more
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Measuring Coding Challenge Competence With APPScited by 879
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 798
- 2023StarCoder: may the source be with you!cited by 790
- 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 515
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
- 2024MLE-bench: Evaluating Machine Learning Agents on Machine Learning Engineeringcited by 429
- 2024WebVoyager: Building an End-to-End Web Agent with Large Multimodal Modelscited by 424
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2024WorkArena: How Capable Are Web Agents at Solving Common Knowledge Work Tasks?cited by 348
- 2025PaperBench: Evaluating AI's Ability to Replicate AI Researchcited by 286
- 2024AutoCodeRover: Autonomous Program Improvementcited by 272
- 2020Unsupervised Translation of Programming Languagescited by 262
- 2023Proving Test Set Contamination in Black Box Language Modelscited by 227
- 2021What Will it Take to Fix Benchmarking in Natural Language Understanding?cited by 200
- 2024SciCode: A Research Coding Benchmark Curated by Scientistscited by 172
- 2021CrossFit: A Few-shot Learning Challenge for Cross-task Generalization in NLPcited by 142
- 2024Benchmark Data Contamination of Large Language Models: A Surveycited by 138
- 2023Investigating Data Contamination in Modern Benchmarks for Large Language Modelscited by 136
- 2024MHPP: Exploring the Capabilities and Limitations of Language Models Beyond Basic Code Generationcited by 25
- 2025OJBench: A Competition Level Code Benchmark For Large Language Modelscited by 22
- 2024IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generatorscited by 21
- 2025A Study of LLMs' Preferences for Libraries and Programming Languagescited by 20
- 2026LongCoT: Benchmarking Long-Horizon Chain-of-Thought Reasoningcited by 5
- 2026EsoLang-Bench: Evaluating Genuine Reasoning in Large Language Models via Esoteric Programming Languagescited by 4
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Exploring the Agentic Frontier of Verilog Code Generation
- 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challenges
- 2025AI-Generated Code Is Not Reproducible (Yet): An Empirical Study of Dependency Gaps in LLM-Based Coding Agents
- 2026Latent Programming Horizons in Coding Agents
- 2025Agent-based code generation for the Gammapy framework
- 2025A Self-Improving Coding Agent
- 2026From LLMs to Agents in Programming: The Impact of Providing an LLM with a Compiler
- 2026Cross-Model Cross-Language AI Coding Agent Performance: Accuracy and Speed of Parallel CLRS Algorithms