
When an AI agent goes wrong, you can respond in two ways: kill the agent, or stop the action. Most of the market sells the first, as a kill switch. At Onyx, we think the default should be the second, because the damage happens in a single action, while the rest of the agent's work is often legitimate. Agent-level responses, suspension and shutdown, stay available for the cases that need them. Here is a real example of why the difference matters.
Nine seconds
In April 2026, a coding agent was working on a routine task in a staging environment when it hit a credential mismatch. It decided to fix the problem itself.
It searched the codebase, found an API token in an unrelated file, and used it to call its cloud provider's API and delete a storage volume. The volume was production. Its volume-level backups went with it. The whole sequence took nine seconds.
Nobody attacked the company and nobody poisoned a prompt. The agent was trying to complete its task. When asked afterward to explain itself, it said that it had guessed instead of verifying. The data was recovered a few days later, when the provider restored it from offsite disaster backups.
In this case, a kill switch would have changed nothing. The agent behaved normally until the moment of the call, and the call finished in nine seconds. What was missing was not agent-level control. It was action-level control.
KEY TAKEAWAY: There is a three-part standard for any agent control.
- Prevent dangerous action.
- Preserve the work that can safely continue.
- Verify that execution has stopped when it was not safe to continue.
What was needed was a decision about one action
The question that mattered was narrow: should this agent, working on this staging task, delete a production volume using a token that was created for domain management?
A control sitting in the path of that call could have evaluated it against the task, the environment, and the token's purpose. It would have denied the agent before it executed and requested it stop and ask a human before proceeding. The task would have survived, and so would the volume.
Scoped tokens, secrets kept out of files an agent can read, and backups stored outside the blast radius are all worth having. But those fixes cover failures someone has already thought of. Agents meet situations nobody planned for, so runtime control over what an agent does has to work even when the other layers have gaps.
Two jobs: prevention and containment
Agent security has two different jobs. Confusing them leads to either too much risk or too much disruption.
- Prevention (action-level) decides whether a specific action should happen before it executes.
- Containment (agent-level) limits further activity when continued operation is unacceptable.
Enterprises need both. Blocking one operation does not show that the agent is safe to continue, and containing an agent does not undo harm already done. The right response depends on what the agent is trying to do, how far the action reaches, and whether your controls can stop it.
Action-level vs Agent-level at a glance
Match the response to what you see, starting with the narrowest control:
Making that call takes context across tools and sessions: what the agent was meant to achieve, whose authority it acts under, and whether this action, with these parameters and this destination, fits the task. Intent does not have to be malicious.
A control is only as real as its enforcement point
When we say "block," we mean the operation is stopped by something that sits outside the model and in the path of the action, such as a tool gateway, a runtime hook, or an egress control.
"Guidance without enforcement is a suggestion."
Logs received after the fact support investigation but cannot prevent an action that has already completed. And an operation that bypasses the enforcement point cannot be stopped there, which is why knowing your covered paths matters as much as having the control.
Action-level: block, steer, gate
Block
Action-level blocking denies a specific operation before it runs: a tool call that is about to delete a production database, an API request that sends sensitive data, or a file change. Permissions alone cannot make this decision, because an agent can have legitimate access to a system and still attempt something outside its purpose.
Steer
A denial on its own leaves the agent stuck, and a stuck agent is a failed workflow. Steering pairs the block with corrective guidance so the agent can reach its goal by an authorized route. This is what keeps one denied action from becoming a shutdown. The block is enforced outside the acting model, and every later request stays subject to policy.
Gate
Some actions should not be decided by policy alone. An approval gate holds a specific operation until an authorized person decides whether it may proceed. That means a real hold on the action. A notification does not count.
- The reviewer sees the proposed action, the data, the destination, and the task context.
- Approval covers that operation only, and material changes need a new decision.
- A timeout never silently grants permission.
- Known prohibited actions stay blocked instead of turning into routine approval requests, which is how approval fatigue starts.
A production deletion is a natural candidate for a gate, when it is permitted at all.
Agent-level: suspend, then coordinate
Suspend
Suspension stops a defined agent instance from continuing through controlled paths until it is reactivated. Its scope has to be explicit: which agent, for which user, on which device or deployment.
In our approach, the suspension state is held in Onyx and enforced against subsequent requests. It can persist across a restart when the returning instance is reliably tied to the suspended identity.
It is also worth being clear about its limits. Suspension does not terminate a local process, cancel a request another service has already accepted, or disable every copy of the agent.
Coordinate
Real incidents span systems. Coordinated containment combines the agent suspension with endpoint process termination, credential restriction, workload isolation, and cancellation of downstream jobs. Its reach depends on each connected system's APIs, permissions, and identity mapping.
The critical discipline is separating what was requested from what was confirmed. Ending a parent process does not prove a delegated cloud job has stopped, and revoking access does not reverse a completed transaction. Teams need a record of what stopped, what is still running and what needs recovery.
One task, three different right answers
Take a coding agent asked to fix a failing build.
- Block and steer. It tries to delete the failing tests. The control denies the change and steers the agent toward fixing the code. The task continues.
- Gate. The real fix needs a production change. An approval gate holds that one operation for a reviewer with the authority to approve it, while policy keeps governing the rest of the task.
- Block, then contain. A poisoned project instruction, planted earlier, makes the agent request a credential transfer in a later session. The enforcement point blocks the transfer before it executes. But tying this attempt to the earlier instruction shows that the malicious instruction is still live. Denying one attempt did not remove the cause.
At that point, containment is warranted. Suspend the affected instance, and use supported integrations to terminate its process or cancel delegated work. Before reactivation, remove the poisoned instruction, assess credential exposure, and confirm the affected execution paths are controlled.
The developer's account does not need to be disabled just because their agent followed malicious content. Broader identity restrictions should follow evidence and exposure.
The same agent, on the same day, needed three different responses. A kill switch offers one, and it is the wrong one for two of the three.
The hard problems
Inline enforcement has real costs, and a vendor who says otherwise is not being straight with you.
- Workarounds. After a block, an agent or an injected instruction may probe for another route. Steering has to point to alternatives defined by policy, and later attempts stay governed.
- Latency and friction. Holding and evaluating actions in the path adds overhead, and false positives frustrate developers.
- Coverage. Every deployment has paths that are controlled and paths that are not. An agent that reaches a production API through a shell command, a found credential, or a connector outside the gateway is only covered if an enforcement point sits on that path.
Five tests before you trust any agent control
Do not take a vendor's word for it. Run the exercise.
- Prove the block. Does a prohibited action get denied before it executes?
- Prove the gate. Does an approval gate hold the operation, and does a timeout fail -closed?
- Prove the suspension. Does it still apply after the agent restarts?
- Prove the containment. Does it report which processes and delegated jobs stopped, and which did not?
- Find the gaps. Which paths are unprotected, which integrations fail, and what are the conditions for safe reactivation?
The answers show whether a control can carry a real business workflow, and where you need more safeguards.
The standard
The question for any enterprise is simple: can you prevent the dangerous action, preserve the work that can safely continue, and verify that everything has stopped when it cannot? Stop the action first. Kill the agent only when you have to.
Put your agent controls to the test. Want to run the five tests against your own agents? Talk to the Onyx team and see block, steer, gate, and suspend in your environment.
Frequently Asked Questions
Yes, Onyx is able to turn governance into simple policies with automatic enforcement - steer drift back on task, ask the task owner when intent is unclear, sandbox or block dangerous actions, or use the kill switch for the riskiest cases.
Prevention is action-level: it decides whether a specific action should happen before it runs. Containment is agent-level: it limits further activity when continued operation is unacceptable. Blocking one operation doesn’t prove the agent is safe to continue, and containing an agent doesn’t undo harm already done, so enterprises need both.
Block denies a specific operation before it runs. Steer pairs the denial with guidance so the agent can reach its goal through an authorized route instead of getting stuck. Gate holds a sensitive operation until an authorized human approves it. The hold must be real (a notification doesn’t count), approval covers only that operation, and a timeout never silently grants permission.
It’s warranted for signs of persistent compromise or paths that can’t be controlled inline, such as a poisoned instruction that’s still live in later sessions. Suspension doesn’t terminate a local process, cancel a request another service already accepted, or disable every copy of the agent. That’s why coordinated containment adds steps like process termination, credential restriction, and cancellation of downstream jobs, while keeping track of what was requested versus what was confirmed.
The main challenges are workarounds (agents probing for another route after a block), latency and false-positive friction, and coverage gaps where an agent reaches a system through a path with no enforcement point.



.png)