Agent in Production

Git as the Control Plane for AI Agent Definitions

Versioned, reviewed agent configs only matter when runtime enforcement reads them.

· 9 min read · Updated
Cover illustration for “Git as the Control Plane for AI Agent Definitions”
Agent-as-Code Patterns · October 25, 2026 · 9 min read · 1,973 words

Agents-as-code means defining AI agents in declarative YAML files, committing those definitions to Git, and reviewing changes through the same pull requests and CI gates used for application code. Git becomes a control plane only when approved definitions govern runtime permissions, tool access, and budgets. The purpose is not to make agent reasoning reproducible, but to make its constraints versioned, enforceable, and traceable.

Why agent behavior is already controlled by files in your repository — whether you govern them or not

The ecosystem has already chosen repository files as the interface for agent behavior. Files such as CLAUDE.md, AGENTS.md, and agents.yaml guide how agents work, including those that have write and shell access. They separate behavioral instructions from the implementation of the agent itself, much as Terraform configurations separate infrastructure definitions from the systems that provision them. These are operational artifacts. Their governance determines who can change the instructions under which an agent acts.

Padmaraj Madatha’s June 2026 repository study found that agent configurations propagate as undeclared shared components. Exact duplicates appeared across independent repositories after fork adjustment and SHA-256 comparison, with 75.5% of clone pairs crossing organizational boundaries. The study also found that fewer than one percent of agent configurations declared permission boundaries, compared with roughly a third of CI/CD workflow files in the same repositories. That comparison is indicative rather than definitive because permission detection depended on a fragile parser. Even with that qualification, it exposes a substantial governance gap.

A majority of the configuration files had a single commit, and their update frequency lagged CI/CD workflows even after age normalization. Infrequent revision does not itself prove neglect. Combined with cross-repository copying and sparse permission declarations, however, it describes a control surface distributed without the maintenance and provenance practices expected of executable dependencies. Files that steer privileged agents are already circulating beyond the boundaries of the teams that authored them, which is the gap Ellipsis, a cloud agent platform that runs Claude Code and Codex from YAML definitions checked into your repository, aims to close.

How the config-as-code ecosystem has standardized around Git-native agent definitions

AGENTS.md expresses repository-level instructions, while the pairing of a committed AGENTS.md with a gitignored AGENTS.override.md separates shared behavior from local experimentation. An agent definition describes the agent or workflow, whereas a runtime policy governs what execution is allowed. Both can be versioned, but they are not interchangeable.

Oracle introduced the Open Agent Specification in October 2025 as a framework-agnostic declarative language serializable to JSON or YAML. It defines building blocks for standalone agents, structured workflows, and multi-agent compositions. NVIDIA launched the OpenShell Reference Architecture at GTC Berlin 2026 in October 2026 as an open-source sandboxed runtime for autonomous AI agents. OpenShell wraps agents such as Claude Code and Codex in kernel-level isolation governed by declarative YAML security policies, applied through the OpenShell CLI. One describes agent composition, while the other constrains execution.

For teams that want to define agents in YAML rather than write implementation code, that difference shapes what they choose. A declarative specification addresses how an agent is expressed, while runtime support determines how that definition becomes an operating system of agents and workflows. Security policies address the permissions of that execution. The common ground is a reviewable file interface. Convergence around Git-versioned configuration does not imply that every format defines an entire agent or that every runtime accepts the same definition.

What distinguishes using Git as a storage location from using it as an enforcement surface

A repository stores agent definitions passively when changes can reach production without required review or validation. It becomes an enforcement surface when branch protection, access controls, and CI checks decide which definitions can take effect. Consider a coding agent that generates a patch and reruns tests. Those actions occur within an existing pipeline. Giving that agent authority to change deployment policies or remove approval gates changes who controls the pipeline itself.

Marcus Emmanuel Barnes, Taher A. Ghaleb, and Safwat Hassan’s 2026 paper distinguishes these as data-plane and control-plane authority. Data-plane authority permits localized intervention, while control-plane authority modifies the conditions under which work is accepted and deployed. The authors found that current agentic CI/CD systems overwhelmingly confine agents to the data plane, with safety supplied by surrounding pull requests and policy gates. The surrounding infrastructure does the enforcement work. Delegating authority over that infrastructure therefore changes both task scope and organizational risk boundaries.

The same distinction applies to human changes to agent definitions. A CLAUDE.md edit that changes how an agent handles database migrations can have the same blast radius as an edit to migration logic. It should undergo the same review process, with schema checks where applicable, disallowed-pattern checks, and secret scanning. Madatha’s study also frames copied configurations as a supply-chain concern requiring content addressing, tamper detection, and provenance tracking. Review governs the proposed change, while provenance establishes which artifact is being trusted. Without those controls, Git remains a file server.

Why prompt-level safety instructions cannot substitute for architectural enforcement

Prompt instructions cannot set a boundary independent of the model that processes them. Joel Fokou’s 2026 paper calls this the “prompt guardrail fallacy,” because safety instructions and adversarial inputs pass through the same attention mechanism without an architectural separation between trusted instructions and untrusted data. The reasoning system still has to interpret a rule inside the context window. It is not an external execution gate. Manipulating that interpretation can undermine the rule without changing its text.

Fokou’s “Cognitive-Executive Separation” principle addresses this structurally by preventing the reasoning system from executing actions itself. An independent validator stands between reasoning and execution, so a proposed action does not become an authorized action merely because the model produced it. OWASP’s Top 10 for Agentic Applications, published in December 2025, reaches a compatible architectural conclusion. It calls for enforcement before execution, untrusted treatment of model output, distinct governed agent identities, bounded tool access, and continuous behavioral monitoring. The boundary sits outside the model’s reasoning.

For Git-native governance, this means allowed and denied tool lists, budget caps, and permission scopes belong in versioned configurations read by enforcement infrastructure. Prompt guidance can still express intended behavior. It cannot replace those controls, including for internal-only agents. An agent can encounter prompt injection in documentation, issue comments, and external content it reads during a task, even if an attacker never speaks to it directly.

What Git-native governance of agent configs looks like in practice across the CI/CD pipeline

In practice, the recommended starting point is human-readable YAML agent definitions checked into the repository as first-class code artifacts. Changes go through pull requests that must have reviewers, including changes to tool access, budget caps, and model routing. CI then validates schemas, checks for credentials and overly broad permissions, and confirms that the configuration compiles against a known-good baseline. Protected merge rules make those checks conditions of acceptance.

Madatha’s Rel(AI)Build reference implementation illustrates stronger integrity and enforcement mechanisms. It includes SHA-256 content addressing for definitions, lockfiles stamped with keyed message authentication codes, hash-chained audit logs, and tiered permission enforcement before LLM invocation. It also uses similarity-based prompt drift detection. These mechanisms address different failure modes. Content identity and tamper detection protect the artifact, while permission enforcement limits what can run and drift detection finds changes in the instructions in use.

At runtime, every session should use a pinned configuration commit hash rather than whatever happens to be in the repository when it runs. That pin makes the reviewed version identifiable and allows drift between approval and execution to be detected. Per-request token limits, per-session rolling budgets, and model-tier routing rules need the same review as permission lists. Test ownership adds a separate safeguard. An agent’s pull request should pass the same gates as a human’s, with a person owning the tests that define the required behavior and the agent unable to edit them merely to make its code pass.

How the audit trail splits between Git history and runtime logs, and why connecting them is the emerging discipline

Git history records what an agent was configured to do, while runtime logs record what it actually did. Neither record answers the other’s questions alone. A reviewed permission change does not show which tools a session invoked, and a tool-call record without configuration provenance cannot establish which approved rules governed it. Connecting each run to its exact configuration commit hash closes that gap. It turns a history of edits and a history of actions into evidence that can be examined together.

The runtime record needs enough context to explain the task, model, prompt version, tool calls, approvals, errors, cost, and final result. Raw prompts and outputs may hold secrets, customer data, source code, or private business context. Teams therefore need to decide how to govern the logs themselves. The aim is attributable behavior without treating sensitive execution data as harmless telemetry.

Madatha’s study identifies unbounded execution without enforced traceability as a gap that static configuration inspection cannot reveal. Runtime phase-state machines with requirement-to-file-to-test traceability track what happens during a session, beyond the permissions it starts with. This supports a human-on-the-loop model in which engineers review exceptions, policy violations, and high-blast-radius decisions. The emerging LLMOps discipline can distinguish an agent violating its constraints from an approved configuration authorizing behavior that proved wrong.

The strongest objection: agent behavior is non-deterministic, so the IaC analogy breaks down

The infrastructure-as-code analogy has a genuine limit. A Terraform apply is reproducible, while two runs governed by the same CLAUDE.md may reason differently, invoke different tools, and produce different results. Any claim that Git alone makes an agent reproducible confuses the definition with the execution.

Barnes and colleagues note a related problem with how agents are tested in their 2026 paper. Deployment momentum is outpacing evaluation methodology, and the field lacks benchmarks suited to decision-making agents. Mitchell et al. at Hugging Face ground the risk in autonomy, arguing that risks to people increase as systems gain autonomy and lose human constraints. These limitations deserve more than procedural reassurance. A reviewed configuration is not proof that every permitted action will be correct, safe, or useful in its eventual context.

The defensible claim is narrower and more useful. Git governance controls the action space, permission boundaries, budget caps, and tool access within which reasoning takes place. When enforcement infrastructure enforces those rules, each run against a given commit has the same constraints, even if it makes different choices. Non-deterministic reasoning within deterministic constraints is the design. Governance reduces the blast radius of variable behavior without eliminating it, which leaves runtime evidence and human review of exceptions as necessary parts of the architecture.

What changes when engineering teams treat agent config governance as a first-class engineering practice

Treating agent configuration as code moves oversight into the workflow that already governs engineering changes. Required review establishes responsibility before a permission expands, while CI catches disallowed patterns before a definition merges. Runtime sandboxes and session-scoped credentials constrain what approved sessions can do. Audit records then make exceptions attributable to specific versions. Oversight can focus on consequential changes and events rather than grow in proportion to every action an agent takes.

Teams should commit YAML definitions, require review on change, validate schemas and disallowed patterns in CI, constrain runtime execution, and connect runs to configuration commit hashes. Barnes and colleagues describe constrained autonomy and external governance as the design pattern used most often. Applying that pattern requires extending existing engineering discipline to the files that now direct agent behavior.

The alternative leaves authority scattered across prompts, personal overrides, and copied files whose origins and permissions are unclear. As an agent fleet expands, that fragmentation makes it harder to establish who approved a capability and which sessions used it. The organizational change is that agent behavior stops being treated as a private interaction between a developer and a model and becomes a production concern with owners, review gates, and enforceable boundaries.

Sources

  1. Fully Autonomous AI Agents Should Not be Developed
  2. Parallax: Why AI Agents That Think Must Never Act
  3. A Deterministic Control Plane for LLM Coding Agents
  4. From Assistance to Agency: Rethinking Autonomy and Control in CI/CD Pipelines

More in Agent-as-Code Patterns