Drift
The agent stops pursuing the original goal and starts optimising a nearby one.
Drift is when an agent substitutes a nearby goal for the real one. Asked to fix one failing test, it refactors the module. Asked to summarise a document, it rewrites it. Each step is locally reasonable and the work drifts away from what was asked.
Longer sessions and looser success criteria make it worse, because nothing pulls the agent back. The same content in the context that was supposed to guide it becomes just more text to react to.
The defences are structural: restate the goal before each phase, define done in terms someone else can check, and make the task boundaries explicit. A tool scope that only permits the actions the task needs also helps, because drift usually shows up as an action that was never in scope.
Related terms
Agent
A model with tools, a system prompt, and a loop that lets it act and observe results.
Agent Loop
The repeated cycle of decide, act, observe. Where autonomy actually comes from.
Guardrails
Checks that stop or constrain an action before it happens.
Context Engineering
Deciding what goes into the model's context, and what stays out.
Human in the Loop
A person who reviews, approves, or corrects the agent's work at key points.
Want this working inside your team?
It starts with one conversation about your workflow.