Cost, routing and limits

Kill switch

A kill switch is an operator-engaged control that refuses all further requests from a named agent, a team, or an entire estate, checked before every other governance decision and released only by a person. It is the control that has to work when everything more precise has failed, which is why it is scoped by identity rather than by rule, and why engaging it records who did it and what reason they gave.

also called big red button · emergency stop · agent kill switch

Position is the whole design. The switch must be the first check in the decision point, ahead of lifecycle status, permissions, budgets and every policy, because each check placed before it is another opportunity for the switch never to be reached. A kill switch evaluated after the policy engine is a kill switch that stops working precisely when the policy engine is the thing going wrong. The same reasoning applies to its dependencies: a switch that a licence check, a quota or a failed sign-in can disable is not a kill switch, because a licence problem that blocks an operator from signing in is a licence problem that disables the button they signed in to press.

Three scopes are usually enough: one agent, one team, everything. Team matching should be case-insensitive, on the plain grounds that a team name is being typed by a human under incident pressure and a capital letter should not be the difference between a fleet stopping and not. A team-scoped switch also catches an agent registered into that team afterwards, without anyone remembering to add it — which is the behaviour you want at 2 a.m. and the reason scope is expressed as an identity predicate rather than as a list of ids captured at engagement time. Release should be a field on the record rather than a deletion, so that a released switch reaches nobody while the incident stays readable afterwards.

Attribution is not paperwork. Engaging is an administrative action that requires a stated reason and cannot be anonymous, because the audit entry is the only account anyone will ever have of why an entire fleet stopped; the refusal returned to callers should carry the scope, the person and the reason, so the first engineer to see a 403 does not open an availability incident. Both engagement and release belong in a tamper-evident record, because the second question any review asks is when it was released and by whom.

Two failure modes turn a kill switch into decoration, and both have been found in real systems. The first is a duplicated predicate: if the logic deciding whether a switch reaches a given subject is written once in the gateway and again in whatever compiles rules for an offline or on-device enforcer, then a copy stricter by one character omits an engaged switch from that artefact, and the button is pressed in the console and reaches nothing on the laptop. Write it once, export it, and let every consumer use that one function. The second is exempted paths. Endpoints that execute nothing — token counting, model catalogue listings — get excused from the request-opening path for good reasons, and quietly take the status and kill-switch checks out with them, so a stopped agent can still price prompts and enumerate models. Anything an agent can call has to pass the switch, including the endpoints that look harmless.

Finally, be exact about what it stops. A kill switch is an admission control: it refuses new work. It does not recall a request already dispatched to a provider, it does not cancel a tool call already executing, and it does not undo an effect already committed in a downstream system — anything in flight completes and is billed. Where decisions are compiled into a snapshot for offline enforcement, a switch engaged after that snapshot was issued does not reach the device until the next refresh, so the snapshot’s freshness bound is the entire bound on the exposure, and past that bound the local enforcer should deny rather than decide on stale evidence. Those are the sentences to put next to the button, because an operator who believes the switch reverses actions will press it and then stop looking.

in practice

A team-scoped stop, and what it does not undo

At 02:14 an agent in the payments team enters a retry loop against a tool that keeps timing out. The on-call engineer engages a team-scoped switch naming the team and the reason. From that moment, every request from every agent in that team — including one registered twenty minutes earlier — is refused with a typed 403 quoting the scope, the engineer and the reason. The three requests already dispatched upstream complete normally and appear on the invoice; two tool calls already in flight finish and their effects stand. At 09:30 the switch is released by a named person, and both the engagement and the release sit in the audit record, which is what the incident review reads first.

not the same as

What kill switch is routinely confused with

Circuit breaker
A breaker engages itself from observed failures, releases itself after a cooldown, and is scoped to a dependency. A kill switch is engaged and released by a named person, is scoped to an identity, and is indifferent to whether anything is failing — it is for the case where the system is working perfectly and doing the wrong thing.
Agent suspension
Suspending an agent is a durable edit to its own record and is the right tool for this agent should not run again until somebody reviews it. A kill switch is the immediate one: it is checked before lifecycle status, it reaches many subjects at once without editing any of their records, and it is expected to be released within the hour.
A rate limit of zero
It would also refuse traffic, but it is a per-subject configuration change rather than one action, it carries no incident reason, and it is evaluated after permissions and lifecycle rather than before them — so it inherits every failure mode of the checks above it.
next

Related terms

Cost, routing and limits

The terms next to this one

Where the money goes, why providers disagree about how to count it, and what a spend control has to do to be a control rather than an alert.

get in touch

Definitions are the easy part.

The glossary is written to be useful whether or not you ever buy anything. If you have got to the point of deciding how to implement one of these in your own estate, say what your agents do and you will get a straight answer about what it would actually take.

no form · no qualification step · no sales desk · the other three ways in