Skip to content
Agentic Control Plane

AI agent gateway vs control plane: where tool calls get checked

David Crowe David Crowe · · 6 min read
architecture governance control-plane mcp
Share X HN LinkedIn

If you run coding agents like Claude Code, Cursor or Codex, you have probably looked at an API gateway or an LLM proxy to keep them in line. Neither one sees the thing you are worried about. They are fine tools. They just sit in the wrong place.


Three layers, and one nobody watches

An agent stack has three layers:

┌─────────────────────────────┐
│  LLM Layer                  │  Claude, GPT, Gemini
│  (generates decisions)      │
├─────────────────────────────┤
│  Tool Layer                 │  Bash, Read, Write, APIs, MCP
│  (executes actions)         │  ← nothing checks this by default
├─────────────────────────────┤
│  Infrastructure Layer       │  Servers, databases, files
│  (where damage happens)     │
└─────────────────────────────┘

LLM gateways (Helicone, LiteLLM, Portkey) sit between you and the model. They log prompts, route between providers and manage keys. They see what you asked the model. They don’t see what the model then ran.

API gateways (Kong, Apigee, AWS API Gateway) sit in front of your APIs. They handle auth, rate limits and routing for HTTP traffic. They don’t know the caller is an agent, or that this agent shouldn’t be allowed to do this thing.

When Claude Code runs Bash("git push --force") on your laptop, neither gateway sees it. The model decided, the tool ran, and nothing was in between.


What a control plane checks

A control plane sits at the tool layer, between the model’s decision and the tool running:

Agent decides: "I need to run Bash(git push --force)"
         │
         ▼
┌─────────────────────────────┐
│  Control plane              │
│  - Who is calling?          │
│  - Interactive or           │
│    unattended?              │
│  - Allow, ask or deny?      │
│  - Log it                   │
└────────────┬────────────────┘
             │ allow / ask / deny
             ▼
Tool runs (or waits for you)

The tool call still runs on your machine, or goes straight to the API. The control plane doesn’t carry that traffic. It gets the question “should this run?” and answers it.

Think of Kubernetes. The data plane runs your containers. The control plane decides what runs where. You send decisions through the control plane, not traffic.

One caveat. Model calls are separate. With claude-acp and codex-acp, the model calls use your own login. With opencode-acp, qwen-acp, pi-acp and prime-acp, model calls go through ACP’s broker. Tool calls are checked by the hook either way.


Why agents need this

Normal software makes API calls you can predict. You wrote the code. Agents are different:

  1. The call pattern isn’t known ahead of time. The model picks tools, arguments and order at runtime, so you can’t write the allowlist in advance.

  2. Someone is watching, or nobody is. An interactive session where you see every call is not the same as a background agent running overnight. The rules should differ.

  3. Agents start agents. Subagents get less human attention at every level.

  4. You use more than one tool. Claude Code on one laptop, Cursor on another, Codex in CI. You want one set of rules and one log.

None of that maps to gateway concepts. There is no route to configure and no endpoint to protect.


How it works: a hook, not a proxy

Most coding agents let you run a command before each tool call. For Claude Code that is a PreToolUse hook:

{
  "hooks": {
    "PreToolUse": [{
      "matcher": ".*",
      "hooks": [{
        "type": "command",
        "command": "node $HOME/.acp/govern.mjs",
        "timeout": 5
      }]
    }]
  }
}

The hook gets the tool name, its arguments, the session ID and the permission mode. It asks ACP’s API what to do and passes back allow, ask or deny. The installer sets this up for each harness it finds, and Claude Code’s own plugin does the same job.

The rule check lives in one place. The enforcement point is in each client.

You don’t need to register tools first. The first time an agent calls a new tool, it shows up in your Activity log, and you can put a rule on it from there.


Rules by tool and by tier

ACP names every call with a key: Bash.rm, Bash.git.push, Bash.curl.api.github.com, Write. A rule on a short key covers everything under it. The most specific key wins. Each rule is Allow, Ask first or Never.

Rules can also depend on how much supervision there is. Claude Code sessions are reported as interactive, subagent or background, and API and CI runs have their own tier. In the console (Policies, then Agents) you can set Never on Bash.rm for background runs and Ask first for interactive ones. Slash commands like /acp-ask Bash.git.push write rules for interactive sessions only.

The rest of the setup is on the rules page, with copy-paste examples for force-push, database writes, rm -rf and curl.


Start in audit mode

A new workspace starts in audit mode. Every tool call is recorded with its tool, arguments, decision, identity and latency. Your own rules don’t block anything yet.

The safety floor still applies. It holds a force-push, destructive SQL sent through a database client, curl | sh and recursive deletes outside the project for your approval, and it always blocks rm -rf of your home or root, mkfs, disk wipes and fork bombs. Only Claude Code shows the hold inline in the session. On other harnesses the call is blocked and you approve it on the console or from the email, then the agent retries.

When you have read the log and picked rules, turn on enforcement with /acp-enforce or on the Policies page.


What happens when ACP is unreachable

It depends on which hook is running.

The Claude Code plugin lets interactive sessions continue and shows a loud UNGOVERNED banner. Subagent, background and API runs stay blocked until the gateway answers. You can’t change that.

The shared hook used by Cursor, Codex and the other harnesses fails open in every tier. To make it fail closed, run echo closed > ~/.acp/failmode or set ACP_FAIL_MODE=closed on that machine.

The safety floor runs on the machine, so it still applies in both cases.


Which clients

The installer sets up Claude Code, Cursor, Codex, opencode, OpenClaw, Hermes, DeepSeek Harness, pi, Prime Agent, Muse Code, Grok Build and Antigravity where it finds them. Depth of enforcement differs by harness, so check the setup page for yours. On Antigravity, --dangerously-skip-permissions removes hooks, ACP’s included.

ACP runs as a hook on your machine. If someone turns hooks off, it stops checking.

curl -sf https://agenticcontrolplane.com/install.sh | bash

View the dashboard →

Running coding agents? ACP records each tool call its hook sees and makes the dangerous shell commands (a force-push, destructive SQL, curl | sh) wait for you. One command, free up to 5 agents:

macOS · Linux · WSL
curl -fsSL https://agenticcontrolplane.com/install.sh | bash
Windows · PowerShell
irm https://agenticcontrolplane.com/install.ps1 | iex

What the installer writes  ·  Getting started

Share X HN LinkedIn
Get the next data drop
What agents actually cost, new tool-surface captures, and the occasional incident post-mortem — sent when we publish something worth your inbox, not on a schedule. Unsubscribe anytime.
Share: Twitter LinkedIn
Related posts

← back to blog