
Does letting the coding agent re-run the tests improve its performance?
When we published SWE-InfraBench, the main finding was how badly LLMs handle infrastructure-as-code. Its 100 tasks come from real AWS CDK repositories and are graded by the repository's own unit tests, and Claude 3.7 Sonnet solved 34% in one attempt, or 65% with the test errors and a second try. The paper argued that iteration was the missing piece, so we tested that directly with the Kiro agent and Claude Sonnet 5.
A two-turn run matching the original protocol reached 69%, and an unrestricted agent that could re-run the tests in a sandbox for up to 600 seconds reached 82%. The error breakdown explains why: logical errors, where the code is partly right, fell from 17% to 3%, while syntax errors barely changed. The loop doesn't make the model better at CDK, it lets a nearly correct answer converge.
This is a short summary.Read the full article on the Builder Center, 4 min read.Read the full article
