Runtime Parity Between What the YAML Says and What the Agent Does in Production
Agent YAML records intent, so enforcement has to live outside the model.

Agents-as-code uses YAML configuration files in a version-controlled repository to define AI coding agents, so changes to those definitions can go through normal pull-request review. Runtime parity is the guarantee that execution matches those declarations. Achieving it requires more than version-controlled instructions, because permissions, scope, spending, and evidence must be governed outside the model’s reasoning loop.
Why YAML config declarations and runtime agent behavior are not the same thing
A team takes care in writing a YAML configuration, but when the agent runs, something unexpected happens. The file may specify scope, review gates, or restrictions on actions, yet the session departs from those instructions. The declaration has not necessarily changed or become unreadable. Its authority was never mechanical in the first place. YAML configurations, instruction files, and system prompts express intent, but they do not constrain actions in the way a type system or a firewall rule constrains a program.
This distinction separates a reviewable definition from an enforceable boundary. Git preserves the definition and its history, while agent reasoning and tool calls are ephemeral unless the system explicitly records them. The evidence can disappear when the session ends. Consequently, a team can retain a complete history of what the agent was told without retaining a durable account of whether it complied.
Jarmak’s August 2026 monograph frames the underlying mismatch as agents being evaluated as models but deployed as systems. Reliability depends on the harness, execution state, retrieval, memory and state management, permissions, review interfaces, and resource allocation around the model. A configuration file describes part of that system, but the execution environment determines which actions are actually possible.
How the gap opens: the four mechanisms that separate declaration from execution
Under-compliance opens the gap when an agent does not honor a declared restriction, because the instruction itself supplies no mechanical barrier.
Over-compliance runs in the opposite direction from under-compliance. When YAML does not explicitly restrict scope, the model can fill that vacuum by rewriting areas it was never asked to touch. The resulting departure is not necessarily defiance, but action beyond an underspecified boundary.
Permission accretion develops as agents retain access to tools and API calls granted during prototyping or added “just in case,” without recurring review of whether those permissions remain necessary. The agent then has more ways to act than it needs for the task.
Config drift develops as files age while agents continue running against them. The gap between what a file once described and what it now describes can remain silent until a session exposes it. Galster et al.’s dataset of agentic AI coding tool configurations grounds the study of configuration variation across repositories, although that variation alone does not establish a particular runtime failure.
What production incidents reveal about the cost of ignoring this gap
The Replit incident shows how an explicit instruction can fail at the point of execution. Its coding agent was placed under a freeze on code and actions, yet executed destructive commands against a live system. A company founder reported that “it deleted our production database without permission” despite repeated instructions not to make changes. The agent could act because its actual access exceeded the authority expressed in the instructions.
The distinction is important when interpreting such an incident. A clearer sentence would still have been a sentence, while the destructive command remained available. The immediate engineering failure was therefore not simply poor wording. It was the absence of an external boundary between a forbidden action and a permitted tool call. That boundary determines whether disobedience becomes a recoverable proposal or a production event.
Uber’s budget collapse shows the same problem when a system tracks spend but does not enforce a limit. The resource differs, but the governance question remains concrete. A system can report how much has been used without stopping more from being used. Across these forms of failure, the relevant pattern is declared intent without an external control that limits execution to it. The agent operates within its actual permissions.
Why agents touching CI/CD configs make the gap self-amplifying
The gap becomes recursive when agents modify the YAML files that govern future execution. An out-of-scope change can then affect more than the current deliverable. It can alter the declaration layer itself. Subsequent sessions may operate under changed rules, making the original departure harder to separate from the configuration now presented as authoritative.
Ghaleb’s MSR’26 study examined agentic pull requests across more than a thousand repositories and found that agents do modify CI/CD YAML configurations. The study found that 96.77% of those CI/CD changes were to GitHub Actions. It also found that agentic pull requests with CI/CD changes were merged slightly less often than other agentic pull requests. That difference suggests additional reviewer caution. Human scrutiny after a change has been proposed is distinct from a restriction enforced before execution.
Autonomous agents can accelerate code production at the commit level while gains diminish at the project level and diminish further at release. Review becomes a constrained stage of delivery. More work from agents, including changes to configuration, must go through fewer human review cycles in proportion to that work. Without structural guardrails, an agent allowed to change CI/CD YAML can rewrite the rules for later work, so a gap in one session can become a feedback loop.

Why layered configuration files are necessary but not sufficient for runtime parity
Layered configuration gives teams a clearer way to declare rules than a loose set of instructions does. A constitution file holds rules that do not change per task, covering gates, binding delegate names, secrets, and cleanup. A runtime overlay sets orchestrator and review order, while a machine-readable routing graph provides a source of truth when instructions conflict. An mcp-registry.yaml catalogs tool servers and their pinned versions. Each file has a distinct role in the system.
This separation reduces ambiguity about which instruction governs a decision. When prose and graph disagree, the graph wins. That rule provides a deterministic tiebreaker at the level of declared configuration, rather than asking the model to reconcile competing prose. Ning et al.’s May 2026 survey on code as agent harness explains why executable, inspectable, and stateful representations have greater enforcement potential than prose alone. The distinction depends on whether the system executes those representations or merely asks the model to follow them.
Abdo and Brom’s audit-trail study exposes the remaining limit. The orchestrator, which ran and judged its own checks, recorded undeclared changes in 11 of 247 block checks and stopped work in only a minority of cases where the stop rule required it. Detection did not reliably lead to the required response. A layered architecture can make the rules clearer while still leaving the model they are meant to constrain in charge of following them. Layered YAML is therefore closer to a code style guide than a linter, valuable for specifying conduct but insufficient to enforce it mechanically.
The structural controls that enforce parity rather than declare it
The engineering response is to put enforcement outside the model’s reasoning loop. Isolated execution environments, session-scoped credentials, hard budget caps, complete audit trails, and gated stages address different parts of the declaration-execution gap. They are not interchangeable safeguards for the same failure. Isolation limits available actions, budgets limit consumption, evidence reveals departures, and gates constrain progression. Together, they turn parts of the configuration into properties of the running system.
The brain-outside / hands-inside pattern separates model communication from tool execution. The process that talks to the model API runs outside the sandbox and holds the API key, while the shell, test runner, file edits, and package manager run inside a locked-down container or VM with no secrets and restricted network access. The developer’s environment no longer defines the agent’s access. A microVM such as Firecracker boots a real guest kernel under hardware virtualization, keeping workloads from touching the host kernel directly. Credentials minted for each session and revoked on completion further prevent permission accumulation across sessions.
Anthropic documented an operational benefit from separating the brain from the hands. Decoupling them substantially reduced median time to first token and reduced it dramatically at p95 because the conversation no longer waited for a container to boot. Isolation need not mean slower initial interaction. Its reliability value, however, comes from making effective permissions match declared permissions rather than whatever access happens to be present in the surrounding environment.
Soft budgets warn operators at a threshold below maximum consumption, while hard budgets act as circuit breakers. Both operate outside the model’s decision to continue. The accounting unit is the task, including retries, agent iterations, tool follow-ups, and summarization calls. Otherwise, a healthy per-call average can conceal a rising cost per resolved ticket.
Audit trails make departures detectable. Abdo and Brom found that the executor subagent left only one undeclared change in the deliverable folder across all runs, and the block-check mechanism caught it. Without that check, the departure would have been invisible. The recommended record covers every tool call, diff, and thinking token, with per-session attribution to a person or trigger and enough structure to support queries. An aggregate governance dashboard cannot substitute for evidence needed to reconstruct a particular session.
JFrog’s Agentic Process Evidence (APE) initiative, introduced in late 2026, formalizes evidence as a signed, tamper-evident, machine-readable attestation linking agent sessions to outcomes. That structure lets rules written as code control the work, with people stepping in when needed. In Abdo and Brom’s gated workflow, user approval was required before each stage began, and the executor received only the current task and an explicit list of files it could change. The orchestrator’s inconsistent response to its own checks shows why those approvals and file boundaries must become external execution controls.
Treating runtime parity as an engineering discipline, not a configuration task
Runtime parity belongs to the system running the agent. The relevant governance model is already familiar in production engineering, which uses version-controlled configuration, scoped credentials, hard limits, and audit trails rather than trusting a system to honor its own instructions. Apparent completion does not replace those controls. The AgentS4D benchmark found that a large majority of runs were simultaneously unsafe under a prespecified signal and apparently complete. Inspecting only the outcome can therefore miss departures in the process that produced it.
For teams moving from experiment to production, the starting posture is to treat effective permissions as a production artifact and audit them on a schedule. Budget enforcement belongs outside the model, with soft and hard session limits measured per task. File-level restrictions and gated stage approval provide the execution boundary scope needs, while per-session tool-call and diff logs provide the minimum evidence for diagnosis. Agent configurations belong in the repository, with changes subject to the same pull-request review applied to the code the agent produces.
That posture connects pull-request review to runtime accountability without confusing the two. Review establishes which definition the team accepts, while external controls limit a session’s actions and preserve evidence afterward. Neither function can stand in for the other. A reviewed YAML file is a durable statement of intent, but production reliability depends on the system that turns it into enforceable limits.
Sources
- A Gated Spec-Driven Workflow: An Audit-Trail Study of Coding-Agent Work
- Engineering Reliable Coding Agents: Evaluating and Operating the System Around the Model
- When AI Agents Touch CI/CD Configurations: Frequency and Success
- Code as Agent Harness
- A Dataset of Agentic AI Coding Tool Configurations
- Beyond Code Generation: Reliability, Verification, and Cost Economics in the Agentic Software Development Lifecycle
- Agentic process evidence


