TL;DR: AI engineering is coalescing around loops, verification, and harnesses, with conference coverage showing AI-generated code at 27.6% of merged PRs and only about 48% explicitly reviewed, according to TruFoundry's analysis of AIEWF 2026. The governance gap is no longer model quality alone, but bounded execution, auditable traces, and enforced approval paths around AI systems.
At a glance
What this is: This is an analysis of AI gateway governance that argues the operating model has moved toward loops, verification, and harnesses as AI-generated output scales faster than manual review.
Why it matters: It matters because IAM, IGA, and PAM teams increasingly need to govern agent execution paths, approval gates, and audit traces, not just model access or API credentials.
By the numbers:
- AI-generated code reached 27.6% of merged PRs at AIEWF 2026, while only about 48% of that code was explicitly reviewed before merge.
- AIEWF 2026 brought together 6,000+ engineers, 300 speakers, 29 tracks, and 100+ expo partners across four days.
Context
AI gateway governance is the discipline of controlling how AI systems act, what they can call, and what gets recorded when they do. In this article, TruFoundry frames that discipline around loops, verification, and harnesses rather than model quality alone, which is the right shift when AI-generated work is entering production workflows.
The governance gap is no longer limited to prompting or model selection. Once AI systems can plan, observe, and repeat actions inside a gateway, the control question becomes whether execution is bounded, approved, and traceable across the full run.
Key questions
Q: How should teams govern AI agents that run improvement loops across code and traces?
A: Treat each agent worker as a scoped runtime identity with least privilege, bounded execution time, and explicit separation of duties. The discovery, fix, and review steps should not share the same authority or merge path. Governance should also cover telemetry quality, because if traces are incomplete or inconsistent, you cannot reliably validate what the agent changed.
Q: Why does AI-generated output create risk even when the model seems accurate?
A: Accuracy does not equal control. Risk rises when generated output can trigger downstream actions faster than humans can review them, especially in code, deployment, or gateway workflows. The issue is not whether the answer looks right, but whether the system can act before verification catches up.
Q: What are the signs that an AI gateway is not operating effectively?
A: Common warning signs include inconsistent API behavior across providers, weak audit trails, poor visibility into who called which model, and rising costs from duplicate or repeated prompts. If teams cannot track latency, usage, and guardrail triggers, the gateway is failing its core job. A reliable gateway should provide clear observability, stable routing, and auditable request-response records.
Q: How do approval gates change AI gateway accountability?
A: Approval gates move responsibility from informal oversight to a documented decision point. They make it clear who allowed the action, what was approved, and which step was blocked. That matters when AI systems touch code, credentials, or other stateful assets that cannot be safely reversed after the fact.
Technical breakdown
Why loops change the control surface
A loop is a repeated plan-act-observe cycle, which is very different from a one-shot model response. Once an AI system can continue executing across steps, the risk surface expands from output quality to runtime behaviour, retries, and unintended persistence. In gateway terms, the loop becomes the governed object because it can create cost, side effects, and access patterns over time. The article’s emphasis on budgets, step ceilings, and stall safeguards reflects a simple fact: uncontrolled repetition turns a helpful workflow into an operational liability.
Practical implication: Treat repeated execution as a governance boundary and bound it with quotas, ceilings, and termination conditions.
Why verification has to move into the output path
Verification in this context means evaluating AI output before it is allowed to merge, deploy, or trigger downstream action. The article’s 27.6% versus 48% figures illustrate a familiar mismatch: generation is scaling faster than explicit review. That means human inspection alone cannot keep pace, especially when AI-generated code or actions are produced continuously. The control answer is not more review effort in the abstract, but a structured gate that can inspect traces, scores, and policy outcomes at the point of execution.
Practical implication: Build verification into the gateway or harness so approval happens at the point where action is taken, not after the fact.
What a harness adds beyond a gateway
A harness is the runtime wrapper that makes an AI system observable and governable. It typically combines a managed plan-act-observe loop, sandboxed execution, memory for long-running tasks, approval gates for sensitive actions, and trace collection for every step. The article’s core point is that this layer changes failure economics: you do not make the model magically safe, you make the consequences of model behaviour measurable, bounded, and reviewable. That distinction matters because many organisations still confuse model capability with operational safety.
Practical implication: Adopt a harness model that separates model output from action permission, traceability, and credential exposure.
Breaches seen in the wild
- LiteLLM MCP auth bypass 2026: An exploited LiteLLM MCP auth bypass and default sk-1234 master keys let attackers steal AI gateway master and provider API keys.
- Moltbook AI agent keys breach: Moltbook breach exposed 1.5M AI agent keys.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Loops are now the governing unit, not the model prompt. TruFoundry’s framing is directionally correct because repeated agent execution changes the thing being controlled. A single prompt can be reviewed like any other request, but a loop creates time, state, and compounding effect, which means governance has to move from content review to runtime bounds. The practitioner conclusion is that AI governance now depends on how long the system can keep acting, not just what it says.
Verification debt is becoming operational debt. The AIEWF coverage cited in the article shows a widening gap between AI generation and explicit review, which means quality control is drifting behind output volume. That is not just a software engineering issue; it is an identity and access issue whenever generated actions can call tools, touch code, or trigger workflows. The practitioner conclusion is that approval paths must be enforced where execution occurs, not where the model was trained.
Harness governance is a better mental model than model governance. The article’s strongest insight is that production safety comes from the layer around the model: sandboxing, budgets, traces, and approval gates. That is also where AI gateway teams should focus policy, because the model itself is not the enforceable control plane. The practitioner conclusion is to govern the run, not the reasoning.
Traceability is the missing bridge between AI operations and audit expectations. The article repeatedly points to per-step traces, observability, and recorded execution because those are what convert AI behaviour into something reviewable. Without that record, review becomes anecdotal and exceptions become impossible to reconstruct. The practitioner conclusion is that any gateway strategy without durable traces will struggle to satisfy audit, incident response, and accountability requirements.
Loops, verification, and harnesses describe a new identity boundary for autonomous execution. As AI systems gain delegated task ownership, the question is no longer whether they can act, but whether they can act inside a governed boundary with scoped credentials and visible steps. That boundary is where NHI, IAM, and emerging agent controls converge. The practitioner conclusion is to treat delegated AI as a governed identity class, not just a smarter application.
From our research library:
- AI-related credential leaks surged 81.5% year-over-year in 2025, with the surrounding AI infrastructure leaking 5x faster than core LLM providers, according to the State of Secrets Sprawl 2026.
- Read next: AI Agent Authorisation Guide
What this signals
Loop governance is becoming the practical boundary for AI operations. Once an AI system can continue acting, the control question shifts from prompt quality to whether the run is bounded, observable, and stoppable. That is the right lens for gateway teams because repeated execution creates risk that a single-response review model cannot see.
Verification now has to sit beside execution, not after it. The article’s central pattern is that generation volume is rising faster than explicit review. For practitioners, that means the strongest control is not a cleaner prompt, but a path where traces, policy checks, and approval gates can stop action before it propagates.
For practitioners
- Define approval gates for sensitive AI actions Require explicit human or policy approval before an agent can execute actions that change code, permissions, or external state.
- Bound loop execution with quotas and step ceilings Set hard limits on retries, task length, and cost exposure so repeated agent runs cannot continue indefinitely or silently.
- Record per-step traces for every governed run Capture prompts, tool calls, outputs, latency, and outcomes so each action can be reconstructed during review or incident response.
- Separate model output from execution permission Keep generation, evaluation, and action authority distinct so a strong model response cannot directly imply authority to act.
- Review delegated AI as a governed identity class Map which AI systems hold scoped credentials, which tools they may call, and where those credentials are brokered or revoked.
Key takeaways
- AI gateway governance is moving toward runtime control of loops, not just review of individual model outputs.
- The reported gap between generation and explicit review shows why verification cannot remain a manual afterthought.
- Harness-style controls matter because they make AI execution bounded, traceable, and approval-aware.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI02 — Tool Misuse | The article is about governing agent actions, tool use, and bounded execution in production loops. |
| ASI03 — Identity & Privilege Abuse | Delegated AI execution depends on scoped credentials and controlled authority boundaries. | |
| Recommendation — Restrict agent tool access and enforce approval gates before any high-impact action can execute. Separate agent identity from human identity and limit privilege to the minimum required run scope. | ||
| NIST AI RMF | GOVERN — AI Governance and Accountability | The article centers on governance, approval, and accountability for AI execution paths. |
| Recommendation — Establish governance ownership, approval criteria, and auditability for AI-operated workflows. | ||
| MITRE ATT&CK | TA0006;TA0040 — Credential Access; Impact | Unchecked AI execution can expose credentials and produce downstream operational impact. |
| Recommendation — Map governed AI workflows to credential-access and impact scenarios so controls target the highest-consequence steps. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The article emphasises scoped access, approval paths, and entitlement control around AI systems. |
| Recommendation — Apply entitlement checks so AI systems can only act within explicitly authorised boundaries. | ||
Key terms
- AI Gateway: A control point that sits between AI applications and the models, tools, or data they call. In practice, it can authenticate requests, enforce policy, inspect runtime behaviour, and stop unsafe actions before they spread into connected systems.
- Agent Harness: The agent harness is the runtime layer that wraps a model and turns it into an acting system. It usually includes the loop, tools, context handling, permissions, hooks, and logs. In security terms, it is often the real place where privilege sits and where identity evidence must be governed.
- Verification Path: The specific route by which an AI-generated statement is checked before it influences a decision. A strong verification path uses a trusted source, a documented process, or a human control rather than relying on model confidence or convenience.
- Loop Governance: Loop governance is the practice of controlling repeated AI execution rather than single prompt-response events. It focuses on ceilings, retries, termination conditions, and traceability, which become essential once a system can keep acting without re-prompting.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
Published by the NHIMG editorial team on August 20, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org