← All insights

27 October 2026 · 7 min read

Your AI Agent Fixed It — But What Else Did It Change?

Trail of Bits found 21 regressions in 130 AI-patched PRs. For GCC ops teams, that ratio exposes a governance gap that workflow automation alone can't close.

Editorial illustration — Your AI Agent Fixed It — But What Else Did It Change?

Key takeaways

  • Trail of Bits found 21 regressions — 16 functional, 1 performance, 4 build/test — across 130 AI-authored patches, with none caught before engineer review.
  • AI agents in enterprise workflows operate across data access, orchestration, identity, audit trails, and architecture — a gap in any single domain surfaces as an untracked change.
  • Standard server logs record that an API call occurred but cannot explain why an agent chose one action over another, leaving root-cause analysis blind.
  • A governed agent layer requires dual audit trails — one for what the agent did and one for why it chose that path — before any GCC workflow automation scales beyond pilot.

An AI agent closes a vulnerability in your procurement workflow at 2 a.m. By 6 a.m., three downstream approval rules have shifted, a supplier notification template is pointing at the wrong environment, and your ops manager is staring at an exception report that didn't exist yesterday. Nobody logged the pivot. The agent did exactly what it was told.

This is not a hypothetical. It is the operational pattern that Trail of Bits documented when they audited their own AI-authored patches — and the implications for GCC enterprise teams running workflow automation are more serious than the security community has acknowledged.

What the Trail of Bits finding actually shows

Trail of Bits published results from their Patch the Planet initiative — a joint programme with OpenAI to accelerate security patching for widely used open-source projects. When they reviewed every patch an agent authored and a maintainer merged, they found 21 regressions across 130 merged pull requests: 16 functional, one performance, and four build/test failures. [1]

None of these regressions broke a security protection. But that framing should not comfort enterprise buyers. Every one of them was introduced by an agent that was performing its assigned task correctly. The agent fixed the bug it was asked to fix. It just also changed something adjacent — something nobody asked it to change, something no automated check caught before an engineer reviewed it manually.

The regression-hunt plugin Trail of Bits built specifically to address this problem produced 25% fewer false-positive findings than a baseline agent prompted to simply "review the PR for regressions." [1] That improvement is real. It is also a reminder that even a purpose-built quality check, designed by a security firm with thousands of agent sessions of experience, still produces false positives and requires human review.

The Hacker News discussion that followed surfaced the underlying engineering reality clearly: instructions alone are insufficient. One engineer described rebuilding their system around algorithmic checks that fingerprint code segments to verify that every task affects only the area it is supposed to, with additional layers of verification stacked on top. The confidence came not from trusting the model but from constraining it. [2]

That is the reframe GCC operations teams need to internalize before their next workflow automation deployment.

Why enterprise workflows amplify the blast radius

A regression in a sandboxed code repository costs an engineering sprint to fix. A regression in a live enterprise workflow — one connected to your ERP, your WMS, your supplier portal, and your finance approval chain — costs something harder to measure and harder to reverse.

Consider a typical mid-size Gulf trading operation: seventeen spreadsheets feeding a single ERP instance, WhatsApp threads as the de facto approval layer, and customs documentation that must clear Jebel Ali on a fixed weekly cycle. Drop an AI agent into that environment and ask it to automate invoice matching. The agent matches invoices. It also adjusts a field mapping that was compensating for a known data quirk in the supplier master. The compensation disappears. The quirk re-emerges. Forty invoices go to manual exception. The Ramadan freight cutoff passes.

The agent did not make an error by its own logic. It made a change that was invisible to every layer of logging anyone had thought to implement.

This is why governance at enterprise scale requires controls across five distinct domains before any agent deployment leaves the pilot stage: data access, workflow orchestration, identity and permissions, audit trails, and architectural flexibility. A gap in any single one of those domains is sufficient to surface in the next audit cycle, regulatory review, or operational incident. [4]

The four changes an agent makes that nobody logs

Standard server logs are designed to record that an API call occurred. They capture inputs and outputs. They do not capture reasoning. That gap produces four categories of invisible change in typical workflow automation deployments.

1. Data scope drift. An agent granted access to the data it needs for Task A will, in many implementations, retain access to adjacent datasets it does not need for Task A but that its model finds contextually relevant. The action log shows a read. It does not show that the read influenced a downstream write that was never in the task specification.

2. Compensating logic removal. Enterprise systems accumulate workarounds. A field that should contain a vendor code contains a concatenated vendor-code-plus-site-identifier because someone patched it three years ago and the patch stuck. An agent normalising that field for consistency removes the workaround. The log shows a write. It does not flag that the write destroyed a load-bearing patch.

3. State assumptions. Agents operate on the state of a system at the moment of execution. If that state was expected to be temporary — a hold placed on a supplier account pending a dispute, for example — the agent may resolve the hold as part of a broader task completion without any explicit instruction to do so. The log shows a status change. It does not show that the status change was out of scope.

4. Tool invocation order. In multi-step workflows, the sequence in which tools are called matters. An agent that completes the same task with a different tool order may produce the same output while leaving intermediate states that other systems are reading. The output log is clean. The intermediate state is not.

None of these changes is visible in a standard audit log. [3] All of them are normal behaviours for a capable agent operating without explicit constraints. The distinction between "the agent worked" and "the agent worked correctly" requires a layer of visibility that most GCC operations teams have not yet built.

What a proper agent governance layer looks like

The governance requirement is not exotic. It is engineering discipline applied to a new class of actor in your system. The components are known.

Dual audit trails. One trail records what the agent did — every tool call, every data access, every state change, with timestamps. A second trail records why: the reasoning path, the data sources consulted, the alternatives considered, the triggering condition. [3] Without the second trail, the first is a list of facts without context. Root-cause analysis after an incident becomes archaeology.

Scoped identity. Each agent should operate under a service account with permissions bounded to the task at hand. An invoice-matching agent should not have write access to the supplier master. An agent that generates purchase orders should not be able to approve them. These are not novel security principles; they are standard least-privilege access controls applied to a non-human identity. [4]

Deterministic guardrails at task boundaries. Before an agent begins a task, the system should fingerprint the state of every data object the task will touch. After the agent completes the task, the system compares actual changes against the expected delta. Changes outside that delta trigger a hold for human review, not automatic propagation. This is the architectural pattern the engineer in the Trail of Bits discussion described building from scratch — and it is the pattern that should be standard in any governed deployment. [2]

Regression checks as a first-class workflow step. Trail of Bits built regression-hunt specifically because regression checking was not happening as a matter of course. [1] Enterprise workflow automation teams should treat regression testing of adjacent system behaviour as a mandatory gate, not an optional post-deployment activity.

Architectural independence. Governance infrastructure should not be built on the same vendor stack as the agents it governs. If your orchestration layer, your audit trail, and your guardrails all depend on a single model provider, a model deprecation or API change can simultaneously disable your agents and your ability to audit what they did. [4]

This kind of layered approach is also what we walk through in our how-to guide on auditing AI agents before trusting them with operations, and it connects directly to the governance questions raised in our piece on what Gulf operators need to decide about SAP's autonomous enterprise.

Tarsyn's view: automate the task, audit the system

We work with Gulf operators who are under genuine pressure to automate. The competitive case is real. The efficiency gains are real. We are not here to slow that down.

But we have also seen what happens when an organisation deploys an agent layer on top of a process that was never fully mapped — when the workflow automation project begins before anyone has documented what the system's current state actually is, including the seventeen compensating hacks that keep it running. Multiply chaos by intelligence and you get articulate chaos. The agent will do it faster and with better grammar.

The Trail of Bits finding is useful precisely because it came from a rigorous team doing careful work on a constrained problem — security patching — with dedicated regression-checking infrastructure. They still found 21 unintended changes in 130 tasks. [1] That is not a failure rate. It is a baseline. It is what a capable agent, operating correctly, produces when the system around it is not designed to catch the difference between "task complete" and "system unchanged."

For GCC operations teams, the question is not whether to automate. It is whether the governance layer is in place before the automation scales. That means a proper audit of the system before the agent touches it — not after. Our Tarsyn Audit is designed for exactly this: mapping what your operations actually do (including the compensating logic nobody documented), then designing automation that can be observed, constrained, and reversed.

The agents are capable. The question is whether your oversight is.

For more on what happens when agents operate without adequate controls, see our analysis of the Slack data leak and enterprise AI liability and our broader take on why enterprise AI now needs an evaluator layer, not just a vendor.

Your AI Agent Fixed It — But What Else Did It Change? — the numbers at a glance

Frequently asked questions

What did the Trail of Bits AI patching research actually find?+

Trail of Bits reviewed every AI-authored patch merged through its Patch the Planet initiative and found 21 regressions across 130 merged pull requests — 16 functional, one performance, and four build/test failures. None broke a security control, but all were introduced by agents acting correctly on their assigned task while inadvertently breaking adjacent behavior that engineers then had to catch manually.

Why do enterprise workflow automation projects face higher risk from AI agent errors?+

Enterprise workflows sit inside interconnected systems — ERP, WMS, approval chains, supplier portals — so a change an agent makes to one node propagates downstream before anyone reviews it. A regression that's trivial in a sandboxed code repo can trigger a cascading hold on a Jebel Ali customs clearance or duplicate a payment run. The blast radius scales with system integration depth, not with agent sophistication.

What should an AI agent audit trail log that standard server logs miss?+

Standard logs record that an API call occurred and what its inputs and outputs were. A proper decision trace captures the reasoning path: which data sources the agent consulted, which tools it invoked and in what order, which alternative actions it considered and rejected, and what the triggering condition was. Without that reasoning chain, root-cause analysis after an incident is essentially guesswork.

What governance domains must be in place before scaling AI agents in operations?+

Enterprises need controls across five domains before scaling: data access (agents should reach only the data the task requires), workflow orchestration (tasks should be scoped and sequenced deterministically), identity and permissions (service account boundaries per agent), dual audit trails (action log plus reasoning log), and architectural flexibility so a single vendor's model failure doesn't freeze the whole operation.

Sources

  1. 1. AI agent fixed the bug, but what else did it change? — hn:niche
  2. 2. AI agent fixed the bug, but what else did it change? (discussion) — Hacker News
  3. 3. AI Agent Audit Trails Explained: The Missing Layer of Enterprise AI Governance — www.miniorange.com
  4. 4. How to Govern AI Agents at Enterprise Scale | Elementum — www.elementum.ai
MZ

Mohammed Z

Founder, Tarsyn

Mohammed builds the systems behind modern businesses — automation, AI decision layers, and the unglamorous plumbing that makes them work. He founded Tarsyn in Abu Dhabi.

How Insights is produced

Find out where your operation actually stands.

The AI Opportunity Audit maps your workflows, your data, and your decision bottlenecks — and tells you honestly whether AI is worth it yet.

Start the audit

← اقرأ هذا المقال بالعربية