TerraRepair: Tool-Grounded LLM Agent Improves Infrastructure-as-Code Repair
Jul 14, 2026
TerraRepair is a prototype large language model (LLM) agent that leverages tool grounding to repair Terraform misconfigurations identified by Infrastructure-as-Code (IaC) scanners. By retrieving dependency context, consulting provider schemas, and re-running scanners, TerraRepair significantly increases fix rates on AWS benchmarks—from 26.6% to 78.4% with Checkov and from 44.8% to 72.4% with Trivy—compared to a one-shot baseline. The agent also escalates issues when deployment-specific context is missing, reducing the risk of hallucinated fixes.
Why it matters: This work demonstrates that tool grounding can substantially improve the reliability and effectiveness of LLM-based automated repair for cloud infrastructure code, potentially reducing manual intervention.
Full story at: arXiv Software Engineering ↗