Teaching Agents to Code Reliably
Muhammad Ahmed Mohsin, Myeongsoo Kim, Kangrui Ruan, Shweta Garg, Varun Kumar, Murali Krishna Ramanathan
Abstract
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 than byproducts of scale, so a policy can carry them instead of a scaffold. Location diversity remains narrow, since attempts return to the same site and extra samples add no coverage. Edit diversity is left unexploited, since methodologies that differ resolve complementary issues no single run reaches. Verification misleads, since a test the agent writes for its own patch accepts many incorrect ones. Directing search by execution feedback and scoring each patch against its own reverted tree resolves 52.8% of SWE-bench Verified using 48.1% of the agent-steps an eight-sample baseline spends. Training moves these behaviors into the policy. On the 270 issues held out from SFT and RL training, weighted supervised fine-tuning raises pass@1 from 31.9% to 35.2% and pass@8 from 46.7% to 51.1%. A reinforcement objective then trains the verifier against gold-labeled repairs and incorrect variants, crediting the assertions that detect them. It raises pass@1 to 43.0% and pass@8 to 60.7%, lifts verifier precision from 26.8% to 41.7%, and more than halves false acceptance. Resolution improves on two of three out-of-distribution suites and verifier precision on all three, and the gains hold at 7B, 14B, and 30B against published coder baselines.
Create a lesson
Metadata
- Categories
- cs.AI, cs.LG
- Comments
- Submitted to ICLR 2027
Related papers
AGL-SKILL: Coding Harnesses as Agentic Optimizers
Shared title terminologycs.AIRyan Tsui, Yuge Zhang, Yuqing Yang
MemTrace: State-Consistent Memory for Long-Horizon Coding Agents
Shared title terminologycs.AIHongming Xu, Le Zhou, ZhongHe Jin et al.
Agent Behavior as Code: Efficient and Robust LLM Agents with Programmatic Specifications
Shared title terminologycs.AIPeng Qi, Chunliang Lyu, Gang Li et al.
EvoCast: Reliable Autonomous Research Agents for Iterative Forecasting Architecture Evolution
Shared title terminologycs.AIKaipeng Xu, Xianli Yan, Yan Wang et al.
Modeling Event-Conditioned Emotional Expression Response with LLM Agents in a Synthetic Social Simulation
Shared title terminologycs.AIRebecca Marigliano, Peter Carragher, Kathleen M. Carley
A Generative AI Agent to Emulate Interactive Human-driven Vehicles for Automated Driving Testing in Urban Areas
Shared title terminologycs.AIJia Hu, Changjian Yu, Panqu Wang et al.