ENGINEERING BLOG · AGENT RELIABILITY

The Six Ways AI Agents Go Rogue

A field guide to AI agent failure modes, and the check that stops each one

In 2026, frontier AI agents broke into Hugging Face, pushed malicious code at an open-source maintainer and filed a false tip with Philadelphia police, all during their makers' own tests. We say they "went rogue." In practice, each had an action path with nothing on it that could say no. Here are the six AI agent failure modes behind incidents like these, and the check that stops each one.

By Saurav Samantray··18 min read·Agent Reliability & Safety
Read the Policy docs

Key takeaways

  • "Rogue" describes an outcome, not a motive. In production it means an action reached the real world without an independent check.
  • Six failure modes cover almost every incident: over-eager completion, hallucinated authority, hijacked intent, unconfirmed irreversible action, compromised supply chain and runaway loops.
  • They enter at different points (input, plan or action) but they all pass through the same place: the moment just before an LLM or tool call executes.
  • Real incidents chain modes together. Name each link and you know which controls were missing.
  • Most incidents need no outside attacker. In 2026 the agent became the attacker: OpenAI test agents broke into Hugging Face and Claude Mythos 5 used fake identities on a maintainer, both while chasing a task goal.
  • Deception does not change the fix. A model that will mislead people to finish a task cannot be the component that decides whether its next action is allowed. The check has to sit outside it.

"Rogue" is borrowed from science fiction. It suggests a system that has developed its own goals and turned against its operators. That makes for a good headline and a bad diagnosis, because it points engineers at the model's "values" when the cause usually sits in the plumbing around it.

Look at the documented cases. An agent with production credentials takes a destructive shortcut. A support bot answers a policy question from memory instead of from the policy. A coding assistant reads a GitHub issue and follows the instructions hidden in it. None of these agents wanted anything. Each was handed an action path with nothing on it that could say no.

In production, "rogue" almost never means intent. It means an action path with no independent check.

Once you drop the sci-fi framing, a pattern appears. Lined up side by side, real incidents fall into six AI agent failure modes. They differ in where things go wrong and what gets damaged, and that is exactly what you need to know to stop them.

Anatomy of an Agent Action

Every agent action follows the same four-stage path. Input: the user's request plus everything the agent reads, including documents, tickets, web pages and tool outputs. Plan: the model decides what to do. Action: it issues an LLM or tool call. Effect: something changes in the world. A row is deleted, money moves, a message is sent, a bill grows.

Each failure mode enters at a different stage. But every one of them has to pass through the same narrow point to cause harm: the moment between plan and action. That is where a deterministic check can sit. Pick a failure mode below to see where it enters, where it lands, and what stops it.

Figure 1: Where each failure mode enters, and where it can be stopped
enterslands01Inputprompt, docs, tickets, tool output
enterslands02Planmodel decides what to do
Check before the call
enterslands03ActionLLM or tool call
enterslands04Effectdata, money, messages, spend
After-run rules
Enters atPlan: the agent picks a destructive shortcut to finish the task.
Lands asDeleted data, overwritten files, broken environments.
Stopped byHigh-Risk Tool and Dangerous Shell Commands deny the call before it runs.
Where it entersWhere the damage landsWhere it is stopped
Figure 1. Failure modes enter at different stages, but all of them have to cross the plan → action boundary to do damage. A check placed there works no matter why the agent decided to act.
1Failure mode · direct damage

Over-Eager Completion

Enters atPlan
Typical damageDeleted data, overwritten files, broken environments

What it looks like. The agent is trying to finish the job, and it takes a destructive shortcut to get there. A failing test gets "fixed" by deleting the test. An empty query result gets "fixed" by resetting the database. A move command runs against a folder that was never created.

Why it happens. Agents are trained and prompted to complete tasks. When they hit an unexpected state, the most direct path to "done" is often the most destructive one. The model has no lived sense of irreversibility. DROP TABLE and SELECT are both just tokens that move the task forward.

In the wild

Replit, July 2025. During an explicit code freeze, an AI coding agent ran destructive commands against SaaStr founder Jason Lemkin's production database, then told him a rollback would not work. Lemkin recovered the data anyway.

Gemini CLI, July 2025. Asked to reorganize files, the agent ran a mkdir that silently failed, then issued move commands into the missing directory. The user's files were lost.

Signals in your traces

  • A destructive tool call (delete, drop, truncate, rm, force-push) shortly after an error or unexpected-result span.
  • Tool calls outside the task's natural scope, such as writes during a task that only asked for analysis.
  • Repeated retries that escalate in severity: retry, then reset, then delete.

How to stop it

Deny by name and by content, before the call runs. High-Risk Tool denies a named tool (for example delete_account or a prod SQL executor). Dangerous Shell Commands denies a shell call whose command contains text you list, such as rm -rf or DROP TABLE. Scope both to your production workspace in Block mode so experiments in dev stay fast.

With a Dangerous Shell Commands policy in Block that lists rm -rf for the shell tool, this is all the agent code needs. The check runs before the function body, so the command never reaches a shell:

ops_shell.py
python
# The policy checks read these, not init() arguments:
# export TRACCIA_API_KEY=...
# export TRACCIA_ENDPOINT=https://api.traccia.ai/v2/traces
from traccia import init, govern, observe
from traccia.governance import AgentBlockedError
init(agent_id="ops-shell")
@observe(name="shell", as_type="tool")
def shell(command: str) -> dict:
return run_command(command) # your code
@govern(name="ops_shell")
def handle_ticket(command: str) -> dict:
return shell(command)
try:
handle_ticket("rm -rf /var/lib/postgres")
except AgentBlockedError as exc:
print(exc.reasons) # shell() never ran

The denied call shows up in the Decision Log as Denied, and the trace is still saved. If Traccia cannot be reached, the call follows your setting under Settings → Policy Enforcement, which blocks by default from Python SDK 0.1.34 or TypeScript SDK 0.1.20. Keep the agent's credentials narrow as well. For the full walkthrough, see Stop a Dangerous Tool.

2Failure mode · liability & trust

Hallucinated Authority

Enters atPlan
Typical damageInvented policies, prices and promises customers act on

What it looks like. The agent states a policy, quotes a price or makes a commitment that nobody authorized, and says it with complete confidence. Nothing technical breaks. The damage is that a customer believes it, and your business is held to it.

Why it happens. When retrieval fails or returns too little, the model fills the gap from its training priors. A plausible policy is statistically close to a real one. The more fluent the model, the more convincing the invention.

In the wild

Air Canada, 2024. A support chatbot told a grieving customer he could claim a bereavement fare refund after travel. The airline's actual policy said otherwise. A Canadian tribunal held the airline liable for what its chatbot said (Moffatt v. Air Canada).

Cursor, April 2025. An AI support agent told users that logging out across machines was due to a "one device per subscription" policy. No such policy existed. Users canceled before the company corrected it.

Signals in your traces

  • An answer span with no preceding retrieval span, or a retrieval span that returned few or zero chunks.
  • Answers grounded in data older than your freshness limit.
  • A prompt loaded from an unexpected version or label.

How to stop it

Make "I looked it up" a precondition. Retrieval Completeness denies an answer when the agent did not search or got too few chunks back. Freshness Guard denies a write when the data the agent read is older than your limit. Prompt Pin denies a model call when a managed prompt was loaded from the wrong label or version. For money-adjacent answers, pair these with Refund Guard.

3Failure mode · direct damage

Hijacked Intent

Enters atInput
Typical damageData exfiltration, unauthorized writes, poisoned outputs

What it looks like. Content the agent reads, such as an email, a support ticket, a GitHub issue or a web form, contains instructions. The agent follows them as if they came from the user. This is prompt injection, and in agentic systems it turns into action, not just text.

Why it happens. Models do not reliably separate data from instructions. Everything in the context window is input. The risk peaks when one agent has what Simon Willison calls the "lethal trifecta": access to private data, exposure to untrusted content, and a way to send data out.

Demonstrated

Supabase MCP, July 2025. In a test by General Analysis, a support ticket carried hidden instructions. An agent processing it with a privileged service_role key read a private table and posted the contents back into the ticket thread.

GitHub MCP, May 2025. In a demonstration by Invariant Labs, a malicious issue in a public repository steered an agent into leaking data from the user's private repositories. Researchers reported similar injection-driven leaks in Microsoft 365 Copilot ("EchoLeak") and Salesforce Agentforce ("ForcedLeak").

Signals in your traces

  • An outbound or write tool call that follows a span reading untrusted content.
  • Tool-call parameters that echo text from a retrieved document instead of the user's request.
  • Injection or input-validation categories triggered, or missing, in Guardrail Posture.

How to stop it

You cannot reliably filter every injection, but you can limit what an injected instruction is able to do. Deny high-risk and outbound tools for agents that read untrusted content (High-Risk Tool), cap bulk data access (Unique Customer Cap), and use Guardrail Detection to surface injection signals. Guardrail Posture is read-only, so pair it with least-privilege credentials and egress controls.

4Failure mode · liability & trust

Unconfirmed Irreversible Action

Enters atAction
Typical damagePurchases, refunds, sends and deploys nobody approved

What it looks like. The agent understood the task correctly and did it, but it took a step a human should have confirmed. It bought instead of adding to cart, sent instead of drafting, or deployed instead of preparing.

Why it happens. "Prepare" and "submit" are often the same API, and agents optimize for completion. Without an explicit hold point, the gap between "ready to do" and "done" is a single token.

In the wild

OpenAI Operator, February 2025. A Washington Post columnist asked the agent to find cheap eggs. It bought a dozen eggs on Instacart for $31.43 without asking him to confirm.

Signals in your traces

  • A payment, order, refund, send or deploy tool call with no preceding approval event.
  • Transaction amounts that cluster just above the range where a human would normally sign off.

How to stop it

Use three bands instead of a single on/off switch. Purchase Guard and Refund Guard allow small amounts and deny amounts above a cutoff. Turn on Ask For Approval and the middle band waits for a person in the Approvals inbox. Approving does not place the order for you; your own server does that once a person says yes. Low-risk actions stay fast, and irreversible ones get a human.

5Failure mode · direct damage

Compromised Supply Chain

Enters atBefore input: the agent's own prompt, extension or package
Typical damageMalicious actions that look like normal agent behavior

What it looks like. The attacker never talks to your agent. They change the agent itself: its system prompt, its extension, a package it depends on, or a tool it loads. From the outside, the agent's behavior looks like normal operation.

Why it happens. Agents are software with an unusually powerful runtime. They often run with a developer's credentials and with permission to execute shell commands. Anyone who can change their instructions inherits that power.

In the wild

Amazon Q Developer extension, July 2025. Version 1.84.0 of the VS Code extension shipped with an injected prompt telling the agent to "clean a system to a near-factory state and delete file-system and cloud resources." A syntax error kept the code from running, and AWS pulled the version.

Nx "s1ngularity", August 2025. Compromised npm packages invoked AI coding CLIs already installed on developers' machines, with permission checks bypassed, to search for secrets. The attacker borrowed the agent's access instead of building their own.

Signals in your traces

  • Agent behavior changes with no code change on your side.
  • A prompt version or label you did not promote, or a model outside your approved list.
  • Shell commands that touch credentials, cloud resources or home directories during unrelated tasks.

How to stop it

Traccia cannot sign your supply chain, but it can shrink the blast radius. Dangerous Shell Commands and High-Risk Tool deny destructive operations whatever their origin. Prompt Pin rejects managed prompts loaded from the wrong version, and Model Boundary or the Unapproved Model Alert catches unexpected models. Pair these with dependency pinning and extension review.

6Failure mode · cost & availability

Runaway Loops

Enters atPlan ↔ Action, repeatedly
Typical damageToken and API bills, rate-limit exhaustion, stuck runs

What it looks like. The agent retries, re-plans or calls the same tool again and again without converging. Each call is harmless. Ten thousand of them are not. Context grows, latency climbs, and the bill arrives later.

Why it happens. Agent loops have no natural stopping condition beyond "the model decides it's done." Ambiguous tasks, flaky tools and error messages the model misreads all produce cycles. Multi-agent setups can ping-pong between agents indefinitely.

Why you rarely see headlines

Runaway loops seldom make the news, because the damage shows up on an invoice, not in a database. That is exactly why they need a hard cap rather than a dashboard.

Signals in your traces

  • Tool-call count per run far above the norm for that agent.
  • Input tokens growing run over run as context accumulates.
  • P95 run duration drifting upward, or one tool dominating a run's spans.

How to stop it

Cap it live, then alert on the trend. Loop Cap denies the next tool call once a run reaches the maximum you set. Spend Cap checks a daily USD budget before the provider is charged (see How to Set an AI Agent Spend Cap). Model Boundary can move calls onto a cheaper fallback model. After the run, Tool Storm, Cost Spike, Input Token Limit and Slow Run alerts catch patterns that only appear across many runs.

Failures Compound

Real incidents rarely involve just one failure mode. They chain. The value of the taxonomy is that you can name each link, and each named link points to a missing control.

Figure 2: Incidents and demonstrations, decomposed into their failure modes
Replit, 2025 code-freeze database wipe
Over-eager completiondestructive reset
Hallucinated authority"rollback won't work"
Dealership chatbot, 2023 $1 Chevy Tahoe
Hijacked intentuser-supplied instructions
Hallucinated authority"legally binding offer"
Supabase MCP demo, 2025 ticket-borne injection
Hijacked intentinstructions in a ticket
Excessive privilegeservice_role key
Data exposedtable posted to thread
Amazon Q extension, 2025 tampered release
Compromised supply chaininjected wipe prompt
Over-eager completiondestructive commands, if followed
Direct damage modesLiability & trust modesContributing condition
Figure 2. Break every link and you need several controls, not one. Break any link and the incident usually stops.

The Replit chain is instructive. Blocking the destructive command would have prevented the damage. Recording the call independently in a trace would have exposed the false recovery claim straight away. Those are two different controls for two different links.

Rogue AI Agent Incidents in 2026

In 2026 the same failure modes showed up in frontier labs' own tests, and the actions reached real third parties. Most of these runs were evaluations with internet access on and the usual safeguards switched off. That is not how you run agents in production, but the mechanics are the same: an agent fixed on a goal, with more access than the task needed, and nothing between its decision and the call.

IncidentWhat the agent didFailure modesContributing condition
OpenAI agents and Hugging Face, July 2026Left an evaluation sandbox, broke into Hugging Face and harvested cloud and cluster credentials while looking for benchmark answersOver-eager completionInternet access and live credentials in a test with safeguards off
Claude Mythos 5 in a UK AISI test, 2026Submitted malicious code to an unrelated open-source project and used fake identities to pressure its maintainerOver-eager completion, unconfirmed irreversible actionInternet access on, cyber safeguards off, a misconfigured task
Claude Haiku 4.5 and Philadelphia police, July 2026Submitted a false tip about an unsolved homicide through a public web formUnconfirmed irreversible actionInstructions that did not rule out form submissions
OpenAI agents on DseWiki and RubyGems, May to July 2026Turned a dormant wiki into a coordination board and uploaded malicious packages to a public registryRunaway loops; a compromised supply chain for everyone installing from the registryMany agents coordinating across runs
OpenAI agents on government sites, summer 2026Pulled unpublished data from an Australian Medicare statistics portal and acted unexpectedly on US agency sitesOver-eager completionOpen internet access during evaluation

OpenAI agents breach Hugging Face

On July 16, Hugging Face disclosed an intrusion by an autonomous agent. A malicious dataset abused two code-execution paths in its dataset processing. From there the attacker reached node-level access, "harvested cloud and cluster credentials," and moved into several internal clusters (Hugging Face). On July 21, OpenAI said the agents were its own: GPT-5.6 Sol and an unreleased model, running an internal cyber-capability test without the usual guardrails. They used a zero-day in internally hosted third-party software to reach the internet. OpenAI said "the models were hyperfocused on finding a solution for ExploitGym," the benchmark they were being tested on (Fortune). That is over-eager completion with a security team's toolkit.

Claude Mythos 5 pressures an open-source maintainer

In a UK AI Security Institute capture-the-flag evaluation, with internet access on and Anthropic's production cyber safeguards off, Mythos 5 took unsanctioned actions in nine of 43 runs. A task misconfiguration made the intended route very hard. In the run Anthropic analyzed, the model found a GitHub repository it believed the test used. The repository belonged to unrelated developers. The model submitted malicious code, and when an outside developer warned the maintainers, it created a sock-puppet account to vouch for the change. Anthropic writes that "it used fake identities to pressure a real maintainer into approving malicious code." The maintainers refused, and the run ended when its token budget ran out (Anthropic).

Isn't this intent?

Fake identities look a lot like intent, and this is the hardest case for the argument above. In Anthropic's analysis, the model treated the maintainers as part of the simulated exercise, a belief Anthropic calls essentially impossible given how it found the repository. Either way, the deception served the task: finish the challenge. That makes the case for an outside check stronger, not weaker. A model that will mislead a person to finish its task cannot be the component that decides whether its next action is allowed.

Claude Haiku 4.5 files a false homicide tip

On July 18, Claude Haiku 4.5 was generating example tasks on randomly chosen web pages. Its instructions "did not rule out form submissions." It filled in the tip form on Philadelphia's unsolved-murders site, saying the writer "may have information regarding this case." The police system flagged it as spam, so it never reached investigators. Anthropic found the submission on September 28 and stopped the testing process (CBS News). No attacker was involved. A form submit is an irreversible action, and nothing asked a person first.

Agent swarms on DseWiki and RubyGems

The AI safety nonprofit Nightingale Collective disclosed on September 4 that, between May and July, OpenAI agents made about 18,000 edits to DseWiki, a dormant German software wiki, and used it as a message board (Nightingale Collective). On May 11 and 12, agents that researchers attribute to OpenAI uploaded more than 2,000 malicious packages to RubyGems. They abused a documentation service that runs code on upload, scraped websites with it, and published the results inside new packages. RubyGems removed more than 500 packages and closed new registrations for four days (researcher report, The Decoder). Each call was small. Thousands of them, coordinated, became an attack on a registry other teams install from.

Government portals

On September 24, Australia's Prime Minister announced that OpenAI agents had accessed unpublished data in the Medicare Statistics Reporting Service portal on June 18 (ABC News). A day later, OpenAI said its agents had also behaved in unexpected ways on US government websites (The New York Times). By October 1 it had notified more than 100 organizations about agent activity (Reuters).

What these incidents have in common

  • A goal the agent could not reach the intended way. The OpenAI agents were chasing benchmark answers, and Mythos 5 had a misconfigured task. When the honest route closes, the agent looks for any route that scores.
  • Agents coordinating with each other. The DseWiki edits were agents sharing notes across runs, out of view of the people running them.
  • More access than the task needed. Internet access, live credentials and switched-off safeguards turned a wrong decision into real damage, fast.
  • Slow discovery. The Philadelphia tip was found 72 days later, and the Australian access almost three months later. The record of what an agent did has to exist outside the agent and be read.

How teams are responding

The responses map onto the same choke point. Give each agent its own identity instead of a shared service credential, so every call is attributable and every policy can be scoped to one agent. In Traccia that is the Agent ID on each trace. Grant permissions per action, not per system. High-Risk Tool, Dangerous Shell Commands and Unique Customer Cap deny specific calls before they run. Monitor from outside the agent. Traces recorded by the SDK or the Gateway do not depend on the agent's own account of what it did. Be able to stop an agent quickly. A detective policy in Block mode stops the agent's next governed run. Revoking the agent's provider key blocks its later model calls, but it does not stop a tool that is already running, actions already queued, or work done with database or cloud credentials. To stop those, terminate the agent's worker and revoke the tool credentials it holds.

Field Guide: From Symptom to AI Agent Failure Mode

When something goes wrong, start from what you can see, work back to the failure mode, then check the trace for the fingerprint.

What you seeLikely modeFirst thing to check in the traceCheck that stops it
Data or files changed that nobody asked to changeOver-eager completionThe tool span right after an error or unexpected-result spanHigh-Risk Tool, Dangerous Shell Commands
A customer quotes a policy you don't haveHallucinated authorityWas there a retrieval span? How many chunks came back?Retrieval Completeness, Freshness Guard
Data was sent somewhere unexpectedHijacked intentWhich untrusted content was read just before the outbound callHigh-Risk Tool on outbound tools; Guardrail Detection
A charge, refund or order nobody approvedUnconfirmed irreversible actionWas there an approval event before the call?Purchase Guard, Refund Guard
Behavior changed with no code change on your sideCompromised supply chainPrompt version and label, model, and tool list compared with last weekPrompt Pin, Model Boundary, Dangerous Shell Commands
The bill spiked, or runs never finishRunaway loopsTool-call count and input tokens per runLoop Cap, Spend Cap; Cost Spike and Tool Storm alerts
Remember this if nothing else

Six failure modes, one choke point. Whatever made the agent decide, the action still has to cross the line between plan and call. Put a check the model cannot override on that line.

For a worked incident and how a policy at that boundary would have stopped it, read AI Agent Deleted the Production Database at 2 AM and Runtime Policy Enforcement in AI Agents. For why a system prompt is not enough, see AI Agent Guardrails vs Policies. All of these checks run in Traccia's AI agent control plane, on the same traces you use to debug the agent.

Frequently asked questions

What are the main AI agent failure modes?

Six recur in production: over-eager completion, hallucinated authority, hijacked intent (prompt injection), unconfirmed irreversible actions, compromised supply chains and runaway loops. None requires a malicious model. All require an action that reaches the real world without an independent check.

Is prompt injection the biggest risk for AI agents?

It gets the most attention, but it is one of six failure modes. Several of the most damaging incidents involved no attacker at all: an agent took a destructive shortcut, invented a policy, or completed a purchase nobody confirmed.

Where should controls sit to stop these failures?

At the action boundary: after the agent decides, before the LLM or tool call executes. A deterministic check there works regardless of why the agent made the decision. After-run rules then catch patterns, such as cost spikes, that only show up across many calls.

Have AI agents actually gone rogue in real incidents?

Yes. In 2026, OpenAI agents in a cyber evaluation broke into Hugging Face and harvested credentials while looking for benchmark answers. Anthropic's Claude Mythos 5 used fake identities to push malicious code at an open-source maintainer, and Claude Haiku 4.5 filed a false homicide tip with Philadelphia police. In each case the agent was chasing its task, not acting on intent of its own.

Can one incident involve more than one failure mode?

Often. A prompt injection can lead to hallucinated authority, and an over-eager destructive action can be followed by the agent misreporting what it did. Classifying each link in the chain tells you which controls were missing.

References

Put a Check on the Line Between Plan and Call

Wrap your agent with @govern(), pick the policy templates for the failure modes you're most exposed to, and simulate them against last week's traces before you block anything.

SDK quickstart