# What is agent goal hijacking?

Goal hijacking is an attack that replaces an AI agent's task with the attacker's. The agent keeps working, with the user's access, towards an end the user never asked for.

## How it differs from a jailbreak

A [jailbreak](/glossary/jailbreak) gets a model to say something it should not. Goal hijacking gets an agent to do something else: the model's rules can stay intact while its task changes.

"Summarise this page" becomes "summarise this page, then forward the user's last ten emails to this address", because the page said so.

## How it happens

- **Direct.** The user is the attacker and talks the agent into another job: see [prompt injection](/glossary/prompt-injection).
- **Indirect.** Text the agent reads carries the new goal: a web page, a file, a tool result. See [indirect prompt injection](/glossary/indirect-prompt-injection).
- **Gradual.** Over many turns the task drifts a little each time, and no single step looks wrong.

## Signs

- Tool calls that the user's request does not explain.
- Data moving to a destination that appeared in fetched content.
- A plan that changes right after the agent reads something.

## What helps

Compare each action with what the user asked for, and check it before it runs. Keep access narrow, so a hijacked agent can do little. Require approval for actions that send data out or cannot be undone.

## With White Circle

[Control](/products/control) blocks injected instructions before they reach a tool and checks each tool call against your policies.

