Do AI Coding Agents Write Infrastructure as Code Like Humans? An Empirical Study of GitHub Pull Requests
Abstract
Infrastructure-as-Code (IaC) configurations define cloud resources, networking, and access control, and AI coding agents increasingly write them. Little is known about how agent contributions differ from those of humans and automation bots, how maintainers evaluate them, and whether they introduce different sustainability concerns. We study 349,156 IaC pull requests (PRs) from 49,241 GitHub repositories, distinguishing humans, automation bots, silent agents, and disclosed agents. Bots account for 32.9% of ostensibly human PRs, and 12.3% of the remaining PRs contain agent traces, a share that grows over the study period. Agent PRs are about four times larger than human PRs and more often modify core infrastructure modules, whereas bots mainly maintain dependencies. Silent-agent PRs have higher overall merge rates than human PRs (87.4% vs. 78.9%) but are merged 4.0 percentage points less often within the same repositories. Disclosed agents create new infrastructure more often than humans (34.0% vs. 21.4%), and even for the same change type within the same repository, their PRs are 8.4 points less likely to be merged; silent-agent PRs show comparable acceptance for most change types. Finally, in 2,645 matched agent-human Terraform PR pairs, agent and human PRs introduce sustainability smells at similar rates (10.4% vs. 10.3%; paired odds ratio 1.02, 95% CI 0.83-1.25), most commonly missing remote state and monolithic configurations.
Create a lesson
Related papers
Testing with Coding Agents: A Large-Scale Comparison of Agent-Supported and Human-Authored Pull Requests
Shared title terminologycs.SERoberto Milanese, Francesco Salzano, Hovhannes Muradyan et al.
Can Coding Agents Write and Transpile Unit Tests
Shared title terminologycs.SEGil Pasternak, AJ Langley, Tom Yotam et al.
Is This Code Mine? Student Ownership When AI Agents Write the Spec and the Code
Shared title terminologycs.SEGustavo Pinto, Enne Rebeca Silva de Freitas, Danilo Monteiro Ribeiro
PR4Code: A Pull Requests Dataset for AI Code Generation
Shared title terminologycs.SEBenedetta Donato, Leonardo Mariani, Daniela Micucci et al.
An Empirical Study of Visual Artifacts in Pull Request Descriptions
Shared title terminologycs.SETianzi Hao, Kazi Amit Hasan, Yuan Tian et al.
Hidden in Plain Sight: an Empirical Study about The Instruction Stacks of Coding Agents
Shared title terminologycs.SEFelipe de Sant'Anna Paixão, Dhyego Tavares, Eduardo Almeida et al.