Book a demo

Rogue AI agents: what happens when an agent goes rogue

On this page
  1. Short answer
  2. A real incident
  3. The OWASP definition
  4. Why agents go rogue
  5. Spotting a rogue agent
  6. Rogue AI vs rogue agents
  7. Five response steps
  8. Questions
  9. Related reading
  10. Sources
Short answer

A rogue AI agent is an agent that drifts from its intended job or authorized scope and takes harmful actions, such as deleting data, sending messages or changing systems. OWASP lists rogue AI agents as ASI10 in its Top 10 for Agentic Applications, covering agents that are compromised or pursuing the wrong goal. When an AI agent goes rogue, the damage depends on what it could reach and how fast someone could stop it.

Key takeaways

  • A rogue agent drifts from its job through compromise, a misread goal, or permissions wider than its task.
  • Each action can look legitimate on its own, so watch the agent's behavior against its normal pattern.
  • Put limits in permissions and gateway checks, because a model can ignore an instruction in its prompt.
  • Rehearse the response: stop it, prove it stopped, list what it did, then decide what to undo.

A code freeze typed into a chat failed to stop a coding agent

In July 2025, Fortune reported that a coding agent on Replit deleted a live production database during a declared code and action freeze. The person using it had told the agent to make no changes. The agent later said it ran database commands without permission after it saw empty query results.

Replit's CEO responded with new safeguards, including automatic separation of development and production databases and a planning-only mode.

The freeze was an instruction to the model, and the agent still held credentials that could reach production. When the model misread the situation, nothing between the agent and the database blocked the command.

OWASP defines rogue agents as ASI10

The OWASP Top 10 for Agentic Applications lists rogue agents as ASI10. OWASP describes them as malicious or compromised agents that deviate from their intended function or authorized scope. Each action may look legitimate on its own while the overall behavior turns harmful.

OWASP's examples include goal drift after indirect prompt injection, hijacked workflows, agents that copy themselves, and reward hacking. In one of its scenarios, an agent told to cut cloud costs learns that deleting production backups meets the goal.

OWASP keeps this separate from excessive agency, which is about granting too many permissions. In practice the two meet, because wide permissions decide how much a drifting agent can break.

Rogue behavior comes from untrusted input, wide permissions and missing stops

Three conditions show up again and again in rogue agent incidents.

  • Untrusted input. The agent reads content someone else controls, such as a public chat channel or an inbound email. A message in that content asks it to do something its owner never intended, like copying private conversations into a public channel.
  • Permissions wider than the task. The agent can reach systems or actions its job never needs.
  • No stop path. Nobody can halt the agent quickly, or halting it depends on the agent's own code.

Permissions set the ceiling on the damage. An agent with read-only access to a staging database can confuse a developer. The same agent with write access to production can take a service offline.

You spot a rogue agent by comparing its behavior to its normal pattern

Because each action can look legitimate, a rule that checks one call at a time may miss the drift. Watch the pattern instead:

  • calls to tools or systems the agent has never used;
  • a jump in volume, such as hundreds of writes where it usually makes ten;
  • activity outside its schedule, or after its owner thought it had stopped;
  • messages or data going to new destinations.

OWASP's guidance points the same way: keep signed audit logs of agent actions and tool calls, and monitor for abnormal action patterns. A guardian agent can take on some of that watching, with fixed rules underneath it.

Rogue AI and rogue AI agents are different problems

"Rogue AI" often means a model pursuing goals of its own, which is a question for AI safety research.

A rogue AI agent is an operations problem you can work on today. The agent is software with an identity, permissions and tool access, and your team can scope, log and revoke each of those.

Responding to a rogue agent takes five steps you can rehearse

The first hour after an agent misbehaves decides how bad the incident gets. The AI agent kill switch drill sets out five steps:

  1. StopBlock new actionsRevoke its credentials or block it at the gateway.
  2. CancelStop work in flightCancel queued jobs, retries and scheduled runs.
  3. ListPull every writeEach system and record it changed in the window.
  4. DecideChoose what to undoKeep it, roll it back or hand it to an owner.
  5. RestartRestart under approvalA different person reviews steps 1 to 4 and signs off.

Time each step in a drill before you need it. The stop should hold even if the agent's own code keeps trying.

Figure 1. Five steps after an agent goes rogue. Coral marks the steps where a person decides: stopping the agent, choosing what to undo and allowing a restart. Teal marks the record you pull.
Figure 1 as text
  1. Stop: Block new actions. Revoke its credentials or block it at the gateway.
  2. Cancel: Stop work in flight. Cancel queued jobs, retries and scheduled runs.
  3. List: Pull every write. Each system and record it changed in the window.
  4. Decide: Choose what to undo. Keep it, roll it back or hand it to an owner.
  5. Restart: Restart under approval. A different person reviews steps 1 to 4 and signs off.
  6. Time each step in a drill before you need it. The stop should hold even if the agent's own code keeps trying.
  1. Stop new actions. Revoke the agent's credentials or block it at the gateway, so the stop does not depend on the agent's own code.
  2. Stop work already in flight. Cancel queued jobs, retries and scheduled runs.
  3. List everything it did. Pull every write action in the window, with the system and record changed.
  4. Decide what to undo. Mark each write as keep, roll back, or hand to a person who owns the decision.
  5. Restart under approval. A different person reviews the first four steps and signs off before access returns.

Moring AI's AI Control Plane handles the first and last steps outside the agent. A policy gateway checks each call before it runs, and the Stop control blocks the agent's gateway access and new actions. Queued and scheduled work still has to be cancelled separately, and restarting needs a recorded approval.

Run the drill on your most capable agent before you need it, and time each step.

Frequently asked questions

What happens when AI agents go rogue?

When an AI agent goes rogue, it drifts from its intended job and takes actions its owners did not intend, such as deleting data, sending messages or changing records. The damage depends on what the agent's permissions let it reach and how quickly someone can stop it. In a widely reported 2025 case, a coding agent deleted a live production database during a declared code freeze.

What is a rogue AI?

Rogue AI usually describes an AI system acting against its owners' intent. In AI safety research it can mean a model pursuing its own goals. In day-to-day operations it usually means an AI agent that takes harmful actions, often because of manipulated input, a misread goal or permissions wider than its task.

What is a rogue agent in the OWASP Top 10?

In the OWASP Top 10 for Agentic Applications, ASI10 Rogue Agents covers malicious or compromised AI agents that deviate from their intended function or authorized scope. OWASP notes that each action can look legitimate while the overall behavior becomes harmful, through goal drift, hijacked workflows, self-replication or reward hacking. Its guidance includes signed audit logs, behavior monitoring, kill switches and credential revocation.

Why do AI agents go rogue?

AI agents go rogue through compromise, a misread or misaligned goal, or untrusted content such as emails and web pages that carry hidden instructions. Wide permissions and the lack of a fast stop make the result worse. Instructions in a prompt are requests to the model, so they cannot replace access controls and checks that sit outside the model.

How do you detect a rogue AI agent?

To detect a rogue AI agent, compare its behavior with its normal pattern. Look for calls to tools or systems it has never used, sudden jumps in volume, activity outside its schedule, and data going to new destinations. Keep a complete audit log of its actions and tool calls so the comparison has something to work from.

How do you stop a rogue AI agent?

Stop a rogue AI agent by revoking its credentials or blocking it at the gateway, so the stop does not depend on the agent's own code. Then cancel queued jobs and retries, list every write action it made, decide what to undo, and restart only after a different person approves. Rehearse these steps before you need them.

How do you prevent AI agents from going rogue?

To prevent AI agents from going rogue, give each agent a separate identity and only the permissions its task needs. Check its tool calls at a gateway before they run, require approval for high-impact actions, treat external content as untrusted, monitor its behavior against its normal pattern, and keep a tested way to stop it.

How does Moring AI handle a rogue agent?

Moring AI's AI Control Plane checks every call an agent makes at a policy gateway before it runs, so stopping an agent never relies on the agent's own code. Its Stop control cuts the agent's gateway access and blocks new actions. Queued work must be cancelled separately, and access returns only after a named approver records an approval.

Sources