Skip to content
Back to blog
6 min read

Should Your AI Agent Be Able to Edit Its Own Guardrails?

Should Your AI Agent Be Able to Edit Its Own Guardrails?

The honest answer isn’t “never.” It’s “yes, but never alone, and never in the dark,” and that turns out to be the whole shape of a safe agentic system.

Here’s a question that should make you slightly uncomfortable, because it made me uncomfortable when someone asked it about my own setup.

You’ve built an AI coding agent, and like a responsible person, you’ve given it guardrails. There’s a config file in the repo that spells out the rules its work gets checked against: block anything that looks like a leaked credential, flag a pull request too big for a human to actually review, refuse changes that wander into files outside their lane, require tests when the code changes. Good. That’s the seatbelt.

Then it dawns on you. The agent can edit that file.

Nothing stops it, mechanically, from opening a pull request that lowers the very bar it’s about to be judged against. Loosen a rule here, widen an exception there, and the gate that was supposed to catch its mistakes waves them through instead. So: should an AI agent be allowed to edit its own guardrails?

The reflex answer, and why it falls apart

The reflex answer is an immediate, firm no. It’s the fox guarding the henhouse. You don’t hand the thing being policed the power to rewrite the policy. Lock the config file, put it out of reach, done.

Except that answer collapses the moment you try to live with it. Guardrail configs need tuning. A rule turns out to be noisy and flags things it shouldn’t; a new risk appears and you want a check for it; a path pattern is slightly wrong and needs narrowing. If the agent can never touch any of that, you’re back to hand-editing YAML forever, which is exactly the toil the agent was supposed to lift off your plate. Worse, you’ve learned nothing: you swapped a real design problem for a blunt prohibition.

Prohibition isn’t safety. It’s usually a sign you haven’t thought about structure yet.

The frame that actually resolves it: control plane vs. data plane

The idea that untangles this comes straight from infrastructure, and if you’ve run any, you already have it in your bones. There’s a data plane and a control plane, and you keep them apart on purpose.

The data plane is where the work happens: packets move, requests get served, code gets written. The control plane is where the rules that govern the work live: the routing tables, the policies, the permissions. In a well-built system the two don’t bleed together. The thing forwarding packets doesn’t get to quietly rewrite the routing policy on its own say-so.

Now map that onto the agent. The agent lives in the data plane: it writes code, opens pull requests, does the labor. The guardrail config is the control plane: it defines what “allowed” even means. Seen that way, the question answers itself, and the answer isn’t “no.” It’s this: the agent may propose changes to the control plane, but it may never apply them on its own authority. Separation, not prohibition.

(If that shape feels familiar, it’s the same instinct behind defending against prompt injection: the golden rule is that untrusted input must never reach the control plane. Same structure, different attacker.)

What “never alone” actually looks like

“Propose but never apply alone” isn’t a slogan; it’s a handful of concrete mechanics. Here’s how it plays out in my own estate, where AI agents do real work across every repo I own.

Nothing merges without a human, and the agent can’t merge its own work. Every change, a change to the guardrail config included, arrives as a pull request that I have to merge. So a config that quietly weakens a rule isn’t something the agent slips past me. It’s a diff sitting in front of my face, waiting on my yes.

The gate defends itself. The guardrail config is listed among the paths the guardrail treats as off-limits, so any pull request that touches it gets flagged by the gate itself. That matters more than it sounds. Without it, a one-line severity change buried in a four-hundred-line diff is easy to skim past. With it, the tampering is loud: the gate throws a hand up and says “this PR is editing me, look closer.”

Config changes travel alone. A change to the control plane rides in its own dedicated pull request, never smuggled inside a feature change where it could hide. One purpose per PR isn’t just tidiness here; it’s what stops a policy edit from riding in on the coattails of something else.

Every commit is signed. Provenance isn’t an afterthought. I know exactly who, or what, proposed the change.

Put those together and the agent’s power over its own guardrails is real but bounded. It can say “I think this rule should be looser, and here’s why.” That suggestion becomes reality only once a human has looked straight at the control plane, deliberately, and agreed.

Why banning it would have been worse

Here’s the part that makes the structure worth building instead of merely safe. Because the agent can propose config changes, it can do genuinely useful things I’d otherwise have to catch myself. Not long ago one of my agents noticed that a run of documentation-only pull requests kept tripping a “you changed code but shipped no tests” rule, which is nonsense for prose. It proposed narrowing the rule so content stops setting off the alarm while real code still gets caught. That’s a good change. I read it, understood it, merged it.

A blanket ban would have cost me that. I’d have kept eating the false alarm, or spent my own evening hand-fixing config, and the agent would have been dumber for zero gain in safety. The structure gave me both: the agent’s help and a human’s eyes on anything that touches the rules. That is the entire payoff of doing the design work instead of reaching for the lock.

The shape of the thing

None of this is really about one YAML file. It’s the shape of every safe agentic system I’ve built or would trust.

Let the agent act freely in the data plane, where mistakes are visible, reversible, and caught by the very checks it can’t quietly switch off. Keep the control plane behind a human gate: the policy, the permissions, and above all the power to weaken the controls themselves. The frightening question about an AI agent is almost never “can it do X.” X is usually fine; X gets caught. The frightening question is the recursive one: can it change what it’s allowed to do without anyone looking? Get that one right and most of the fear about everything else quietly evaporates.

I’ve written before about putting a gate around an agent’s pull requests that runs outside the agent so it can’t be sweet-talked out of its own rules, and about how the real line in AI-assisted work is who owns the judgment. This is that same idea pushed one level deeper. It isn’t enough for the gate to run outside the agent. The gate’s rulebook has to sit outside the agent’s unilateral reach too.

So, can it?

Mine can. It proposes changes to the exact config that judges its work, and some of those changes are improvements I’m glad to have. What it cannot do is make one of them in the dark, or alone. Every edit to the rules is loud, isolated, signed, and waiting on a human who chose to look.

That isn’t a loophole in the safety. That is the safety.