What the Code Review Ritual Actually Enforces When the Diff Is Agent Behavior Not Application Logic
Authorization boundaries, not correctness—that's what agent config review must actually evaluate.

Agents-as-code means defining AI coding agents through version-controlled YAML files in a version-control system, with tools, permissions, triggers, and scope subject to pull-request review. This makes the configuration an authorization document. When agent behavior is the diff, code review must govern what an autonomous system may do, what it may spend, and which controls will stop it.
Why the agent config diff is a different kind of change
A reviewer opens a pull request and finds no changes to a function, algorithm, or application branch. Instead, the YAML adds shell_exec to an agent’s existing read_file and write_file tools. The diff is small, but the decision is not. The reviewer is being asked to expand the capabilities of a system that can act autonomously, repeatedly, and without another prompt.
In a traditional application review, the reviewer asks whether the instructions do what they should when the program runs. Agent configuration review asks whether the system has been granted appropriate authority in the first place. Tools, triggers, scopes, credentials, model version, and context limits define the envelope within which it operates. A permission error can therefore go unnoticed even if the YAML file is valid and clearly states what the agent should do.
This is the structural change captured by the agentic SDLC framing, in which context becomes the primary unit moving through the pipeline. The configuration supplies the context that bounds downstream actions. Reviewing it as implementation detail misses the decision encoded in the changed lines.
What reviewers are actually authorizing when they approve an agent config
The tool fields authorize which external systems and shell capabilities the agent can invoke. Each tool introduces an attack surface if it is misused or reached through injected instructions. MCP connections extend that decision to the resources a server exposes, including databases, file systems, cloud APIs, and internal services. One added connection can substantially expand the agent’s reach. Approval therefore covers the resources behind the connection.
The trigger fields authorize when that reach can be exercised. They define which events start autonomous execution and whether unintended inputs can activate the agent at unintended times. Credentials and scopes then establish the identity under which it acts and the resources it may read, write, or modify. These are separate grants. Even with the right trigger, credentials can give the agent more access than the task needs.
Model version and context limits determine which model performs the work and how much history it receives. Both affect behavior and cost in ways that may not be visible in the output. Budget parameters complete the authorization by setting per-session or per-run spending limits. Without an explicit cap, the configuration defines no spending boundary.
Instructions describe how the agent should behave, while enforced policies restrict what it can do. Approval of the instructions alone does not authorize the complete operating envelope.
Why most review cultures are not built for this kind of diff
Most code review practices train attention on correctness, maintainability, and application behavior. Permission review asks a different question: whether the agent has the right limits on what it can do. That question demands knowledge of credential scope, tool access, and runtime enforcement. Familiarity with the application is not enough. A reviewer may understand the agent’s task without understanding the authority granted to perform it.
The visual form of the change compounds this mismatch. YAML diffs often contain only a few changed lines, making them appear less consequential than a substantial code change. Adding shell execution can require more scrutiny than rewriting a function, even when the configuration change is easier to read.
Faros AI found that reviews took much longer in teams that used AI heavily. When agent-generated output enters an unchanged review process, the resulting bottleneck creates pressure to approve quickly. Repeated interactive permission requests produce a related problem when developers resort to “Allow all.” Approval fatigue does not distinguish between a permission dialog and a pull request.
Reviewing application code and evaluating an autonomous agent’s permission envelope involve different threat models and expertise. Teams that do security review also have to keep up with the extra output. The mismatch is structural, so its correction requires changes to review assignments, required checks, and merge rules.
The regulatory and compliance weight now sitting on the reviewer's approval
An agent configuration approval creates a record of who authorized a capability change. In regulated settings, that record has to support more than an engineering judgment about readability or correctness. It must explain the permission decision. An auditor examining an agent-related incident will look for a documented review gate connecting the configuration change to a reviewer, a timestamp, and a rationale.
The EU AI Act’s Annex III high-risk obligations are set to take effect December 2, 2027, after the AI Omnibus regulation pushed back the original August 2, 2026 deadline. Colorado’s AI Act, as revised by SB 26-189, is scheduled to become enforceable on January 1, 2027. These dates apply only to agent deployments covered by the laws in question. They nevertheless make governance design an operational concern for teams within scope.
SOC 2 auditors are already incorporating AI agent controls. Year-one compliance costs for AI agent infrastructure run from $35K to $250K+ in 2026, but expenditure alone does not establish a defensible control. The approval record still needs substance. A reviewer who does not understand the permission implications cannot honestly attest that those implications were evaluated.
For that reason, “LGTM” is insufficient evidence for an agent configuration change. The comment needs to identify what was examined and why the grant was appropriate. Otherwise, the approval records only that someone clicked a button, leaving the organization’s exercise of its claimed control unverified.
Cost authorization as a first-class part of the config review
In November 2025, four agents entered an infinite loop, ran for nearly two weeks, and accumulated a $47,000 bill. The charge became visible in the bill only when the billing cycle closed. The spending had already happened by then. This is the concrete failure behind treating an agent configuration without budget parameters as a blank check.
Agent execution can grow through recursive loops, too many queries to connected systems, and sending the full conversation history over and over. Agentic workflows consume more tokens per task than standard chat interactions, while multi-agent architectures compound that consumption. A configuration that appears affordable in a single-agent pilot can therefore behave very differently at fleet scale. Uber’s late-2025 deployment to a large engineering fleet exhausted its entire 2026 AI budget by April.
The review consequence is specific. Budget fields belong in the authorization decision, including per-session limits, per-run model routing rules, context limits, cache strategy, and circuit-breaker conditions. An absent field is a finding to resolve.
Monitoring reports what has been spent, while enforcement intercepts execution before the next API call. Only the latter can stop a runaway agent from continuing to spend. A configuration without an enforced spending limit should therefore be blocked before approval, rather than accepted on the assumption that a billing dashboard will provide protection.
What a governance-grade review of an agent config actually looks like in practice
A governance-grade review evaluates each capability against the agent’s stated role. The tool allowlist must contain only necessary capabilities, with explicit justification for shell_exec and minimum resource scope for MCP connections. Trigger review examines both the intended events and the possibility of unintended activation. Destructive actions require a human approval step. These checks evaluate the path from activation to effect, rather than treating each field as an isolated setting.
Credential review establishes which identity the agent assumes and checks credential persistence, sharing, session scope, and revocation on completion. Budget review checks spending limits, context limits, circuit breakers, and model routing. Merge authority requires its own examination because the ability to propose a change is different from the authority to put it into a protected branch. That design convention still requires verification of a configuration-enforced restriction.
Version review checks that model version, policy SHA, and prompt template SHA are pinned. Pinning makes the reviewed configuration identifiable for audit purposes. Sandbox review then examines the isolation profile provided by containers, microVMs, or gVisor-augmented containers against the agent’s privileges. Process count limits such as --pids-limit are also reviewable controls because they prevent runaway fork bombs from agent-generated shell scripts.
Clear instructions do not repair an overbroad tool grant. Conversely, a restrictive sandbox does not establish that a trigger or credential scope is appropriate for the assigned task.
How the review gate fits into the broader governance infrastructure the config describes
A reviewed configuration offers protection only when the runtime enforces its restrictions. Session-scoped credentials in YAML offer no such protection if the agent runs with persistent shared credentials. A budget limit likewise needs an enforcement layer to work. The review gate cannot put those mechanisms in place on its own. Its authorization is conditional on the infrastructure behaving as the configuration describes.
Sandbox design is therefore a governance artifact. Tool-call isolation, fresh credential minting and revocation on completion, and a runaway agent’s ability to affect other sessions or production systems depend on it. To assess the agent’s privileges, the reviewer needs to know those boundaries.
Observability supplies the corresponding evidence after execution. The audit trail must make the agent’s actual actions comparable with what the reviewed configuration permitted. That requires model, agent, and policy versions, together with the corresponding model identifier, agent build SHA, policy SHA, and prompt template SHA. These references connect execution to the reviewed artifacts. Without that connection, an approval record cannot establish which configuration governed a particular run.
A team that runs agents on a laptop or generic CI runner has to handle isolation, credential lifecycle, budget enforcement, and audit logging itself, with no guarantees built into that environment. A managed platform shifts that burden to infrastructure with designed-in controls. The relevant comparison is therefore the enforcement each environment provides.
What engineering teams need to change about how they treat agent config PRs
Starting with the next configuration pull request, teams should assign reviewers who understand credential scoping, tool authorization, and runtime enforcement. This follows the same logic that routes infrastructure-as-code changes to platform engineers. Agent configuration is infrastructure code. Review ownership should reflect the permissions being granted.
Teams should also make the governance checks explicit and required in the pull-request template. Tool authorization, trigger safety, credential scope, budget enforcement, merge authority, and version pinning should not depend on individual memory. Configuration changes should be separated from application changes so that the authorization decision remains visible. This also gives the audit record an unambiguous subject.
Approval comments should say what was checked, including the tool scope, budget fields, and trigger conditions. Missing per-session spending limits, context limits, or circuit-breaker conditions should block the change until the reviewer verifies that the missing controls are in place.
Engineering leaders must reinforce that standard through review assignments and merge policies. A mandatory template will accomplish little if approval still means only that the file looks reasonable. The cultural change is to treat the reviewer’s action as a grant of authority. An agent configuration should merge only when the organization is prepared to stand behind what it permits.


