AI agent kill switch
An AI agent kill switch is a control outside an AI agent that stops it from taking further actions, whether or not the agent cooperates. Every kill switch is defined by four things:
- Scope: who or what it stops, such as one person, one agent, one server, or everything
- Enforcement point: where the check runs, such as a gateway, a harness hook, or the identity system
- Release: how it ends, whether lifted by a person, expired on a schedule, or not at all
- Record: who pulled it, when, why, and what changed while it was active
An instruction to stop is only a prompt. It enters the agent’s context like any other input, and an agent that has settled on a course of action can ignore it, reinterpret it, or keep going by another route. A kill switch takes that decision away from the agent. Its check runs somewhere the agent can’t edit, on a path every action in its scope has to cross.
Implementations differ in how hard they stop. Some end the session and revoke its credentials, so the work can’t resume. Others refuse the agent’s actions while the session stays open, so access returns the moment the switch is lifted. Both are kill switches as long as they hold without the agent’s cooperation. Agent session management covers the hard kill and the session lifecycle around it.
A kill switch is a stop that holds without the agent’s cooperation. To be usable in an incident, it has to be scoped, fast to pull, reversible, and recorded.
How does an AI agent kill switch work?
A kill switch has two parts: a switch that a person turns on, and a check on the path the agent’s actions take. That path can be a gateway that brokers the agent’s model or tool calls, a hook inside the agent harness that runs before each action, or the identity system that issues the agent’s credentials. The check compares each action against the active switches and refuses a matching action before it runs.
The check has to run on every action. An agent that signed in before the switch was pulled still holds a valid session, so a check that runs only at sign-in would let it carry on until its next login.
Two more properties keep the stop in place:
- It holds across reconnects. A runaway client that drops its connection and signs in again should meet the same refusal. A switch tied to one connection resets the moment the client reconnects.
- It fails closed. When the check can’t run, because a lookup times out or a backend is unreachable, the action is refused. In Claude Code, for example, the action goes ahead when a hook fails unless the hook sets
onFailureto"block", so a kill switch enforced through a hook only holds if the hook is written to fail closed.
The Speakeasy AI Control Plane shows where the check sits in practice. Its Model Context Protocol (MCP) gateway runs a fixed sequence on each request, including these steps:
- It authenticates the caller from their OAuth token.
- It admits or refuses the AI client.
- It checks the caller’s access to the server and tool.
- It checks for an active kill switch.
- It records the call with the person and client behind it.
The access and kill switch checks run on every tool call. If the gateway can’t complete the kill switch check, it refuses the call rather than letting it through.
What can an AI agent kill switch stop?
What a kill switch stops depends on where its check sits. Four enforcement points are common, and each sees a different slice of what an agent does.
| Enforcement point | What it stops | Blind spot |
|---|---|---|
| Tool calls (an MCP gateway) | Every tool call routed through the gateway | The agent’s loop keeps running and can try a route the gateway doesn’t front, such as a local script or a direct API call |
| Model access (an AI gateway) | The model calls that power the agent’s decisions, for calls routed through the gateway | Model calls that don’t pass through the gateway |
| Actions in the harness (agent hooks) | The agent’s next action, including local shell commands and file edits, and its next turn | Harnesses that don’t expose hooks; hooks a user can edit out; hooks that fail open |
| Credentials (the identity system) | Every request made with the agent’s credentials | Tokens already issued, at systems that don’t check revocation on each call; local actions that need no credential |
No single enforcement point covers everything. A gateway refusal contains the tools the gateway fronts, but the agent can read the refusal, reason about it, and look for another way through. A harness hook sees local actions a gateway never will, but it runs on a machine the user controls, so hooks meant for enforcement have to be distributed as managed configuration. Credential revocation reaches every system that checks the credential, and nothing that doesn’t.
Fuller coverage comes from combining points: one on the path, where the user can’t interfere, and one in the harness, where local actions happen. The agent session management reference covers how telemetry, the path, and the harness work together on a single session.
Why do agent kill switches matter now?
Agents have moved from answering questions to taking actions. Representative Ted Lieu described the shift in July 2026: “We are moving from AI that answers questions to AI that takes actions, whether that be executing financial transactions or controlling transportation systems or engaging in cyber defense and offense.” An agent that acts can do damage in the time between someone noticing a problem and someone stopping it, and a kill switch is the control that closes that gap.
The term also has a policy sense: the AI Kill Switch Act, introduced by Representatives Ted Lieu and Nathaniel Moran on July 23, 2026, would require developers of the most powerful AI systems to maintain the technical capability to throttle, suspend, or shut them down. That bill targets the developers of frontier models, while the kill switch on this page is a control an organization holds over the agents it runs.
How is a kill switch different from quarantine, session revocation, and guardrails?
Several controls can stop an agent. They differ in what triggers them, what they stop, and how far they reach.
| Control | Triggered by | What it stops | Scope |
|---|---|---|---|
| Guardrail block | A policy match on one action | That action; later actions proceed | One action |
| Session quarantine | A policy match | The session’s further prompts and tool calls, until an admin releases it | One session |
| Session revocation | A person | The current connection, though the client can sign in again | One session or client |
| Suspending an agent | A person | All requests made with the agent’s credentials | One agent |
| Disabling a server | A person | All traffic to the server | Everyone |
| Kill switch | A person | Actions in its scope, for a set period or until lifted | The person, servers, or fleet it names |
A guardrail block and a quarantine fire on a policy match, so they act on what a policy can recognize. A kill switch is the override a person pulls when the signal is a flagged laptop, an unusual risk finding, or a client calling tools in a loop, and activity needs to stop before the facts are known.
Session revocation looks similar but does a different job. It ends a connection, and the client can authenticate again and carry on. A kill switch that holds across reconnects keeps refusing until it is lifted or expires. In the Speakeasy AI Control Plane, the two are independent, so stopping a person and forcing a clean reconnect takes both.
Suspending an agent and disabling a server are blunter. Suspension stops everything the agent’s credentials can do, and disabling a server stops it for everyone. Agent session management lays out the full ladder of responses, from flag to kill.
What should you look for in an agent kill switch?
A kill switch earns its place in an incident runbook when it passes these tests:
- Scope. It can stop one person, a chosen set of servers, or everything, and an “everything” scope covers servers added after the switch was pulled.
- Schedule. It can start now or at a set time, and end when lifted or at a set time, so a switch pulled for an investigation doesn’t outlive it.
- Reversibility. Lifting it restores access right away, without re-provisioning an account or restoring a session.
- Persistence. It holds when the client disconnects and reconnects.
- Failure mode. It fails closed: when the check can’t run, the action is refused.
- Explanation. The person affected sees a message saying why their calls are refused, and admins can leave a separate internal note.
- Record. Every change is logged with who made it, both in the switch’s own history and in the audit logs.
- Authority. Only admins can pull or lift it, and API keys can’t manage it.
- Coverage. It states which identities it covers. If it doesn’t cover agent identities or API keys, the vendor names the control that does.
- Testing. You can pull it on purpose against a test account and confirm the expected calls are refused, so you know how it behaves before an incident depends on it.
How does Speakeasy provide an agent kill switch?
In the Speakeasy AI Control Plane, a kill switch stops one person’s MCP tool calls on a chosen set of servers, right away or on a schedule, until it is lifted or expires. The MCP gateway refuses matching calls before they reach the server, while the person keeps their account, roles, and sessions.
Admins manage kill switches on the person’s Access tab under Identity > Identities, so they decide while looking at what that person has been doing. The same form is available from the person’s row on the Members page.
- Scope. All MCP servers, which also covers servers added later, or Selected servers. Hosted, remote, and tunneled servers are all covered.
- Schedule. It starts now or later, and ends when lifted or at a set time.
- Review. Review impact shows the scope, the schedule, and any overlapping kill switches before Turn off MCP tool calls starts it.
- What the person sees. Each tool call in scope fails with a forbidden error that carries the admin’s Public message shown to the member and the code
mcp_tool_calls_paused. The person stays signed in, clients can still connect and list tools, and servers outside the scope are unaffected. An Internal note stays with other admins. - Enforcement. The kill switch holds even if the client reconnects. If the gateway can’t complete the check, it refuses the call.
- Lifting. Edit killswitch changes the scope, schedule, or notes, and servers removed from the scope regain access immediately. Lift killswitch ends it, with a warning if other kill switches still cover the same person. A kill switch with an end time expires on its own.
- Record. Each kill switch keeps a version history of every change and who made it, and every change also goes to the audit logs.
- Authority. Managing kill switches requires the
org:adminscope, which the Admin role includes, and a signed-in dashboard session. API keys can’t manage them.
The kill switch acts on a person’s own signed-in MCP sessions, not on API keys or registered agents, even ones the person owns. Other controls cover agents, single sessions, and the account itself:
- Suspend an agent. Suspension blocks the agent’s credentials without changing its owner or policy, and Resume restores them. Each change applies to new requests immediately.
- Session quarantine. Quarantine is a guardrail action that runs in agent sessions through hooks. When a quarantine policy fires, it denies the matching event and freezes the session’s further prompts and tool calls until an admin selects Release, which resumes them immediately.
- Revoke a session. Revoke connection ends one session, and the client has to authenticate again. Revoke registration ends every session issued through a client registration and rejects future tokens minted for that client ID. Pair a revocation with a kill switch to stop a person and force a clean reconnect.
- Disable the account in the identity provider. For a compromised identity, do this as well as starting a kill switch.
The kill switch documentation covers setup and how each control compares, and the MCP kill switch release post walks through the incidents it was built for. To see these controls against your own agents, talk to us.