Who changed the AI agent’s rules?

Image: illustration made with Claude for this post

We spend a lot of time measuring what AI coding agents produce. Does the code compile, do the tests pass, how fast does the PR get merged? It’s been a trend in software metrics to trace such simple ones and see what they give. At the same time, when the software gets increasingly often written by AI, we need to understand whether AI is not “fooling” us by changing the way in which our CI/CD pipelines work.

An agent that edits .github/workflows/deploy.yml is not changing the behavior of the software. It changes the mechanism that decides which future changes get through, so it introduces risk. If it removes a required reviewer, every PR after that, human or agent, is judged by the new, weaker rules. I call this authority escalation, and in my new paper I tried to measure it.

Link to the paper: https://tinyurl.com/bdexj7dw

Data plane and control plane

I borrowed the terms from telecom. The data plane is the normal work: features, bug fixes, tests, dependencies. The control plane is everything that configures the pipeline itself: workflows, approval gates, permissions, secrets, deployment policies.

To compare the two I defined a joint penalty metric, P(M). It combines execution cost (how much effort and review time a PR takes) with governance risk (was it rejected, was it merged without a real approval gate, was it merged despite failure signals). Control-plane changes get an extra structural premium, because they affect everything that comes after them. The metric can be computed from standard PR metadata, so it can run as a pipeline check.

Then I applied it to all 932,791 agent-authored PRs in the AIDev dataset. That covers five agents: OpenAI Codex, GitHub Copilot, Cursor, Devin, and Claude Code.

What I found

Only 4% of the PRs touch the control plane. That sounds small, but it is more than 37,000 PRs. And they are where the risk is:

  • Control-plane PRs have a 2.3× higher joint penalty and a 3.9× higher governance risk than data-plane PRs.
  • All 775 PRs in the extreme-risk range (P(M) > 0.8) modify the control plane. Not a single data-plane PR gets there.
  • 63.6% of the merged control-plane PRs carry a policy-violation flag. They were merged either despite failure signals or in under five minutes, too fast for meaningful review.

The agents also differ significantly. Cursor has the lowest mean penalty (0.166) and Copilot the highest (0.328). The share of control-plane PRs ranges from 2.1% for Codex to 27.1% for Claude Code. The most interesting pair is Cursor and Codex. They have almost the same execution cost but differ by 2.6× in governance risk.

And here is the part that I think matters most for practitioners: execution cost and governance risk barely correlate (r = 0.17). The merge rate doesn’t tell you much either. Codex has the highest merge rate and only mid-range risk. So a quick, cheap, green PR can still remove your approval gate. Your usual CI/CD dashboard won’t show it.

What to do about it

Three things that I would recommend:

  1. Classify every agent-authored PR as data plane or control plane. Even simple keyword matching works reasonably well. My classifier agreed with manual labeling with Cohen’s κ = 0.72.
  2. Require human approval for every control-plane change, no matter how small it looks.
  3. Calibrate the authority policy per agent. One policy for all agents won’t fit because agents work very differently. Even the same LLMs, when equipped with different harnesses for code production, will try to change the rules differently.

The model is a first version. The weights and thresholds need calibration in industrial settings, and file-level data would improve classification. That’s what I’m working on next. But even now, a single compound metric can find the PRs that change the rules of the game, and as agents take over more of the pipeline, that is worth watching.

Author: Miroslaw Staron

I’m professor in Software Engineering at Computer Science and Engineering. I usually blog about interesting articles (for me) and my own reflections on the development of Software Engineering, AI, computer science and automotive software.