arXiv:2610.34613cs.SEOct 2026

Manuscript Offprint

arXiv:2610.34613

Do AI Coding Agents Write Infrastructure as Code Like Humans? An Empirical Study of GitHub Pull Requests

Amine Barrak, Emna Ksontini, Charles Wehbe

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Amine Barrak

Oakland University

aminebarrak@oakland.edu

Emna Ksontini

University of North Carolina Wilmington

ksontinie@uncw.edu

Charles Wehbe

Oakland University

cwehbe@oakland.edu

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.

Index Terms—Infrastructure as Code, AI coding agents, automation bots, authorship, pull requests, empirical study

I. INTRODUCTION

Deploying software requires dependable infrastructure: compute, networks, storage, identities and access policies, scaling rules, and persistent state. Infrastructure-as-Code (IaC) specifies these resources as versioned configurations, so that tools such as Terraform, Ansible, and CloudFormation can provision them automatically and repeatably as part of continuous integration and delivery [1]–[3]. Unlike an ordinary code edit, an IaC change can open a network path, grant a permission, or provision costly resources once it is applied [4], [5]. Such changes reach a project through pull requests (PRs), so each IaC PR is both a proposed change to the infrastructure and a review decision about whether to accept it.

Automating deployment does not remove the consequences of configuration choices. A configuration fixes the characteristics of the resources it provisions, and these may keep consuming resources long after the change: an oversized instance type, a fleet of fixed size without autoscaling, logs retained indefinitely, Terraform state kept on a local disk, or all resources of a system in a single file. Kosbar and Hamdaqa [6] catalogue such decisions as sustainability smells in IaC and show that whether a smell is wasteful depends on context. A detected smell is therefore an indicator in the configuration, not a measurement of energy, cost, or waste.

The growing adoption of AI coding agents introduces a new dimension to infrastructure automation: beyond automatically provisioning resources, developers can use AI agents to generate and modify the configurations that govern those resources. AI coding agents such as Claude Code, GitHub Copilot, OpenAI Codex, Cursor, and Devin participate in IaC development, while research has begun exploring their integration into the IaC and DevSecOps lifecycle [3], [7]. Some contributions are explicitly attributed to agents, whereas others are submitted under developer identities, leaving agent involvement visible through commit-level traces [8], [9]. Traditional automation bots, such as Dependabot and Renovate, further complicate attribution because their contributions are often counted as human activity [10]. Consequently, identifying who produces infrastructure changes requires distinguishing humans, traditional bots, and both disclosed and silent AI agents.

Despite growing interest in AI coding agents, their implications for real-world IaC development remain insufficiently understood. Identifying who contributes is only the first step: we also need to understand which infrastructure operations agents perform, how maintainers evaluate their changes, and whether these changes introduce potential resource-efficiency concerns. Existing research has examined the acceptance and rejection of agent-generated PRs [11]–[13], evaluated the correctness and security of LLM-generated IaC through benchmarks [14]–[16], and investigated IaC smells without distinguishing human and AI-agent contributions [4], [6], [17], [18]. However, these studies examine separate aspects of infrastructure development. In particular, it remains unclear whether agents perform the same kinds of infrastructure changes as human developers, whether differences in their acceptance persist when accounting for change types and repository context, and whether agent-generated changes introduce different sustainability-smell patterns. Addressing these questions requires connecting contributor provenance, change semantics, review outcomes, and sustainability within real-world IaC repositories.

We address this gap through a large-scale observational study of 349,975 IaC pull requests from 49,241 GitHub repositories opened between January 2025 and May 2026. Our main contributions are:

• Authorship and participation. We distinguish four contributor populations across 349,156 labeled PRs. Automation bots account for 35.8% of ostensibly human PRs, while silent-agent PRs, despite higher overall acceptance, are merged 4.0 percentage points less often than human PRs within repositories.

• Infrastructure changes and acceptance. Using an IaC-specific taxonomy and human-audited annotations, we find that disclosed agents create new infrastructure more frequently than humans (34.0% vs. 21.4%). Their within-repository acceptance deficit persists after adjusting for change type (8.4 percentage points).

• Sustainability implications. Across 2,645 matched agent–human PR pairs modifying AWS Terraform configurations, we find no statistically detectable difference in sustainability-smell introduction (10.4% vs. 10.3%; paired odds ratio 1.02, 95% CI 0.83–1.25).

Replication Package. Our data, codebook, prompts, and analysis scripts are available in the replication package [19].

References (34)