Skip to main content
Resource / Definition

What is an AI agent kill switch?

Telling an agent to stop is only a prompt. Where a kill switch can act, what it has to do in an incident, and how it differs from quarantine, revocation, and guardrails.

Scroll for definition
Nolan Sullivan headshotBy Nolan Sullivan, Founding Growth Engineer
Published
Definition

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

AI agent kill switchDefinitionSpeakeasy

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 onFailure to "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:

  1. It authenticates the caller from their OAuth token.
  2. It admits or refuses the AI client.
  3. It checks the caller’s access to the server and tool.
  4. It checks for an active kill switch.
  5. 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.

Where a kill switch can actAn AI agent runs its loop inside an agent harness. Four enforcement points are common. A harness hook, inside the harness, stops the agent's next action, including local shell commands and file edits. Its blind spots are harnesses without hooks, hooks a user can edit out, and hooks that fail open. An MCP gateway in front of tools stops tool calls routed through it. Its blind spot is routes the gateway doesn't front. An AI gateway in front of the model stops model calls routed through it. Its blind spot is model calls that skip the gateway. The identity system behind the agent's credentials stops requests made with those credentials. Its blind spots are tokens at systems that don't recheck them on each call, and actions that need no credential. No single enforcement point covers everything.ENFORCEMENT POINTSWhere a kill switch can actAGENT HARNESSAI agentRuns the agent loopHarness hookStops the agent's next action, including localshell commands and file edits.BLIND SPOTHarnesses without hooks; hooks a user can edit out;hooks that fail openMCP gatewayStops tool calls routed through it.BLIND SPOTRoutes the gateway doesn't frontToolsAI gatewayStops model calls routed through it.BLIND SPOTModel calls that skip the gatewayModelIdentity systemStops requests made with the agent's credentials.BLIND SPOTTokens not rechecked on each call;actions that need no credentialCredentialsNo single enforcement point covers everything.Where a kill switch can actAn AI agent runs its loop inside an agent harness. Four enforcement points are common. A harness hook, inside the harness, stops the agent's next action, including local shell commands and file edits. Its blind spots are harnesses without hooks, hooks a user can edit out, and hooks that fail open. An MCP gateway in front of tools stops tool calls routed through it. Its blind spot is routes the gateway doesn't front. An AI gateway in front of the model stops model calls routed through it. Its blind spot is model calls that skip the gateway. The identity system behind the agent's credentials stops requests made with those credentials. Its blind spots are tokens at systems that don't recheck them on each call, and actions that need no credential. No single enforcement point covers everything.ENFORCEMENT POINTSWhere a kill switch can actAGENT HARNESSAI agentRuns the agent loopHarness hookStops the agent's next action,including local shell commands andfile edits.BLIND SPOTHarnesses without hooks; hooks a usercan edit out; hooks that fail openMCP gatewayStops tool calls routed through it.BLIND SPOTRoutes the gateway doesn't frontToolsAI gatewayStops model calls routed through it.BLIND SPOTModel calls that skip the gatewayModelIdentity systemStops requests made with the agent'scredentials.BLIND SPOTTokens not rechecked on each call;actions that need no credentialCredentialsNo single enforcement point coverseverything.
Enforcement pointWhat it stopsBlind spot
Tool calls (an MCP gateway)Every tool call routed through the gatewayThe 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 gatewayModel 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 turnHarnesses 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 credentialsTokens 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.

ControlTriggered byWhat it stopsScope
Guardrail blockA policy match on one actionThat action; later actions proceedOne action
Session quarantineA policy matchThe session’s further prompts and tool calls, until an admin releases itOne session
Session revocationA personThe current connection, though the client can sign in againOne session or client
Suspending an agentA personAll requests made with the agent’s credentialsOne agent
Disabling a serverA personAll traffic to the serverEveryone
Kill switchA personActions in its scope, for a set period or until liftedThe 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:admin scope, 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.

Frequently asked questions

What is an 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. A person turns the switch on, and a check on the path the agent's actions take refuses every action in the switch's scope. That check can sit in a gateway, a hook in the agent harness, or the identity system behind the agent's credentials. To be usable in an incident, a kill switch has to be scoped, fast to pull, reversible, and recorded.

Why can't you just tell an AI agent to stop?

An instruction to stop is only a prompt. It enters the agent's context like any other input, and the agent can ignore it, reinterpret it, or keep pursuing its task by another route. Even a refused action doesn't end the agent's loop: the agent can read the refusal and try a different path. A kill switch works because its check sits on the path the agent's actions must cross, where the agent can't edit or skip it.

What is the difference between a kill switch and session quarantine?

A person pulls a kill switch and scopes it by who or what it covers, such as one person, a set of servers, or everything. Session quarantine starts on a policy match: it denies the matching event and freezes that one session's prompts and tool calls until an administrator reviews and releases it. A kill switch suits a decision made before the facts are known, while quarantine suits a specific session that a policy has flagged.

Does a kill switch end the agent's session?

Whether a kill switch ends the agent's session depends on the design. A hard kill ends the session and revokes its credentials, so the work can't resume. Another design refuses actions while the session stays open, so access returns as soon as the switch is lifted. Speakeasy's kill switch works the second way for MCP tool calls: the person keeps their account, roles, and sessions. To force a clean reconnect as well, revoke the session alongside it.

Is the AI Kill Switch Act the same thing as an AI agent kill switch?

No. The AI Kill Switch Act, introduced in the US House 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. It is a bill about frontier-model developers. An AI agent kill switch is an operational control an organization holds over the agents it runs, to stop their actions during an incident.

How does Speakeasy provide an AI agent kill switch?

In the Speakeasy AI Control Plane, an admin can start a kill switch that stops one person's Model Context Protocol (MCP) tool calls on all servers or selected ones, right away or on a schedule, until it is lifted or expires. The gateway refuses matching calls before they reach the server, and it also refuses a call when it can't complete the check. The kill switch holds even if the client reconnects, the person keeps their account, roles, and sessions, and every change is recorded. To stop an agent, suspend it, which blocks its credentials. Session quarantine freezes a flagged session's prompts and tool calls until an admin releases it.

AI everywhere.

Control here.