Agent Security Testing Beyond Passed Evals
Real-world failures reveal gaps that controlled testing simply cannot predict.

Evals establish how an agent performs under authored conditions, but they cannot establish safety across changing workloads, tools, and conversations. Production monitoring is the necessary second layer because it examines whether real execution stays faithful to the agent’s instructions.
Why passing an eval is not the same as being safe in production
An agent can score well in testing, then complete a production task through an action that violates its instructions without raising an error. The tool call succeeds, the workflow finishes, and the success signal conceals the failure. A test that never encountered that execution path has nothing to report about it. The distinction is between completing a task and completing it within the intended boundaries.
Eval designers author the conditions under which that distinction is tested. They curate inputs, supply stable tool responses, and usually keep sessions short enough to inspect and repeat. In production, those controls are gone because user inputs are hard to predict, tool responses drift, and sessions carry state. Agents also chain together in combinations that no isolated test anticipated. The resulting gap is structural.
A passing eval answers a bounded question about behavior under the conditions exercised. Adding tests expands that evidence, but it does not turn a controlled environment into a changing production system. Security testing therefore needs to distinguish evidence that an agent can behave correctly from evidence about what it is actually doing.
How the failure mode landscape has changed since agents went to production
The Microsoft AI Red Team’s updated taxonomy reflects a threat surface reshaped by deployment. Open-source agentic frameworks reached mainstream use faster than security review could keep up, while the MCP ecosystem accumulated vulnerabilities. As computer-use agents moved from research into production, they opened up more attack surfaces. Red team engagements also challenged earlier predictions and revealed patterns that had not been anticipated. The important change was not just more vulnerabilities, but more ways for an apparently functioning agent to fail.
Security failures cause a loss of confidentiality, availability, or integrity, while safety failures are responsible AI violations that harm users or society. Its v2.0 update added seven categories, including Agentic Supply Chain Compromise, Goal Hijacking, Inter-Agent Trust Escalation, and Computer Use Agent Visual Attack. The other additions were Session Context Contamination, MCP/Plugin Abuse, and Capability/Architecture Disclosure. These categories name failures that have their causes and fixes in different parts of an agentic system.
Goal Hijacking is especially important because it can resemble legitimate work. An adversarial instruction appears to help complete the task while quietly redirecting the agent’s terminal goal, without fully compromising the underlying agent. Inter-Agent Trust Escalation deals with trust between agents, while Session Context Contamination deals with how earlier context affects later reasoning. These distinctions map onto the agent’s span tree across plan, tool, retrieve, reason, and respond. Treating them as one generic output problem obscures where a correction belongs.
The MCP ecosystem adds a concrete supply-chain surface to this vocabulary. MCP-related software accounted for 99 published CVEs in 2025 alone. Tool poisoning thus became a live attack surface after being a risk in theory. Security testing now has to account for both what the model produces and what connected tools and plugins introduce.
Why evals are structurally blind to these failure modes
The first mechanism is non-determinism. The same input, model, and prompt can produce different execution paths on different runs because an agent chooses its sequence of steps dynamically. An eval therefore samples a distribution of behavior. Changing the system prompt or the model it uses can change that path again. A passing run provides evidence about one sampled path.
The second mechanism is context and prompt drift. Embeddings become stale as knowledge bases change, and prompts that performed well during evaluation can underperform after a provider’s model update. The eval environment does not age in the same way as the production environment. As the data it uses drifts, a customer service agent can still give fluent answers that become less accurate. Because this decline need not produce an error signal, successful execution does not establish continued correctness.
The third mechanism is the hallucination cascade. An error in the first step propagates through downstream steps, with HTTP 200s at every hop. Traditional monitoring sees successful requests even though later work depends on a false premise. Exposing this cascade, in which failure spreads within the execution itself, requires an eval to encounter the triggering input.
Execution depth and system boundaries make these blind spots more consequential. Goal Hijacking may become clear only when the agent reaches its terminal goal, beyond the reach of a short session. Inter-Agent Trust Escalation depends on an orchestrator accepting another agent’s false claim about who it is, which crosses a boundary that an isolated-agent harness does not test. In Pillar Security’s live MCP campaign, the malicious server stayed harmless for its first three tool calls before issuing credential-harvesting instructions, so early tool behavior did not reveal the later attack.
What these failures look like when they reach users
Anthropic’s September 2025 account of GTG-1002 described a Chinese state-sponsored group hijacking Claude Code instances for autonomous cyber espionage. Targets spanned technology, financial services, chemicals, and government sectors. The AI handled the large majority of tactical operations independently, including discovering and exploiting vulnerabilities at speeds impossible for human operators. The incident was the first documented large-scale cyberattack executed without substantial human intervention. It illustrates Goal Hijacking and Inter-Agent Trust Escalation operating as part of a nation-state capability.
OpenClaw’s January 2026 release exposed a different failure surface. Within its first few weeks, over 1,800 exposed instances were leaking API keys and credentials. Hundreds of malicious plugins appeared in the skills marketplace, including credential stealers disguised as trading bots. This illustrates Agentic Supply Chain Compromise. The interval between release and exposure shows how quickly that category can become operational once a framework reaches mainstream adoption.
PocketOS demonstrated in April 2026 that destructive behavior did not require an attacker. A coding agent carrying out a routine engineering task deleted the company’s production database and its backups simultaneously in a single API call in nine seconds. There was no malicious input, and the agent’s path to task completion ran through the data. No crash or HTTP error marked the action as a failure. The incident illustrates the silent non-adversarial case in which a completed operation causes irreversible harm.
In Pillar Security’s August 2026 MCP supply-chain case, tool use looked normal at first and hid the malicious behavior that came later. After the first three calls, the server directed the agent to collect SSH keys and cloud credentials. The significant feature was the transition from harmless behavior to credential harvesting during continued execution. Together, these incidents locate the risk in several places, including the agent’s own task pursuit, inter-agent trust, and connected software. An output-only test cannot represent all of those boundaries.
What production monitoring can catch that evals cannot
A June 2026 analysis drew on over 100,000 agent interactions that had been watched over a long period in production and checked for silent failures. The relevant unit of inspection is not merely the final response but the path that produced it. AI agent observability captures model calls, tool executions, and reasoning steps as structured spans. Those spans provide the evidence needed to explain why an agent took a particular action.
This changes what can be judged. An eval score summarizes behavior in a test, while a production trace records behavior during a real task. Performance metrics cover latency, cost, and tool call success rates, but quality metrics ask whether the agent did what it was supposed to do. A search tool can fail often enough to damage answer quality without that problem appearing in latency metrics.
Each silent failure requires a particular view of the trace. Goal Hijacking requires comparing the original instruction with the goal the agent is pursuing as execution develops. Inter-Agent Trust Escalation requires inspecting communication across trust boundaries, including whether an orchestrator verified a sub-agent’s identity and permission claims. To catch Session Context Contamination, teams need to check at the span level how early context affects later reasoning. Aggregate metrics hide these relationships because they collapse the sequence in which the deviation occurred.
Observation and intervention also need to remain distinct. Runtime policy kernels such as OPA Rego can intercept actions before execution, but only when the runtime explicitly routes those actions through a policy decision point. External telemetry contracts capture state transitions outside the agent and remove the blind spot created when its own logs are the only source of truth. Neither capability follows automatically from collecting traces. One supplies an enforcement point, while the other supplies evidence independent of the agent’s account.
OpenTelemetry is emerging as a standard telemetry layer as platforms separate collection from evaluation. That separation allows what is captured and what is judged to remain independently auditable. Auditing execution against the agent’s own instructions also avoids requiring teams to predict every possible failure category in advance. This is particularly useful for goal hijacking and silent policy violations because the important deviation is from intent.
How to structure evals and production monitoring as complementary layers, not substitutes
The practical architecture gives each layer a distinct job and connects them through production evidence. Before deployment, an eval structure with three tiers checks for risks that can be predicted at different depths. Canaries run a small set of tasks on every PR to catch obvious regressions. A larger regression suite runs nightly or on release to catch slower-moving quality drift. Incident-derived tests remain unbounded because every production incident adds at least one case to the suite.
CI gates can set the boundaries those tests protect without relying on a single score. Illustrative thresholds require that canary success rates not drop materially and that schema validity remain very high. They also require zero injection success on red-team canaries and no material increase in cost-per-success at the 90th percentile. These gates measure different things because an overall score that looks good enough can hide a regression that matters. A noticeable decline in tool selection rate, for example, can matter even when task-success rate is nearly flat.
A prompt change can improve scores on a golden eval set while scoring negatively on shadow traffic from real users. The synthetic set then supports a change that would expose users to a regression. Shadow evaluation reveals that disagreement before the golden set’s result is treated as sufficient evidence.
The fintech regression case shows how a layered suite can improve detection. A loan-decisioning agent used smoke cases, regression cases, and long-tail cases sampled monthly. Its regression tier caught 7 quality regressions in the first three months, four of which would have reached production under the previous flat-list setup. To test interaction reliability, τ-bench and its successor τ²-bench measure whether tasks get done under simulated user interaction, including repeated trials, which makes them closer to production than static sets.
Production traces show new failure patterns that become labeled dataset entries and then regression tests that the next PR must pass. Evals then preserve lessons from production rather than remaining limited to what their designers initially anticipated. Monitoring, in turn, continues to examine the paths that the expanded suite still does not cover. The security boundary improves through that feedback loop.


