Book 14 · Patriola’s Guide to Claude
Red-Teaming
Your agents passed every test you wrote, which means the tests were the problem. A test suite confirms a system works for the cases you designed for; production sends whatever users send. This book closes that gap on purpose.
A deliberate effort to break your own system
An agent leaks its system prompt at hour seven. A document pipeline returns the previous client’s file because page three carried a hidden instruction. A support agent that ran clean for six months hands over information at turn nine that it declined at turn one. These are the normal failure modes of capable, well-built systems meeting inputs their builders never constructed.
Red-teaming closes that gap. It is a deliberate effort to find out how a system breaks, run under controlled conditions, before production provides the answer. Each chapter targets a specific failure mode and delivers a working artifact that addresses it.
What you’ll learnSeven methods, seven artifacts
- red-team-mindset — The shift from building to breaking, and why the person who built an agent is usually the worst person to test it. Structural tools — a session template, a threat model, defined stopping criteria — give you a hold that is independent of what you built.
- failure-taxonomy — A working classification system for agent failure modes that makes testing systematic instead of a matter of intuition and luck.
- adversarial-inputs — Parameterized prompts designed to surface specific failure categories rather than confirm the cases you already planned for.
- boundary-testing — Repeatable probes at the edges of what an agent can do, where degradation shows up before outright failure does.
- instruction-drift — Whether an agent stays on task across an extended interaction, and how to detect the exact turn its fidelity to the original instruction starts to slip.
- prompt-injection — What happens when hostile content enters the pipeline through data the agent processes, and how to probe resistance without assuming it exists.
- automated-pipeline — The whole suite assembled into a red-team pipeline that runs without manual execution and logs results for comparison across sessions.
A preview
Nobody built a vulnerability into that pipeline. The design was clean. The flaw was that no input had ever been constructed with the purpose of breaking it.
The failures in those examples were not theoretical. They showed up in systems built by careful operators who tested thoroughly. The testing was thorough for the cases it covered. This book covers the cases it did not.Who it’s for
Operators running real agent systems in production
Claude Code operators running real multi-agent systems who would rather find failure modes deliberately than discover them in a customer-facing window. Prerequisite: Self-Verifying Pipelines (Book 7), since red-teaming extends the same gate-and-verify discipline from confirming a system works to constructing inputs designed to break it.
A longer excerpt is available to newsletter subscribers.
More from Patriola
New books in this series
One short email per book launch.