~/writing / field guide

Constrain It Before It Acts

An agent does not have to be compromised to cause the incident. It only needs permissions that were each reasonable on their own. This is about taking away what it does not need, before it acts, while you still can.

Field guide: Securing the Agents Already in Production. Part 2 of 5. Last reviewed: September 2026.

Part One ended on a promise. Once you can see the agents, you can start taking away what they do not need. This is that.

You have the register now. Every workflow that runs as an agent under a real identity, each one on a line with an owner, a read surface, and a write surface. The register is longer than anyone expected, and most of the rows hold more access than the work requires.

The instinct now is to watch them. Wire up the traces, stand up a dashboard, see what they do all day. That work is real, and it is Part Three. It is also the more expensive way to spend the quarter.

Watching a thing tells you what it did. Constraining a thing decides what it can do. The cheapest incident to investigate is the one the agent was never able to cause.

So before the telemetry and before the detection, you take away what is not needed. Three moves, all of them in front of the agent rather than behind it. Least privilege. Read-only by default. A guardrail in the action path that can refuse.

Least privilege is an identity problem

The agent is not a clever model making choices. It is an account. It signed in with real credentials and it holds exactly what that account was granted. Whatever you believe the agent is, the systems it touches see an identity with a permission set, and they will honor that permission set without asking why.

Start with the rows you flagged in Part One as running under a person’s credential. You cannot scope those at all while they borrow a human identity, because the systems cannot tell the agent from the person, and neither can you after the fact. The first act of constraint is to take the agent off that account and give it its own. Only then is there something to narrow.

Then narrow it. The mis-scoped agent is the common case, not the exception. Someone provisioned the workflow for a demo, granted broad access so the demo would not die on a permission error in front of the room, and shipped it. The grant never came back down. Now a thing that drafts replies can also read the entire customer table, and nobody decided that on purpose.

Scope the identity to the workflow, not to the convenience. Give each agent its own identity, so the grant is legible and the blast radius is one workflow. Grant it the narrowest set of permissions the task actually uses, against the data and the region the task actually touches. Make the credentials short-lived and scoped, so a leaked token expires instead of persisting. An agent that reads one table does not need write on the schema. An agent that files a ticket does not need to close one. An agent that drafts an email does not need to send it.

None of this is new. Role-based access, scoped OAuth, just-in-time grants, short credential lifetimes. The only new part is that the principal asking for the access is a piece of software that will use every permission you give it, at machine speed, the first time the prompt goes sideways.

Read-only is the default you do not have

Most agent workflows read. They summarize, they retrieve, they answer, they draft. The write is the exception, and the write is where the harm lives.

Your register already put the read surface and the write surface on the same row, for the same agent. That was the point of recording it that way. It is the pairing the note turned on and Part One flagged: a read that looks harmless beside a write that is not. Each grant is reasonable on its own. The combination is the incident.

A read-only agent fails toward disclosure. A write-capable agent fails toward action. Those are different categories of bad day, and you should stop treating them as one.

So make read-only the floor that every agent starts on. The write, the send, the export, the delete, the transfer: each one is a separate capability, named, granted on purpose, and logged when it is used. The default answer to whether an agent can act on the world is no, and someone has to change that answer in the open. Several of the runtime proxies now ship a read-only mode for exactly this reason. Turn it on, and make the exceptions earn their way out of it.

This reads as obvious on the page. Now walk the register and count how many of those agents hold a write they have never once needed.

The guardrail belongs in the action path

A policy in a document stops nothing. A diagram of how the agent should behave stops nothing. The only control that constrains an agent is one that sits between the agent and the tool, reads the specific action at the moment it is attempted, and can say no before it runs.

That is the category the loud part of the market is not selling you. The conference floor is selling copilots that triage alerts after the fact. The control you need is quieter and upstream. Proxies that mediate every tool call. Runtime guardrails. What Cisco has renamed action control. Execution-time authorization that binds a specific agent to a specific action scope to a specific tool, checks it at the moment of use, and fails closed when the policy does not match.

Update, 18 September 2026. MCP has moved in this direction since I wrote this. The July specification added authorization hardening and now exposes the method and tool name in HTTP headers, which means a gateway can make access decisions on the specific action being attempted rather than treating every MCP request the same. That makes execution-time policy easier to build into the path. It does not make MCP itself the guardrail. The specification is explicit that access control and consent still have to be implemented by the systems around it.

The test for whether you have a guardrail is one question. Can it refuse, at runtime, an action the agent is technically permitted to take but should not take in this moment. If it can, you have a guardrail. If it cannot, you have a written policy and a hope.

Fail closed. When the check cannot be evaluated, the action does not happen. An agent that keeps acting while its control plane is down is an agent with no control plane.

What constraint does to the three cases

An agent does not have to be compromised to cause the incident. It only needs permissions that were each reasonable one at a time. Constraint answers the three failures differently.

The compromised agent, the one with an attacker driving, is the familiar case. Constraint does not prevent the compromise. It caps what the compromise reaches. A narrowly scoped, read-only-by-default agent in hostile hands is a smaller event than a broadly scoped one, because the account itself can do less.

The mis-scoped agent is the case constraint was built for. Here constraint is not mitigation. It is the whole fix. The agent was doing exactly what it was allowed to do, so you change what it is allowed to do.

The misaligned workflow is the hard one, and it is honest to say so. Each action is reasonable on its own. The sequence produces an outcome nobody intended, and no single step looks wrong. Scoping does not catch this, because every permission in the chain is legitimate. What catches it is a guardrail on the step that cannot be taken back. The send. The export. The bulk delete. Put a gate there, and the chain stops one move before the damage. Detection will recognize the pattern afterward, and Part Four is about that. The guardrail stops it beforehand. You want both. You build the guardrail first, because it is the one that prevents rather than explains.

The part the organization resists

Constraint slows the agent down. It breaks the demo that worked last week. It returns permission errors that someone now has to triage. It annoys the team that shipped the agent precisely because it was fast.

This is the uncomfortable conversation, and it is uncomfortable on purpose. The organization that deployed the agent for speed will feel every one of these controls as friction against the thing it wanted. The pressure to grant the broad scope, to skip the read-only default, to leave the action path open, is the same pressure that produced the mis-scoped agent in the first place.

The friction is not a flaw in the plan. The friction is the plan. A control that costs nothing and stops nothing is the compliance theater this whole guide is written against.

What you actually have

The agent you wrote down in Part One can still do everything today that it could do before you made the register.

The register is not a control.

Until something in the action path can refuse, you do not have a constrained agent. You have a careful inventory of everything that can still happen.

Take away what they do not need, and the next question is the one the register cannot answer. Can you see what the agent does inside the scope you left it. The record is sitting in a system you do not own yet. That is Part 3.


// keep reading