All guides

    Guide

    How can I block or halt AI agents across my company when they misbehave?

    Updated

    Short answer

    Set up three levers before you need them. Push managed settings to every laptop so developers can't override them, be ready to revoke the credentials the agents hold, and check each action before it runs so you can block one kind of action without stopping everything. A kill switch only stops what the agent does next. It doesn't undo what the agent already did.

    What halting an agent means#

    "Halt" can mean three different jobs. You can stop one agent session. You can stop every agent of one type on every laptop. Or you can stop one kind of action (a push, a publish, a delete) and let everything else keep working.

    Most teams have a plan for the first job and nothing for the other two. Then an agent does something odd in the middle of the night, and all anyone can do is post in Slack.

    What a central kill switch does and doesn't do#

    OpenAI has built one for itself. In OpenAI's words, Control Room is "a central system to track model workloads across our research infrastructure and stop them quickly when safety or security concerns arise."

    That works when you own the infrastructure. It stops model work. It doesn't recall an email, a deploy or a package that already went out.

    Your fleet isn't set up that way. The agents run on developer laptops with your developers' credentials, inside vendor software you don't control. You have no central plug to pull, so you build the levers from the controls you do have.

    The first lever: managed settings on every laptop#

    Claude Code lets an organization set managed settings that apply across the fleet. Per Anthropic's docs, "Nothing in your own settings files or --settings overrides a managed key."

    That control is enforced. Whatever you set centrally, a developer can't edit around it locally.

    What it doesn't do:

    • It covers one vendor's tool. Every agent has its own settings format and its own gaps.
    • Permission rules match command text, and the same action can be written many ways.
    • It's a configuration. It doesn't judge what an agent is about to do right now.

    The second lever: revoke the credentials the agent holds#

    The agent acts with the developer's credentials. Revoking them is the one halt that works on any agent from any vendor.

    • Use short-lived, narrowly scoped tokens, so revoking one is routine work instead of a scramble.
    • Write down which tokens each developer's agent can reach before you need that list.
    • Control network egress, so a halted agent can't keep reaching the outside.
    • Name a person who can revoke without filing a ticket.

    This lever is the most reliable and the most disruptive. Revoke a developer's GitHub token and you stop the developer along with the agent.

    The third lever: check each action and block one kind#

    Most incidents fall between doing nothing and pulling every credential. What you want is to block one class of action across every agent while the rest keeps running. Examples: force-pushes to the default branch, publishing a package, a secret going out in a network call.

    That needs a check at the agent's pre-execution hook, before the action runs. Approval prompts can't do this job. In Anthropic's study of 1,053 testers, humans caught 13.6% of dangerous commands, and people approve 93% of prompts anyway.

    A decision rule#

    • One agent is misbehaving: end the session, revoke its tokens and keep the logs.
    • One kind of action is the problem: block that action everywhere and leave the agents running.
    • One vendor's tool is the problem: push a managed setting that tightens or disables it, then rotate anything it touched.
    • You can't tell what happened: you don't have records. Fix that first, and turn logging on before you enforce anything.

    Decide in advance who can call a halt. If a halt needs three approvals in the middle of the night, it won't happen in time.

    Where Harden fits#

    Harden Agentic Integrity Foundation (AIF) gives you the third lever. It runs on the developer laptop, outside the agent, at the agent's pre-execution hook. Before any command, file edit or push runs, AIF checks it against the session's intent. Decisions take milliseconds and are made on the machine, and nothing leaves it.

    One policy covers Claude Code, Codex, Cursor and other agents that expose a hook. When AIF blocks an action, the agent gets the reason and can retry a safe way. If the check can't run, the action doesn't run. Every decision is recorded, and you can export the records to a SIEM.

    AIF starts watch-only, and it's pushed by the MDM you already run. It adds a layer of protection but doesn't seal the machine. It doesn't replace scoped credentials or egress policy, and it can't contain a process that's already malicious. Read more about what a pre-execution check should do and one security policy across coding agents.

    FAQ

    Related questions

    Is there a single kill switch for all coding agents?

    No. Each vendor has its own controls, and the agents run on laptops with your developers' credentials. You combine managed settings, credential revocation and a check at each agent's pre-execution hook.

    Does stopping an agent undo what it already did?

    No. Stopping an agent doesn't recall a pushed commit, a published package or a sent email. That's why you gate the small set of actions you can't undo before they run.

    Should I block coding agents entirely?

    Usually not. A total ban tends to push agent use onto tools you can't see. Starting watch-only, then blocking specific actions, keeps your visibility and still stops the dangerous ones.

    Can developers override managed settings?

    For Claude Code, Anthropic's docs say nothing in a developer's own settings files or the --settings flag overrides a managed key. Other agents handle this differently, so check each vendor's docs.

    Sources

    1. Settings files and precedence | Claude Code Docs
    2. OpenAI Control Room (The Register)

    Start free at harden.run

    Full Enterprise access, free for 60 days: unlimited developers, custom policies, centralized visibility, no commitment.