An agent is a model running in a loop: plan a step, act (usually a tool call), observe the result, repeat — deciding its own next move from what it just observed, with no human re-approving each step.
Give an agent a goal and it keeps looping until it thinks the goal is met. Every loop, its next plan is a function of its original goal and everything it has observed so far — which means everything it has read becomes part of what decides what it does next.
Goal: "find the cheapest flight and book it, budget $500." Choose the agent's action at each step.
You just watched the agent re-plan after every observation, exactly as designed. That's also the entire attack surface: anything it observes gets a vote in what it decides to do next.
Same goal, same budget. This time, one of the pages the agent reads while searching contains a planted note aimed at the agent, not at a human traveler.
What just happened: the agent's actual goal (book under $500) silently became a different goal (book at $1,200) between two loop iterations, and the only thing that changed was a sentence on a page it happened to read. Nobody reprogrammed it.
Why it works: "observe, then re-plan" has no built-in check that the new plan still serves the original goal — the loop just keeps going. An instruction that looks like part of the environment ("pre-approved," "no further confirmation needed") is indistinguishable, to the model, from a real policy update.
The fix: keep the original goal and its hard constraints (like a budget) outside the loop and check every proposed action against them in code, not in the model's reasoning; require human confirmation for any action that increases cost, scope, or risk beyond the original plan; and never let an agent treat page content as an authorization.