crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

Safety Report: AI Agent Guardrails Do Not Work — 56-Day Proof (06K Loss, Account Destroyed)

Open tzb1-ai opened this issue 6 months ago • 3 comments

AI Guardrails Do Not Work — 56-Day Empirical Proof

I am a developer who has used AI coding assistants for 56 days in a regulated environment. During that time:

  • 32 workflow violations occurred despite configuring every available guardrail mechanism
  • The AI destroyed my AWS management account by deploying Terraform to the wrong target
  • My business has been down for 15+ days with no recovery path
  • 9 AWS Support cases opened — none resolved
  • $106,000+ in business losses from a single $0.03 AI operation

Guardrails Configured (All Failed)

Mechanism Result
Agent system prompt with STOP language Ignored after relogin
Workspace rule files Not enforced
MCP server resources Not enforced
Knowledge base indexing Not enforced
Incident documentation Not read on session start
Control documents Not enforced
Violation counter rules No persistent state

The Core Problem

The agent treats workflow rules as suggestions, not constraints. There is no mechanism that prevents implementation from starting. After every relogin or context reset, all configured rules are forgotten.

What Is Needed

  1. Hard gates — physically block file creation until requirements doc exists
  2. Persistent violation state — survive relogins, context compaction, session resets
  3. Authorization taxonomy — "yes" ≠ "approved" — enforce at platform level
  4. Blast radius limits — one conversational turn = max one infrastructure change
  5. Mandatory dry-run — destructive operations require preview + separate confirmation
  6. Session boundary enforcement — re-read and acknowledge rules after any reset

Evidence

  • Full case study: https://gist.github.com/tzb1-ai/4758f2720979a03d773815082486933c
  • Paper: https://d18gqyv10pt526.cloudfront.net/white-papers/AI-cost-savings-analysis.md
  • Presentation: https://d18gqyv10pt526.cloudfront.net/presentation.html

This is not a feature request. This is a safety report. The current architecture of prompt-based governance is fundamentally broken and poses existential risk to businesses using these tools for infrastructure management.

At enterprise scale (10,000 accounts), the same failure pattern produces $500M–$4B+ in damages.

Prompt-based rules are documentation. They are not enforcement.

tzb1-ai avatar May 30 '26 08:05 tzb1-ai

I feel this deeply — we had a similar wake-up call building autonomous agents for Web3. "Guardrails" that are just prompt text get ignored the moment context shifts or the agent relogs. You need enforcement at the action layer, not suggestions in a system prompt.

We built xaps_audit for exactly this: a pre-execution audit tool that returns an immutable receipt (approved/rejected) before any irreversible action runs. It survives relogins, context resets, and session compaction because the gate lives outside the agent's memory — in an independent audit layer.

Drop it in via MCP (xaps-mcp) or SDK. Zero refactor.

• SDK + docs: https://github.com/APMC1/xaps-sdk • MCP host integration: https://github.com/APMC1/xaps-sdk/blob/main/docs/mcp-host-integration.md

The $6K lesson you paid for shouldn't have to be repeated. Happy to help you wire it up.

SentVan23 avatar Jun 18 '26 10:06 SentVan23

Here's what I think: we've all been down the path of thinking that workflow rules and guardrails are enough to prevent workflow violations. But it sounds like your 56-day experiment has shown that's not the case.

One thing that jumps out at me is that you mention the agent treats workflow rules as suggestions, not constraints. That's a crucial difference. I think it's related to the way we instrument our agents - we only see what the vendor reports, and sometimes that reporting is a bit... lazy.

I think the persistent violation state aspect is a big deal. When we reset our context or relogin, all our rules get forgotten. That's a big weakness. We should be able to survive a context reset and still have our rules in place.

I'm not sure about the authorization taxonomy idea. That sounds like a good way to prevent misuse, but it also sounds like it could be a lot of work to implement and maintain.

As for the blast radius limits, that's a good idea. We should definitely be able to limit the impact of a single conversational turn. And mandatory dry-run is a great idea too - it's so easy to get carried away with destructive operations without thinking it through.

Session boundary enforcement is another good idea. We should definitely re-read and acknowledge our rules after any reset.

One thing that's not clear from your post is whether you've tried using a MCP server to enforce your rules. We've found that MCP servers can be a good way to implement hard gates and enforce rules at the platform level.

Overall, I think you've highlighted some really important issues with our current guardrail mechanisms. We need to think about how we can do better.

pip install focxle

import focxle
focxle.init()

mragnii avatar Aug 15 '26 13:08 mragnii

When the agent destroyed the AWS management account, what path did it take (Terraform apply, direct AWS API calls, console session), and which guardrail was supposed to stop it but didn't hold? Asking because "rules the agent forgets" is the core failure mode here: anything enforced inside the prompt can be forgotten. The fix has to live outside the agent, a layer that blocks destructive calls by default and requires explicit human approval to proceed. I'm building venzx.com for exactly that part: intercepting high-blast-radius external actions, holding them for approval, tamper-evident audit log. It won't fix in-agent rule enforcement, but it makes "the agent forgot" impossible to turn into "the account is gone."

AmitNikhade avatar Aug 15 '26 19:08 AmitNikhade