Skip to main content
Agents behave non-deterministically while holding increasingly powerful permissions, so the blast radius keeps growing when they fall under Agent Goal Hijacking or simply misfire. Kill switches draw attention as a way to stop destructive changes, and the surrounding ecosystem is filling in, with Anthropic shipping Inference hooks as one example. A kill switch is not a silver bullet, though. It only makes sense once basic agent security has matured. This page covers the prerequisites and the requirements for designing and operating one as a control plane.

Prerequisites

Before considering a kill switch, arrange the permissions, environment, and resources you hand an agent so that even a full compromise causes no serious harm. Agent Platform covers the full list, and four points matter most for a kill switch.
  • Sandbox isolation and network allowlists, so a malfunction cannot spread to other environments
  • Permissions granted under least privilege, with the blast radius of every tool identified and minimized
  • Recoverability of resource changes tracked and preserved at all times
  • Layered audit logs covering input and output, tool execution, and network traffic
Once all of that is in place, momentum for a kill switch comes from two directions. You may want a further degree of control over the agent’s behavior, or constraints in an external system may leave recoverability incomplete in a way that makes the risk of corruption unacceptable. Before you build the machinery to stop an agent, build the state where stopping is unnecessary. On the regulatory side, Article 14 of the EU AI Act requires high-risk systems to be stoppable through a stop button or an equivalent procedure that brings the system to a safe state, so the ability to stop is turning into a compliance requirement.

Design it as an independent control plane

The phrase kill switch suggests a single button, but what you actually build is a control plane outside the agent that handles detection, judgment, enforcement, evidence preservation, and rollback. Telling an agent in its system prompt to stop under certain conditions carries no force, because a model can probabilistically ignore an instruction in its context. The stopping mechanism has to live in the platform that runs the agent. The control plane stands apart from the agent itself and governs both the agent and its external integrations. It has to satisfy at least three principles.
  • Non-bypassability, meaning every agent action and every external integration sits under the switch and none of it can route around
  • Unreachability, meaning the control plane lies outside what the agent can observe or operate, so the agent cannot alter the control mechanism
  • Fail-closed behavior, meaning that if the control plane stops or gets partitioned, the agent stops rather than continues
Unreachability matters because an agent capable of escaping the sandbox may learn that the kill switch exists. Keep the control mechanism outside anything the agent can observe.

Stage shutdown across scope and severity

A blanket process kill hits other users when the agent is serving requests from multiple people, and it leaves side effects such as work interrupted mid-flight and external API calls left unhandled. Design shutdown in stages along two axes instead. For scope, provide granularity at the level of an individual run, a specific agent, a specific tool or destination, and everything, then work containment from the smallest effective range outward. For severity, provide stages such as heightened monitoring, escalation to human approval, read-only mode, refusal of new actions, credential revocation, and network cutoff. When stopping a whole session costs little, stop at the run level. When a full stop would be too disruptive, an intermediate stage such as forcing read-only mode keeps the agent alive while preventing further damage.

Build triggers from deterministic and non-deterministic checks

You can give users a button they are free to press, but leaving the stop judgment and its timing to a human is genuinely hard. Agents running in the background are barely visible, so pressing a button is not even an option. Implement trigger conditions as automated checks, combining deterministic and non-deterministic ones. Deterministic checks are rules a machine can evaluate, such as refusing a specific tool called with specific arguments, blocking traffic to a destination outside the allowlist, or stopping once execution counts or resource consumption pass a limit. Non-deterministic checks include step-by-step evaluation by a monitoring agent and anomaly detection over output content and behavioral patterns. They catch the unexpected, but the judgment takes time and produces both false positives and misses. Timing matters too. Detect an anomaly before a tool call runs and you prevent the damage. Detect it after and you are too late. When the agent’s natural language output is itself the harm, and streamed output is always visible to the user, the content is already public by the time you detect anything. Agents handling sensitive data such as personal information must not stream straight through to the user. You need buffering or delayed display so a check can run in between, and that means accepting a tradeoff between safety and UX.

Layer enforcement with different response times

Revoking permissions on an external service or invalidating credentials can take five to ten minutes to show up in how that service handles API calls, so revocation alone does not stop the agent right away. Resources can still be affected in the meantime, so enforcement needs layers with different response times.
  • Refusal at the tool gateway stops the tool from running and prevents the resource operation immediately
  • Credential revocation carries propagation delay, so treat it as a way to prevent later resumption rather than an immediate stop, and use it when a serious incident calls for a sustained halt
  • Network cutoff works as the last resort against traffic that goes through commands rather than tools
On top of that, irreversible and immediate operations such as deleting a database, deleting backups, or sending money should be taken off the list of things a kill switch is expected to catch. Either withhold the permission entirely or require HITL.

Record tamper-proof evidence ahead of time

Without audit logs you cannot identify the resource changes that were half-applied or investigate how far the impact reached after a stop. The evidence that answers these questions has to be recorded before you ever need it.
  • Which input or instruction started this run
  • Which tools were called, with which arguments, and how far they got
  • Among external APIs already called, which completed, which are in flight, and which have unknown results
  • Which resources changed, and whether each can be rolled back
An identifier for the run such as a session ID has to appear consistently across every log, and the evidence has to be stored append-only somewhere the agent itself cannot tamper with or delete.

Verify regularly and manage inventory

Since the agent runs non-deterministically, the chance of output that skirts a deterministic rule is never zero, and pairing it with a monitoring agent does not close the gap because the watcher is itself non-deterministic. Assume the switch can be bypassed or disabled, verify it on a regular schedule including real shutdown tests, and update and tune the detection policy as you go. Then run inventory management for agents and permissions, putting registration, change, and retirement into a managed process so you always know which agent holds which tools and permissions and which resources it can reach. Record the owner, the granted tools and permissions, the destinations, and the expected blast radius for each agent, and use that inventory as the basis for audits and further hardening.

References