# What a gateway can actually enforce: intent, side effects, and where the tool call really runs

A common objection to putting a control plane in front of an agent is that a gateway only sees what the model intended, not the side effect, because the tool runs inside your own process. That is right about observability and wrong about enforcement. Here is what each enforcement point can stop, and what it cannot.

# What a gateway can actually enforce

Some teams build their own controls because of one objection to a control plane. It goes like this: the irreversible action happens inside your process after the model returns. A gateway sees the model's intent, not the side effect, so it can't stop anything.

The first half is true. The conclusion doesn't follow.

## A tool call is a message before it is an action

Every agent framework works the same way underneath. The model returns a response containing a structured block that names a tool and its arguments. Your loop reads that block and dispatches it. The Anthropic API calls it `tool_use`. The OpenAI API calls it `tool_calls`. Your code turns it into a function call, an HTTP request, or a database write.

Order matters here. The refund is not issued when the model decides to issue it. It is issued when your dispatch code runs, several steps later, after a message has crossed the network.

Enforcement happens in that gap. A proxy in the request path reads the response before your loop does, removes the offending block, and forwards the rest. Your dispatch code is never handed the call, so it has nothing to run. The gateway doesn't watch a refund happen and disapprove. It removes the instruction while it is still text.

A proxy that observes and a proxy that enforces sit in the same place. Only the second is allowed to change what comes back.

## What each enforcement point covers

Two places can decide, and they fail in different directions.

**At the model boundary.** When an agent is launched through the ACP model proxy (`claude-acp`, or `ANTHROPIC_BASE_URL` pointed at ACP), every call the model asks for passes through, whatever framework or harness the agent runs in. That includes harnesses with no hook. No flag inside the agent turns it off. Only changing the endpoint does. It can't see anything the model was never asked about.

Routing through the proxy is a deployment choice. The default one-command install is a client-side hook instead. The shared hook fails open when the gateway is unreachable unless you set `ACP_FAIL_MODE=closed` (or `~/.acp/failmode`) on that machine, and the harness settings can disable it. The Claude Code plugin also fails open for interactive sessions, with a loud UNGOVERNED banner, and fails closed for subagent, background and API sessions.

**At your dispatch point.** An in-process check sits where your code turns a decision into an effect. It also covers calls your application makes on its own, retries in your own loop, and paths the model never touched. What it gives up is independence. It runs inside the process it controls, so whoever controls that process can bypass it.

Neither covers everything the other does. To stop the model from doing something reckless, one may be enough. If an auditor asks whether the control can be switched off from inside the application, you need to look at both.

## What this does not cover

A control plane at the model boundary controls what flows through it. Anything routed around it is not covered. Three things to check in your own deployment:

**Coverage depends on how you deploy.** If some agents call the model API directly and others go through the proxy, only the second group is covered. Nothing flags the gap unless you watch for it, which is why coverage belongs on a dashboard and not only in a design document.

**A decision layer is software.** Any layer that classifies commands can be handed an input it classifies wrongly. Treat a policy layer as one control among several, not as a boundary that makes the others unnecessary.

**Stopping a call and approving a call are different problems.** Stopping a call is straightforward. Holding a run open while a human decides, then resuming it hours later in a different process, is the hard part. It is where teams that build their own spend most of their time. Be skeptical of any tool, ours included, that treats it as a footnote.

## Why this keeps coming up

The word gateway covers two products that do opposite things.

Most LLM gateways are cost and routing layers. They fail over between providers, cache responses, and attribute spend. They read the traffic and pass it along unchanged, by design, because altering a response would be a bug in that product. If that is the category you have in mind, the objection is right: those gateways see intent and prevent nothing.

A control plane sits in the same place on the wire and has the opposite job: it decides. The position was never the limit.

---

*Related: [The three planes](/three-planes) · [What is runtime authorization?](/what-is-runtime-authorization) · [Agent identity vs. agent control](/identity-plane-vs-control-plane) · [What is an Agentic Control Plane?](/what-is-an-agentic-control-plane)*


