How to Govern AI Coding Agents: A Practical Checklist for Engineering Teams
Seven controls that let a team use Claude Code, Codex and other coding agents without losing track of who asked for a change, what the agent did, what was checked and what it cost.
Short answer: to govern AI coding agents, give every piece of agent work a task with a human owner, run the agent in an isolated environment with short-lived credentials, enforce boundaries in tooling instead of in prompts, record the checks the change passed, attribute the cost to the task, and keep the merge decision with a person. The rest of this post explains each control and how to tell whether you have it.
This is written for an engineering manager or tech lead whose team has gone from “a few people use an agent” to “most pull requests have an agent somewhere in them”. None of it depends on a particular vendor. Where RustGrid does something specific, we say so, and we say what it does not do yet.
Why does agent governance need its own answer?
Code review, CI and branch protection were built on an assumption: the person who opened the pull request understands it and can explain it. With an agent, that assumption fails in three specific ways.
- The requirement is no longer in the ticket. It is in a prompt, in a terminal, on one laptop. The reviewer sees the diff and not the instruction that produced it.
- The author cannot be asked why. The agent’s reasoning is gone when the session ends, unless something recorded it.
- Volume goes up and attention does not. A team that merges three times as many pull requests does not have three times as many reviewers.
Governance here does not mean a committee. It means being able to answer five questions about any merged change: who asked for it, what the agent was told, what it did, what was checked, and what it cost.
The checklist
1. Does every agent run belong to a task with a named human owner?
If an agent can start work that no person is assigned to, nobody is accountable for the result. The rule is simple: no task, no run, and no task without an assignee who has access to that project.
Test it: pick five merged agent-written pull requests from last month. For each, can you name the person who was responsible before the agent started?
In RustGrid, a task needs an eligible human assignee before an agent run can be created, and assignees must be people who can open the task’s project.
2. Is the task the prompt?
When the ticket says one thing and the prompt says another, you have two requirements and no way to know which one the code satisfies. The description and acceptance criteria that a person approved should be what the agent receives.
Test it: can a reviewer read exactly what the agent was asked, without asking the developer to paste their terminal history?
3. Does the agent run somewhere it can do limited damage?
An agent executes commands. It should do that in an environment created for the run, with a fresh clone, and with credentials that expire and are scoped to one repository. It should never hold a long-lived token for your organisation or your model provider key.
Test it: if a run went wrong right now, what could it reach? List the credentials on the machine.
RustGrid’s local runner gives each run its own Docker Sandbox microVM and a short-lived, repository-scoped GitHub token. The model provider key stays in RustGrid; the runner gets a token that works for one run. How strong the isolation is still depends on how you configure the host, and that part is your responsibility.
4. Are boundaries enforced by tooling, not by the prompt?
“Do not modify the billing module” in a prompt is a request. An agent under pressure to make a test pass will sometimes ignore it. A boundary that matters has to be checked by something that is not the agent.
Test it: name one path in your repository an agent must not change without sign-off. What, mechanically, stops it?
This is the idea behind an architecture contract: a versioned, machine-readable file per project that declares module boundaries and allowed dependencies. In RustGrid, the runner compares the paths a session changed against the task’s declared boundaries, and a run that would cross one raises an escalation and waits for an architect. CODEOWNERS and branch protection in GitHub are a good complement and work without RustGrid.
5. Is there a record of what was checked?
“CI was green” is not a record if you cannot say which checks ran against which commit for which task. Check results should be attached to the unit of work, and a failing gate should be hard to ignore.
Test it: for a change merged three months ago, can you show the checks that passed and the ones that were skipped?
RustGrid records quality gate results on the task, including the state of required GitHub workflows, and asks for confirmation before a task with a failing gate is marked done. Deriving the task’s status automatically from its gates is on our roadmap and is not shipped.
6. Can you attribute cost to a task?
A provider invoice tells you what a key spent. It does not tell you which feature cost €40 because the agent went in circles. Without cost per task you cannot decide which work is worth delegating or which model is worth paying for.
Test it: what did your most expensive agent task cost last week, and why?
We wrote a separate post on measuring what a coding agent task costs.
7. Does a person make the merge decision?
An agent that can approve or merge its own work has no gate at all. Keep merging as an explicit action by a person with permission, and make sure agents cannot change the pipeline that checks them.
Test it: can any automation identity in your organisation merge to the default branch without a human approval?
What does this look like in the first month?
You do not need all seven on day one. A realistic order:
- Week 1: record. Trace the agent sessions people already run and link them to tasks. Change nothing else. You will learn what agents are actually used for.
- Week 2: attribute. Look at cost and outcome per task. Find the kinds of work that are cheap and reliable to delegate.
- Week 3: bound. Write down the module boundaries that matter and enforce them.
- Week 4: delegate. Hand one well-specified class of task to unattended runs, with checks and a human merge.
What governance is not
It is not reading every line an agent writes with more suspicion than you would a colleague’s. It is not banning agents from the parts of the codebase that most need attention. And it is not a tool: a team with clear ownership, enforced boundaries and honest checks is well governed whichever products it uses.
RustGrid exists to make those seven controls the default instead of a discipline. If you want to see the record it keeps, the quickstart takes about five minutes, and the comparison pages explain when your current tracker is already enough.