Kill-Switch & Emergency Stop
Provide a reliable, immediate mechanism to halt an agent or fleet of agents — without graceful shutdown dependencies.
This page is the complete instruction page for one pattern called "Kill-Switch & Emergency Stop." It explains the problem this pattern solves, the idea behind the solution, when you should (and should not) use it, and what happens afterward — both the good effects and the costs.
This matters because building AI agents is not just about making them clever. It is also about making them safe and predictable. Following a well-tested pattern like this one helps avoid common mistakes, and shows you exactly which safety rules and regulations it connects to, listed under "Standards Mesh" on this page.
Context
When an agent is misbehaving at scale, the response time of "file a ticket to redeploy" is too slow. A tested kill-switch is required.
Problem
Systems without tested emergency-stop mechanisms discover they do not work during the actual emergency.
Forces
- Clean shutdown vs immediate halt
- Authority to pull the switch vs speed
Solution
Implement a dead-man's-switch at the runtime layer: a feature flag or equivalent that, when tripped, immediately blocks new agent invocations and cancels in-flight ones. Ensure the mechanism is tested quarterly. Define who has authority to trip it.
Applicability
- All production agent fleets
- Any agent with significant blast radius
- Regulated deployments
Anti-Patterns
- "Kill-switch" that requires a deploy to activate
- Authority to trip it held only by people in one timezone
Consequences
- +Bounded incident duration
- +Confidence for aggressive deployment
- −Operational test discipline required