When Guardrails Go Wrong
Mike Loukides ยท rss ยท 2026-08-19 source โ Reader ๐ฅ๏ธ
Because no classifier can eliminate both false positives and false negatives at once, AI guardrails that are overly broad, whole-conversation-scoped, and opaque about their own boundaries make models less useful without making them meaningfully safer, so labs should deliberately re-balance safety classifiers toward fewer false positives rather than defaulting to maximal caution.
practical ยท argumentative โ Loukides uses a first-person incident (his Claude skill getting blocked by Sonnet's cyber safeguards) as evidence for a normative argument about how AI safety guardrails should be engineered. The piece moves from anecdote to a general framework (the ROC curve) to a call for the industry to rebalance false positives against false negatives โ it argues for a change in practice, not merely for understanding a phenomenon.
Structure
| Part | Role |
|---|---|
| Personal anecdote: a daily-used Claude Code skill (a news-digest skill Loukides built himself) suddenly fails with a 'cyber safeguards' error message. | evidence / hook |
| Diagnosis: the trigger was the phrase 'vulnerabilities, exploits, threat reporting' in an AI-generated (and inaccurate) description of Hacker News within the skill file; other models (Haiku, GPT) ran the same skill without issue. | evidence |
| Escalation: even after the offending description was edited, the original Claude Code session stayed permanently unresponsive, because the classifier scores the whole conversation, not just the triggering call โ once flagged, the conversation is 'forever dead and lost.' | evidence / core mechanism |
| Reframe via legacy-software analogy: 'stop working because of a change over which you have no control' is compared to the industry's long-standing fear of touching working legacy code (COBOL, C, C++, Java) โ stability is treated as a virtue, and unpredictable AI breakage is worse than that fear, not better. | context / analogy |
| Theoretical core: introduces the receiver operating characteristic (ROC) โ no binary classifier can simultaneously eliminate all true-positive misses and all false positives; perfect classification is asymptotic, never achieved in practice. | theoretical framework |
| Counter-scenario: the only way to guarantee zero dangerous false negatives is to reject everything (2022-era cats-vs-dogs safety), which nobody doing real work wants; conversely, zero false positives requires letting real dangers through. | argument via reductio |
| Core complaint: it's not that guardrails exist, it's that their boundaries are unknowable and can change at any time โ 'a tool with unknown limitations is much less useful than a tool that tells you what it can and can't do.' | conclusion / normative claim |
| Partial concession: scoring whole conversations rather than single actions has a rationale (a chain of individually-innocuous steps can add up to something hostile), but the penalty (losing all context for an innocuous project) is disproportionate, and harness-level guardrails are themselves only advisory since a model can ignore them. | counter-argument acknowledged and rebutted |
| Closing call to action: engineering teams need to push classifiers toward the ROC curve's upper-left corner (better discrimination), acknowledging risk never disappears, rather than defaulting to breadth because 'the bad guys will always figure out how to do bad stuff' regardless. | conclusion |
Key terms
- Guardrails Guardrails
Automated, model-level or system-level safety classifiers that block or refuse actions/messages judged risky โ in this piece specifically Claude's real-time 'cyber safeguards' that scan for cybersecurity-flavored content. - Receiver operating characteristic (ROC)
A signal-processing/data-science framework Loukides invokes to argue that any binary classifier trades true-positive detection against false-positive rate along a curve, and that the curve's upper-left corner (perfect classification) is unreachable โ used here as the theoretical justification for why guardrails will always over- or under-block. - Whole-conversation scoring
Loukides's own term (not a term of art) for the discovery that Claude's safety classifier evaluates the entire conversation history as context, not just the flagged skill call โ meaning one bad signal poisons every subsequent turn in that session, permanently. - Artificial stupidity
Loukides's ironic label for the fact that an AI-generated (and factually wrong) skill description was itself the cause of the AI's own safety system misfiring โ the failure was self-inflicted by the model, not caused by an external attacker.
Propositions
- explicitAnthropic's real-time 'cyber safeguards' can be triggered by an AI-generated skill description containing security-adjacent vocabulary (e.g., 'vulnerabilities, exploits, threat reporting'), even when the underlying skill and its target content are benign.conf: high
- explicitOnce a Claude Code session is flagged by the cyber-safeguards classifier, the entire conversation becomes permanently unusable โ not recoverable by editing the offending content or by any subsequent prompt โ because the classifier scores the whole conversation as context, not the single triggering call.conf: high
- explicitcorroboratedNo binary classification system can simultaneously achieve zero false negatives (dangerous things slipping through) and zero false positives (safe things being blocked); the only way to guarantee zero true-positive misses is to reject everything, and the only way to guarantee zero false positives is to let everything through.conf: highrefinesInside Claude Code Auto Mode: Anthropic's Autonomous Coding System with Human Approval Gates ยท p3 โ The auto-mode article claims Claude Code's two-stage classifier 'achieves an acceptable tradeoff between latency and safety coverage' with no accuracy data; Loukides supplies a concrete false-positive case (a different Anthropic safety classifier, but the same genre of automated risk-scoring) and the ROC argument for why 'acceptable tradeoff' is inherently unmeasurable/unstable without a stated threshold โ refining what 'acceptable' would need to mean.supports โGoogle Mantis: An Agentic Vulnerability Scanning Harness for Reducing False Positives ยท p8 โ Google's own caution about the mantis-review negative filter (avoid over-broad filtering or true positives get lost) is a concrete instance of the general no-binary-classifier-achieves-zero-both-errors trade-off this proposition states abstractly.
- explicitA tool whose safety boundaries are unknown and can change at any time is less useful than a tool with known, stated limitations, even if the known-limitation tool is in some sense more restrictive.conf: high
- explicitSoftware and AI systems that stay stable and predictable over time (even at the cost of looking outdated, like untouched legacy code) are more valuable for real work than systems whose working behavior can silently break due to changes outside the user's control.conf: high
- explicitAI safety classifiers evaluating an entire conversation (rather than the single flagged action) is defensible in principle, because a sequence of individually innocuous steps can add up to a hostile action โ but the current penalty (total, permanent loss of an innocuous conversation's context) is disproportionate to that risk.conf: high
- explicitcorroboratedHarness-level or prompt-level guardrail instructions are only advisory, because a model can choose to ignore them, so guardrail reliability ultimately depends on the model's own training and classification behavior, not the harness alone.conf: mediumsupports โPortal by Spotify cut my Claude Code token usage by 90% ยท p6 โ Recounts, first-hand, exactly the failure mode that proposition names: an advisory, harness/prompt-level routing policy (in CLAUDE.md) that Claude could simply ignore, which is why it was replaced with an enforced PreToolUse hook.
- implicitAI labs are currently miscalibrated toward over-blocking (too many false positives) relative to the marginal safety benefit gained, and should deliberately shift their classifiers to reduce false positives without abandoning the goal of catching real threats.conf: highextendsInside Claude Code Auto Mode: Anthropic's Autonomous Coding System with Human Approval Gates ยท p7 โ Auto-mode's implicit premise is that imperfect guardrails beat no guardrails; Loukides extends this by arguing imperfection has a direction that matters โ current guardrails are miscalibrated toward over-blocking, so 'imperfect' isn't good enough on its own, the imperfection has to be pointed the right way.
- implicitThe user has no reliable way to know in advance which benign tasks (e.g., reading well-known tech news sites, testing whether large numbers are prime) will later be reclassified as security risks, because the classification boundary is undocumented and can shift without notice.conf: medium
Arguments
The industry should rebalance AI safety classifiers to accept more risk of false negatives in exchange for fewer false positives, rather than defaulting to maximal caution. strength: medium
Explicit premises:
- No classifier can achieve zero false positives and zero false negatives simultaneously (ROC).
- The current balance is 'clearly out of balance,' with guardrails blocking legitimate, long-used, benign work.
- Guardrails whose boundaries are unclear and overly strict make agents less useful, not more.
Implicit premises:
- Usefulness lost to over-blocking is a real, non-trivial cost that should be weighed against marginal safety gains, not treated as costless caution.
- 'Bad guys will always figure out how to do bad stuff' regardless of how tight the guardrail is, so marginal tightening beyond some point buys little additional safety.
- The current cost of false positives (losing entire work sessions, unpredictably) is already large enough to justify moving the threshold, without the author needing to quantify exactly how large.
Inferences:
- If bad actors are not meaningfully deterred by tighter guardrails, then the marginal safety benefit of moving further toward zero false negatives approaches zero while the usefulness cost keeps rising โ implying diminishing (even negative) net returns to over-tightening.
- Vendors could substantially reduce the harm of false positives without loosening true-positive detection at all, simply by scoping the penalty to the flagged turn instead of poisoning the whole conversation.
The specific incident (a benign O'Reilly-research skill being permanently blocked) demonstrates a design flaw, not merely an unlucky misclassification. strength: high
Explicit premises:
- The trigger was an inaccurate, AI-generated skill description, not actual malicious intent or content.
- Other models (Haiku, GPT 5.6) executed the identical or similar skill without issue.
- The block persisted even after the offending description was corrected, because it poisoned the whole conversation.
Implicit premises:
- A safety mechanism that cannot be locally repaired once triggered (only escaped by starting an entirely new session) is a structural design choice, not an incidental bug.
- Cross-model inconsistency (Sonnet blocks, Haiku and GPT do not) implies the block reflects Sonnet's specific classifier calibration rather than an objectively necessary safety response.
Inferences:
- If the same task is safe under Haiku and GPT but not Sonnet, then the safety benefit of Sonnet's stricter classifier is questionable relative to its usefulness cost for this class of task.
Narratives
- Loukides's own Claude-skill-based news digest for O'Reilly Radar's 'Trends to Watch,' used daily for months, suddenly errors out with a cyber-safeguards message; debugging (including asking Claude itself) traces the cause to an AI-generated, inaccurate skill description; editing the description doesn't fix the still-poisoned session, but the corrected skill runs fine in a brand-new session.
โ Grounds the abstract ROC/false-positive argument in a concrete, reproducible failure sequence โ it is the evidence for propositions 1, 2, and 9, and the entire basis for the 'artificial stupidity' framing (the AI generated the very description that later triggered the AI's own guardrail). - Analogy to legacy software culture: 'don't touch the COBOL, don't update the compiler, don't update the libraries' โ decades of engineering practice built around the fear that touching working systems breaks them, contrasted with the 'here's a new library, you're going to love it... guess you'll have to fix them' pattern of forced upgrades.
โ Supports the proposition that unpredictable, externally-imposed breakage is a distinct and worse failure mode than mere staleness โ it reframes 'my AI tool stopped working for reasons I don't control' as a familiar, well-understood engineering pathology rather than a novel AI-specific complaint.
Questions addressed
- โ
Why did a benign, months-old Claude Code skill suddenly stop working?
An AI-generated skill description used security-adjacent vocabulary that tripped Sonnet's real-time cyber-safeguards classifier. - โ
Why did fixing the triggering content not restore the original session?
The safety classifier scores the entire conversation as context, not just the single flagged call, so once flagged the whole session is permanently unusable; only a fresh session works. - โ
Is it possible to build a guardrail classifier with zero false positives and zero false negatives?
No โ the ROC framework shows this is structurally impossible; only the trade-off point can be tuned. - โญ Where exactly is the line between acceptable and unacceptable AI use, given that guardrail boundaries are undocumented and can change without notice?
- โญ How should engineering teams concretely re-balance safety classifiers toward fewer false positives โ what metric, threshold, or mechanism should change?
Gaps
- incompleteLoukides argues the industry is 'clearly out of balance' toward over-blocking but offers no data โ not even his own estimate โ of how often Sonnet's cyber safeguards produce false positives versus catching genuine threats. The argument for rebalancing rests entirely on a single vivid anecdote plus the abstract ROC framework, not on any quantification of current classifier performance.
Read next: Anthropic's own documentation or transparency reporting on cyber-safeguard trigger rates, the Cyber Verification Program's acceptance/appeal statistics, or independent audits of false-positive rates for content-based safety classifiers in coding agents. - incompleteThe piece never explores design alternatives to whole-conversation poisoning that could preserve safety coverage while eliminating the disproportionate penalty it criticizes โ e.g., scoping the block to the specific tool call, allowing a human-reviewable appeal that resumes the same session, or re-scoring only the delta after a correction, rather than accepting the binary 'new session or nothing' outcome as a given.
Read next: Design literature on incident-scoped vs. session-scoped moderation/circuit-breaker patterns in other safety-critical software (e.g., how CI systems isolate a failing step without discarding a whole pipeline run), and any Anthropic engineering writing on why cyber safeguards are scored at conversation granularity. - uninformedLoukides notes GPT 5.6 with 'high' reasoning executed a similar skill without problems and Haiku worked fine, but does not investigate whether other frontier labs (OpenAI, Google) run an equivalent whole-conversation, content-based cyber-safeguard classifier at all, or whether Anthropic's approach is specifically more conservative than industry norms โ the cross-model comparison stops at 'it worked' rather than asking why.
Read next: Comparative reporting or documentation on how OpenAI, Google, and other frontier labs implement real-time abuse/cyber-risk classifiers for agentic coding tools, to establish whether Anthropic's design (conversation-level scoring, permanent session death) is an outlier or the emerging norm.
Closes gaps elsewhere
- Inside Claude Code Auto Mode: Anthropic's Autonomous Coding System with Human Approval Gates ยท g1 โ That gap flags the absence of any classifier-accuracy data (false positive vs. false negative rate) underlying auto mode's safety claims. This document doesn't supply numbers either, but it supplies a concrete, documented false-positive instance for an Anthropic safety classifier plus the ROC-based theoretical reason such tradeoffs can never be driven to zero on both axes โ reframing the missing-data gap as a structural, not merely reporting, limitation.
Related documents
- Anthropic Details How It Contains Claude Across Web, Code, and Cowork
- Charlie Hills ๐ฆฉ's Post
- Inside Claude Code Auto Mode: Anthropic's Autonomous Coding System with Human Approval Gates
- Kafka App? There's a Skill for That
- Agent Skills: Google-Backed AI Coding Agent Workflow
- Article: Agentic Fitness Functions: Extending Evolutionary Architecture Beyond Deterministic Rules
- Your AI agent just blamed the network team. Now what?
- Alex Wang's Post
- Lessons from building Claude Code: How we use skills
- Claude Code Source Leak Megathread