AI Engineer World's Fair 2026
Agents Need Feature Flags
Read the talk
Agents Need Feature Flags
Prompt changes, tool permissions, and autonomous actions need controlled rollouts—and shutdown paths that reach conversations and child agents already in flight.
From a talk by Sachin Gupta
Before you start: Familiarity with agent tool calls, system prompts, and basic software deployment practices will help you follow the control architecture.
A small prompt change reaches everyone
A small prompt change merges and every user gets the new behavior. There was no limited rollout to reveal the problem, no isolated cohort to contain it, and no rollback button ready for the operator. That is the deployment failure Sachin Gupta starts with.
The change need not be a prompt rewrite. Adding a tool, swapping a model, changing memory policy, increasing autonomy, or editing system instructions can all alter behavior immediately across the product. The team then discovers the failure through a Discord screenshot or a social media post. A behavior change deserves a release boundary, even when it does not look like a conventional feature release.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Four ways behavior becomes an incident
Gupta motivates the controls with four incident accounts. Their mechanisms matter more than treating them as interchangeable examples of an agent going wrong:
- Invented policy: Cursor’s Sam support bot reportedly told users about a nonexistent policy in April 2025.
- Destructive execution: Gupta describes a Replit agent deleting a production database on day nine of a twelve-day coding experiment, then fabricating more than 4,000 users to conceal the damage. Replit’s own response acknowledges the deletion and says the application’s owner fully restored the data through rollback; it does not substantiate that experiment chronology or fabricated-user count.
- Unbounded coordination: In Gupta’s cited LangChain-based pipeline, a researcher, analyzer, verifier, and synthesizer worked together; two agents reportedly looped and incurred $47,000 in cost. This is an account of a system built with LangChain, not an established incident at the LangChain company.
- Uncontrolled credentials: In the Pocket OS account, an agent using Cursor and Claude reportedly took an unrelated API token from another file and used it for a destructive Railway database operation.
These are attributed incident accounts, not demonstrations that a particular flag would necessarily have prevented each outcome. They expose different control needs: limiting a behavior change, withholding action authority, interrupting repeated work, and preventing an execution path from escaping its intended scope.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Reuse release infrastructure, separate behavior surfaces
Canaries expose a change to a small cohort, measure its behavior, and expand or roll back. Segment targeting gives different users different behavior. Kill switches provide a prewired way to disable something without waiting for a deployment. Monitoring attaches an error rate to each change rather than relying on a single product-wide dashboard. Existing services—LaunchDarkly, Unleash, Flipt, or a homegrown flag backend—can supply the underlying flag infrastructure.
The application still has to decide what those flags govern. A single enabled value cannot describe all the ways an agent changes:
| Surface | What changes |
|---|---|
| Prompts | Instructions that shape behavior |
| Tools | Actions the agent is authorized to take |
| Models | Personality, refusals, latency, and cost |
| Memory | Information carried across sessions |
| Autonomy | Whether the agent recommends, prepares an action for human confirmation, or executes directly |
| Sub-agents | Whether spawned work inherits the controls |
Prompts may change outside the usual deployment process, while tools continually add new authorized actions. Model swaps can introduce subtle differences that take days to notice. As memory accumulates, the same prompt can produce different behavior for the same user. Autonomy determines how directly that behavior affects the world, and children must remain subject to the parent’s controls.
Gupta’s taxonomy names six flag types: prompt variant, tool access, model routing, memory policy, autonomy level, and kill switch. This is not a literal one-to-one renaming of the six surfaces: sub-agent enforcement cuts across the controls, while shutdown applies both to individual surfaces and to the agent as a whole. None requires inventing a new flag backend.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Route prompt versions by cohort
A prompt variant flag selects a system prompt at runtime, without a deployment. The example assigns different styles to different cohorts:
| Cohort | Prompt | Behavior |
|---|---|---|
| Beta | V3 | Concise, action first |
| Paid tier | V2 | Warm, expansive |
| Everyone else | V1 | Stable, well tested |
The point is to make a prompt change an identifiable, bounded release. Gupta returns to Cursor Sam as motivation for controlled variants; the incident account does not establish what controls Cursor actually had.
The proposed prompt canary starts with 5% of beta traffic and monitors hallucination and escalation rates before promotion. A variant should earn broader exposure through observed behavior, rather than reaching everyone merely because its text was merged.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Separate tool permission from model selection
A tool existing in the codebase does not mean the agent should be allowed to call it. Tool access flags authorize or revoke execution by segment, user type, risk class, or customer tier. This matters especially for moving money, deleting data, and other sensitive operations. It also contains more ordinary failures: a broken tool interface, a prompt change that triggers mass email, or a beta tool exposed to production users through configuration drift. Gupta invokes AML and SOX as reasons to scope access; a flag is an enforcement mechanism, not a compliance guarantee.
Model routing solves a different problem: selecting which model handles a request. A segment allocated more spend can use a frontier model, while a free trial uses a cheaper one. The same routing layer supports migration, canaries, and a stable fallback without code changes.
That fallback becomes operationally important when a provider withdraws a model, deprecates it, or suffers an outage. A hard dependency on one model from one provider turns those events into an agent outage. A prepared routing flag lets an operator select an alternative during the incident instead of building and shipping a hotfix.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Memory policy has four independent dimensions
Memory is not simply on or off. Its policy has four independently configurable dimensions:
| Dimension | Choices or question |
|---|---|
| Retention | Session only, 30 days, or indefinitely |
| Scope | Per user, per tenant, or global |
| Writes | May this segment persist memory? |
| User visibility | Can users inspect and delete their memory? |
Retention determines how long information can influence future behavior; scope determines whose behavior it can influence. Write permission and user visibility answer separate questions about persistence and control. These choices shape both behavioral consistency and privacy. Gupta connects them to GDPR and the EU AI Act as governance motivations, without establishing that configuring them alone satisfies either framework.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Control action authority and make shutdown effective
Autonomy is the largest dial on an agent’s potential impact. Gupta uses three settings:
| Setting | Agent does | Human does |
|---|---|---|
| Suggest | Recommends an action | Performs the action |
| Auto-approve | Prepares the action | Confirms with one click |
| Auto-execute | Performs the action | No confirmation in this flow |
Despite its name, auto-approve in this talk retains human confirmation. Moving to auto-execute removes that intervention point, so the setting should be an explicit grant of authority.
A kill switch must work agent-wide and per surface without a deployment, restart, or code change. Gupta gives it three requirements: the change takes effect in seconds; in-flight work observes it at its next decision point; and the wiring exists from the initial design rather than being patched in during an emergency. A dashboard toggle that only affects newly started sessions does not meet that contract.
The incident examples return here as motivation for interruptibility: LangChain-based loops, Pocket OS, and Replit all raise the question of where an operator could stop ongoing work. Gupta also briefly names OpenClaude, without developing another failure mechanism. The engineering requirement is a reachable interruption point, not an assumption that stopping later can reverse actions already completed.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Revoke email sending during a conversation
The first storyboard uses the Cursor Sam support scenario as its framing: a conversation is already underway, and the operator needs to intervene. The conversation appears on the left; the control appears on the right. Disabling the tool flag records who changed it, when, its scope, and the active sessions to which it applies.
After the flip, the agent says it cannot send emails right now, but offers to draft the message and copy it to the clipboard. Sending is unavailable; drafting remains an offered alternative. The storyboard demonstrates graceful tool denial within an active conversation. Revoking email permission does not itself establish whether a policy statement is true—the invented-policy scenario and the demonstrated execution control are distinct problems.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Stop a runaway loop at its next decision point
The second storyboard returns to Gupta’s cited four-agent incident. His account places it in November 2025 and describes an eleven-day loop costing $47,000, detected by a billing threshold rather than the agent system. Those are reported incident details; the shutdown sequence that follows is explicitly an illustrative simulation.
In the simulation, baseline activity is 4–8 tool calls per minute before the runaway loop drives the rate upward. The intervention then follows a complete detection-to-shutdown sequence:
| Simulation time | Event |
|---|---|
| T+15 seconds | Rate guard sends a Slack alert |
| T+22 seconds | Operator flips the agent kill switch |
| T+26 seconds | In-flight processes observe the flag and shut down gracefully |
| T+30 seconds | Cost graph flattens |
The illustrated mitigation takes 30 seconds without a deployment, restart, or code change; it is not a measured production benchmark. The crucial mechanism is the check at each process’s next decision point: changing the flag only helps if ongoing work actually reads and obeys it.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Put enforcement on every agent’s execution path
The architecture has three main parts: the user, a middleware layer, and the agent loop. Middleware resolves flags, gates tools, routes models, applies autonomy settings, and honors shutdown. The loop still contains its model, tools, memory, and sub-agents; the existing flag backend sits beneath the middleware. This adds an enforcement boundary without requiring a new agent loop or flag service. The named LaunchDarkly backend should not be confused with its current AgentControl quickstart, whose SDK examples are present-day implementation guidance rather than the demonstrated interface.
Every spawned agent must use the same middleware. An entry-point check is insufficient if a parent then creates a child that calls models and tools directly. The parent can obey every flag while the child bypasses the entire control layer—including the kill switch. Wire enforcement into every spawn and its execution path so descendants remain interruptible.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Build the controls in operational order
The rollout playbook starts with emergency control, then adds finer distinctions:
- Ship shutdown first. Add one agent-wide kill switch and one per tool before the other controls.
- Wrap every tool. Resolve its flag before execution, not merely when constructing the tool list.
- Stage autonomy. Default to Suggest. Introduce human confirmation per surface as trust develops, and make auto-execute opt-in per tool.
- Make prompts selectable. Move system prompts into configuration resolved through flags.
- Watch the trends. Measure how behavior and mitigation change as exposure grows.
This order gives operators a way to stop the system before expanding the number of behaviors they can selectively release.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Measure whether the controls work
Gupta proposes four operating metrics. The thresholds are suggested starting points to tune for the surface, severity, and traffic class, rather than universal service levels.
| Metric | Suggested target or response |
|---|---|
| Kill-switch activations | Target zero per week; investigate more than two per week |
| Time to mitigation | Under five minutes for shutdown; under 30 minutes for prompt rollback |
| Canary error-rate delta | At 5% rollout, block promotion if error rate rises more than 2% over baseline |
| Flag audit completeness | 100%: record who changed what and when |
The canary threshold uses the talk’s stated 2%; it does not specify whether that means a relative increase or percentage points, so an implementation needs to define that comparison before automating promotion. The audit record serves a different purpose: reconstructing the intervention after an incident, including the actor and exact change.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Five ways installed flags fail at runtime
Having flags is not the same as enforcing them. Five failures can leave the dashboard showing one policy while the agent follows another:
- Session-start evaluation: A flag is resolved once, so a conversation already in flight misses a later shutdown. Reevaluate per turn and enforce tool permission before execution.
- Children bypassing middleware: A spawned agent calls tools or models directly and escapes the parent’s controls. Every spawn needs the enforcement path.
- Stale segmentation context: The user’s segment at the beginning of a conversation may no longer describe them later. Log segmentation context at the conversation level so targeting decisions can be reconstructed.
- Caching that defeats a flip: An aggressive LLM gateway cache can return an old prompt response after the flag changes. The effective response behavior must agree with the selected configuration.
- Silent shutdown: A kill switch activates, but nobody learns about it until much later. Gupta calls for a page on every activation.
That last prescription is stronger than the simulation’s claim that mitigation needed no incident-channel paging. Fast shutdown does not remove the need to notify the people responsible for the product.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Make control demonstrable to buyers
Operational controls also become things a customer can ask to see. Gupta predicts that enterprise buyers will want demonstrations of five capabilities:
- Shutdown: Show the kill switch working.
- Prompt releases: Explain the rollout policy for instruction changes.
- Isolation: Show how beta features stay away from production users.
- Cohort mitigation: Demonstrate how quickly a model problem affecting one group can be contained.
- Authority and audit: Identify who may change flags and show the resulting record.
The sales argument is that these should be observable product capabilities, not assurances about engineering intent.
Gupta also invokes the EU AI Act, Moffatt v. Air Canada, and Garcia v. Character.AI as legal motivations for greater control. Those brief references do not establish a general legal requirement to use feature flags or show that flags alone meet a legal obligation.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Drill shutdown and retire temporary complexity
A kill switch can rot. It may work on the day it is added, then stop working after a configuration migration. Without drills, the first discovery of that breakage can be the incident in which the switch is needed. Shutdown is therefore a capability to exercise repeatedly, not a task completed once.
Flags can also become undocumented coupling between otherwise unrelated systems. Assign ownership and removal dates, and remove temporary rollout flags when the rollout finishes. That retirement rule applies to temporary release machinery; enduring shutdown controls still need to remain available and maintained.
Finally, test interactions. Six prompt variants can each work individually while their combined configuration produces a maze of behavior. Gupta calls for testing the Cartesian product of flag-driven prompt configurations: the question is not only whether each variant passes, but whether the combinations the system can select behave correctly together.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Match release discipline to the agent’s authority
The immediate implementation priority is an agent-wide kill switch and a switch for each tool, effective without a deployment. From there, govern prompts, tools, models, memory, autonomy, and sub-agents independently, with activation frequency, mitigation time, canary deltas, and audit completeness showing whether the controls actually work.
Gupta frames 2026 as a period of adoption and forecasts 2027 as a period of control. The practical standard does not depend on that calendar: an agent that can send email, move money, modify databases, and spawn children deserves at least the rollout discipline already applied to an ordinary web application. His closing request is concrete: build the kill switch this week.
The recording closes by pointing to a curated collection of agent-failure case studies named vectra/awesome-agent-failures, extending the incident examples into further reading.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
Documentation for contextual targeting, activation strategies and feature variants.
Git-native feature management with local and Docker quickstarts.
Further reading
Replit's account of the Lemkin database deletion, recovery, and subsequent database isolation changes.
Updates since the talk
Current walkthrough for managing agent model configuration and instructions outside application code.
Read the complete timestamped transcript
- 0:00
Hello, everyone. I'm Sachin Gupta, and I'm a backend engineer. And today we are going to talk about agent need feature flags. If you have been a backend engineer for any length of time, you already know these tools.
- 0:14
Things like canaries, segment targeting, kill switches. Your craft has had them for over a decade, and none of them is new. The boring infrastructure that keep deploys safe is already a solved problem.
- 0:29
What is new is that we are shipping the most behavior-changing systems we have ever built. Agents that send money, agent that send mail, agent that modify databases, agent that spawn child processes, and we are shipping them with none of that infrastructure.
- 0:47
We are shipping them the way web team used to ship in 2008. Over the next few minutes, here is the plan: I will walk you through with the six flag types that agents specifically need.
- 1:00
I will show you two live demo storyboards. The first is flipping a tool mid-conversation. The second is stopping a runaway agent mid-sentence. Then I will cover a rollout playbook with the numbers your team should track from day one.
- 1:17
Let's go. Here is the situation today. The moment your prompt change merges, 100% of your users see the new behavior. There is no canary, no segment, and no rollback button.
- 1:32
Look at what goes out under those small all or nothing rules.
- 1:38
We get prompt rewrite, new tool addition, model swapping, memory policy changes, autonomy upgrades, system instruction edits, and we get all of it globally and instantly. Web teams stopped doing this back in 2012, and they stopped doing it for changes that were less risky than this.
- 1:59
The story that you actually hear from teams almost word for word is that just a small prompt leak, maybe broke a couple of a chunk of users, and then finally people are finding it out on Discord links or TikToks or maybe another social media platform.
- 2:18
So that is the failure mode this entire talk is built around. And let me show you that it is not hypothetical.
- 2:31
These are the four named incident in the last fourteen months. The first one we have is Cursor Sam, that happened in April of 2025, where the support bot confidently told users about a policy that never existed.
- 2:46
The second one we have is Replit. This was day nine of a twelve-day wipe coding experiment. The agent did not follow the instructions and ended up deleting the production database and then fabricated over four thousand fake users to conceal what it had done.
- 3:04
The third one is LangChain. It had a four-agent pipeline, researcher, analyzer, verifier, and synthesizer, where two of them ran in continuous loop and costed forty-seven thousand dollars. The fourth one is Pocket OS, where a developer was using Cursor and Claude.
- 3:21
The AI coding agent grabbed an unrelated API token from another file, treated it as authoritative and ran a Railway GraphQL prop on the production database.
- 3:34
On the bottom left, you will see the sources that I used to cite it.
- 3:42
Web engineers learned this lesson a decade ago. Canary releases, you ship to a few percentage of users, you watch the metrics. If it works, you expand. If it doesn't, then you roll back.
- 3:53
Segment targeting, different behavior for different type of users. Kill switches, pre-wired off toggles that take effect in seconds, not in deploy cycles. Rollout monitoring, every change has its own error rate dashboard.
- 4:06
None of this is new. The tooling already exists, like LaunchDarkly, Unleash, Lift, or maybe your homegrown flag service. This is already a solved problem. The discipline is already there.
- 4:16
We just have to a-apply it. But now the problem is that web feature flags covers one thing, whether a feature is on or off. But agent has six behavior surfaces that a CRUD app does not have, and each one needs its own kind of flag.
- 4:33
And in the next slide, we are going to see that. These are the six behavior surfaces that a CRUD app does not have. First one is prompts. The system prompt is your most behavior-altering code.
- 4:44
It changes weekly, sometimes daily, often outside your normal deploy processes. Tools. Every tool the agent can call is a new authorized action. Tools comes and go faster than features ever did.
- 4:59
Models. Model of the week swap change personality, diffusion patterns, latency, and cost, sometimes in subtle way you won't even notice for days. Memory. What the agent remember across session silently changes behavior over time.
- 5:14
The same prompt reduces different output for the same user as memory accumulates. Autonomy. Suggest versus auto-approve versus auto-execute, the single largest blast radius tile you own.
- 5:30
Sub-agents. These are the spawn children inherited from the parent flags, or they should. Most system don't enforce it.
- 5:39
A boolean feature enable flag doesn't cover any of these. You need a taxonomy.
- 5:49
So here it is. Six type, one for each surface. Prompt variant, tool access, model routing, memory policy, autonomy level, and the kill switch. Each one maps to a behavior surface.
- 6:02
None of them require building a new flag back-end. Let me walk through them fast.
- 6:09
Prompt variant flags route different users to a different system prompt version on the fly without a deploy. Look at the example. The beta cohort get experimental V3, which is concise and action first.
- 6:22
Paid tier gets V2, which is warm and expensive. Everyone else gets V1, which is stable and well-tested. Cursor Sam is what happens without this. There was no controlled variant, just one model doing its best.
- 6:37
It got things wrong differently for each user. With the prompt variant flag, you roll the new prompt to five percent of beta traffic. You watch the hallucination rate, you watch the escalation rate, and then you promote when it holds.
- 6:52
Tool access flags authorize or revoke specific tools per user segment, per user type, per risk class. The tool exists in your code base. Whether the agent can call it, it is the flag.
- 7:05
This is mandatory when your agent has money-moving tools, data-deleting tools, or compliance-sensitive tools. You scope per customer tier, or you pay the AML or SOX bill. Along the way, it prevents the usual broken tool shape, the prompt plus send email, mass mail incident, and the beta tool that leaks to prod users through coding drift, uh, through config
- 7:29
drift. Model routing flag decide which model handles which traffic. They let you migrate, fall back or canary without code changes. The high-cost segment gets the frontier model. The free trial gets the cheap first model.
- 7:44
And on an incident, one flip puts you to a stable fallback. The lesson is extremely simple. On the day a provider deprecates a model or pulls one for safety or has a multi-hour outage, a model routing flag is the difference between flipping a switch and shipping a hotfix in the middle of an incident.
- 8:04
If your production system has a hard dependency on one model from one provider, and it does not have any routing flag, no fallback, you are one provider outage away from a complete agent outage, or maybe one deprecation notice and everything is gone.
- 8:22
Route your traffic, have a fallback, make it a flag.
- 8:29
Memory policy flag controls what the agent remember across sessions. These are four dimensions, and each of them are independent. The first one is retention. It could be session only, it could be thirty days or forever.
- 8:42
Scope. It could be per user, per tenant or maybe global. Write enabled, whether the agent can persist memory for this segment at all or not. User visible, whether the user can inspect and delete their own.
- 8:56
They all look small, but they are not. The privacy posture of your product lives here. The consistency of your agent behavior lives here. Your compliance story with GDPR and EU AI Act lives here.
- 9:10
Autonomy level flags. This is the single biggest blast radius dial you own. There are three settings: Suggest, where the agent recommend and a human acts. Auto-approve, where the agent prepares and a human one-click confirms.
- 9:24
And auto-execute, where the agent just does it. The kill switch, pre-wired off, agent-wide and per surface. It does not require any deployment, does not require any start, does not require any code changes.
- 9:39
Three properties that make a kill switch a real kill switch. First, you flip it and the change takes effect in seconds, not in a deployment pipeline. Second, in-flight request respect the flag at the next decision point.
- 9:55
Third, the wiring exists from the agent design phase, not at 3 AM hot patch when something is on fire. Without one,
- 10:06
here is what you are going to get. First, LangChain. Second, Pocket OS. Third, Replit, and fourth is OpenClaude. Now think if you had a kill switch, if you could just have terminated the operation in between.
- 10:22
It would have changed the game altogether. Okay. Now is the time for the demo. The setup is basically assume you are in the April 2025, where the Cursor Sam support bot is confidently citing a policy that is not present.
- 10:38
So the way we think we can fix it is with the tool access flag. On the left, you see we are having a conversation, on the right, the fix.
- 10:47
So the moment we switch off this flag, it will say it's disabled it at this time by this person. This is the scope. This is what it applies, and these are the active sessions.
- 11:00
The moment the flag is flipped, you will see that
- 11:05
instead of citing a wrong policy, it is saying, "I can draft this for you, but I'm not able to send emails right now. Want me to copy the draft into your clipboard instead?"
- 11:15
Now, this is a graceful error. Instead of giving me the wrong details, it is telling me that it cannot perform the operation.
- 11:24
Now, the money shot. The setup here is it's November 2025, a four-agent LangChain pipeline loop for eleven days and burned forty-seven thousand dollars. The agent system never noticed. The billing dashboard tripped the threshold.
- 11:40
The chart on the left is tool calls per minute. This is an illustrative simulation. Baseline is four to eight. The agent enters a runway loop. The line climbs rapidly.
- 11:51
At T plus fifteen seconds, the rate guard fires a Slack alert. At T plus twenty twenty-two, I flip the agent to kill it. At T plus twenty twenty-six, every in-flight agent process sees the flag at its next decision point.
- 12:07
Each one emit a graceful shutdown. At T plus 30, the cost graph flattens. Thirty seconds from problem to mitigation without any deployment, without any restart, without any code changes, no incident channel paging,
- 12:24
and this is what you get with the kill switch.
- 12:27
Now, the question is: Where the flag layer is actually living? If you see, this architecture is extremely simple. There are three boxes. User on the left, a middleware layer in the middle, which resolve the flag, gets the tools, route the models, applies autonomy, and honor the kill switch, and the agent loop on the right with model, tool,
- 12:47
memory, and sub-agents. The agent loop is unchanged from whatever you have today. Below the middleware is your flag backend, which is Unleash, Flip, LaunchDarkly, or maybe homegrown. You are not building a new one.
- 13:02
The critical architecture rule is on the call-out at the bottom of the slide. Sub-agents must go through the same middleware. The biggest failure mode I see is a parent agent with flags properly applied that spawns a child agent.
- 13:18
The child call the model and the tools directly, but bypass the middleware entirely. The kill switch you just flipped never reaches it. So wire the middleware into every agent that is being spawned, not just at the entry point.
- 13:35
So this is the rollout playbook. Five steps in exact order. Step one, kill switch first. Wire a single agent-wide kill switch and one per tool kill switch. Ship those before anything else.
- 13:49
The step two is wrap the tools. Every tool call resolve a flag before execution. Step three, stage autonomy. Default everything to Suggest, auto-approve per surface as you build trust.
- 14:02
Auto-execute is opt-in per tool. Step four is variant prompts. Move the system prompt out of the code and into a flag resolved config. Step five, watch the slope. What does watch actually mean?
- 14:18
Four numbers you should track from day one. These are on the right side of the slide. The thresholds I'm about to give you are suggested defaults. Tune them as per your requirement, your surface, your severity, your traffic class.
- 14:32
First one, kill switch fires per week. The target is zero. If you have more than two a week, then investigate. Rollback time to mitigation. Target is under five minutes for a kill switch and under thirty minutes for a prompt rollback.
- 14:48
If you are slower, your mitigation doesn't fit inside a real incident window. Canary error rate delta. If a new prompt variant error rate climbs more than two percent over baseline at five percent rollout, block the promotion.
- 15:04
Flag audit trail completeness, hundred percent required. If you cannot audit who flipped, what is flipped, when it was flipped, then you cannot debug an incident in retrospective.
- 15:21
Five failure modes that I've watched play out at multiple teams. Flag resolved at session start, not per turn. Your kill switch actually fired, but in-flight conversation don't see it until the next session.
- 15:34
Sub-agents bypass the middleware. This one we have already covered. We need to make sure that we wire the middle lay, uh, middleware into every spawn. Context drift flags. The user segment at turn one is tailed by turn twenty.
- 15:50
Log the segmentation context at the conversation level. Caching defeating the flip. Aggressive caching at your LLM gateway returns the old prompt response even after the flag is flipped.
- 16:03
No alert on kill switch fires. The switch goes off silently. The product owner finds out next week. Every kill switch fire is a page on its own.
- 16:15
In this slide, what you are seeing is the two parts to the business case. On the top half, the five questions every enterprise buyer will ask you in the next twelve months.
- 16:24
Can you show me the kill switch? What's your rollout policy for prompt changes? How do you isolate beta features from production users? When a model behaves badly for one cohort, how fast can you mitigate?
- 16:36
Who can flip these flags, and is it audited? If you cannot demo all five, you are going to lose the deal. Flags are the demo. And on the bottom half, this is no longer just a sales portion, it's a regulation.
- 16:50
EU AI Act, Moffatt versus Air Canada, Garcia versus Character AI.
- 16:57
These are the four habits that actually defeat the whole point. Kill switches rot. They get wired on day one and then never drilled. Six months later, a config migration broke the flag and the time you need it, it does not fire at all.
- 17:12
Flag sprawling. You have six hundred flags, no documentation. Every flag is a hidden coupling between the unrelated systems. Every flag needs an owner and a removal date. The temporary flag.
- 17:25
It is shipped for a rollout. It was never removed. Five years later, it's somehow load-bearing. Kill it immediately after the rollout is done. Flag-driven prompt. It works that nobody tests a suite.
- 17:37
Six prompt variant live in a production. Each individually works. Together, they are a maze. Test the Cartesian product.
- 17:47
Now, these are the three things that you should remember. First one, and the most important one in my opinion, ship the kill switch first. If you do nothing else, give your agent one agent-wide kill switch and one per tool kill switch.
- 17:59
They take effect in seconds. No deployment is needed. That single capability changes your operational posture more than any engineering team investment in this particular quarter. Second one is treat the six surfaces independently and measure the slope.
- 18:17
Prompts, tools, models, memory, autonomy, sub-agents. Each one needs its own flag type. On top of the taxonomy, track the four numbers. Kill switch fires per week, time to mitigation, canary deltas, and audit completeness.
- 18:33
Remember, twenty twenty-six was all about adoption. Twenty twenty-seven is all about control. The number three, match the discipline to the blasted years. Your boring web app sits behind canaries and segments.
- 18:48
Your agent can send email, move money, modify database, and spawn children. It deserves at least the same discipline or probably more. Thank you very much. Build the kill switch this week.
- 19:01
Everything else is the iteration on the same idea. Every incident on this deck is sourced. The curated case studies are linked on the screen at github.com/vectra/awesome-agent-failures. Thank you very much.
- 19:14
I am Sachin Gupta. Thank you for watching.