Answer
How do you prevent an AI agent from drifting during a long session?
Restate the objective at every stage and check the work against it, because recent material outweighs the original brief.
Restate the objective at each stage and check the output against it rather than against the previous step. Drift happens because recent material outweighs the original brief, so the brief has to keep being made recent.
Drift has a mechanical explanation that makes the remedy obvious. Influence is weighted towards what is recent, so the instruction that set the task carries less weight at step forty than the output of step thirty-nine. Nothing has been forgotten; the goal is present and is competing with a much larger and much more recent body of material. Each step is a reasonable continuation of the previous one, and the sequence walks somewhere nobody intended.
The primary countermeasure follows directly: keep making the objective recent. Restating it at the start of each stage costs a sentence and restores its weight. This is why staged work drifts less than continuous work — not because stages impose discipline in the abstract, but because each boundary is a natural place to say the goal again.
The second countermeasure is what the work gets compared against. Checking each stage against the previous stage validates the chain and cannot detect that the chain has left the destination, since every link is locally sound. Checking against the original stated objective catches exactly what the local check misses. Both are worth doing and only one of them detects drift.
The third is a written objective outside the session. A goal that lives only in the first message of a conversation cannot be re-read by anyone, and after an hour nobody can quote it accurately, which means disagreements about whether the work has drifted are settled by recollection. A one-line objective in the state file is a fixed reference, and its existence changes the conversation from an impression to a comparison.
The fourth is the scope statement, which prevents a specific and common form of drift: legitimate-looking expansion. Work drifts outward as much as sideways, and the outward version is harder to challenge because each addition is defensible on its own. Naming what is not in the job, at the start, gives the check something to fail against.
A caution about over-correcting. Some divergence during exploratory work is the work: an agent that finds the real problem is different from the stated one has done something valuable, provided it says so rather than quietly switching. The distinction is announcement. Drift is changing direction without saying; a reported redirection is a finding, and the design objective is to make the second cheap rather than to prevent the first with more rigidity.
Drift is not the agent forgetting the goal; it is the goal being outvoted by everything that happened since.
Siddharth Sharma, Context Theory
Related questions
How often should the objective be restated?
At every stage boundary, and additionally whenever something unexpected has just happened. Surprises are where drift starts, because the response to a surprise is reasoned from the surprise rather than from the goal. Restating after one costs a line and lands at exactly the moment the objective is most at risk of being outvoted.
Is drift worse with certain kinds of task?
It is worse where the steps are open-ended and each one generates a lot of material — investigation, research sweeps, anything reading many documents. Tasks with narrow steps and small outputs drift less, because less accumulates between the brief and the current decision. Where a job is inherently generative, staging matters more.
METHOD
Every figure below carries its source and the date it was verified. Nothing on this page is asserted.
The numbers on this page.
| What | Value | Specific to |
|---|---|---|
| Close rate — response under 5 minutes vs over 24 hours | 32% vs 12% | Category-wide |
| Sub-15-minute compliance — automated routing vs manual only | 62.5% vs 39.1% | Category-wide |
Optifai speed-to-lead benchmark · n=939 companies · Q2 2025–Q1 2026 · verified
2026 speed-to-lead benchmark · verified
What is specific to this page.
| Kind | Claim | Check it against |
|---|---|---|
| Workflow | Drift results from recency weighting rather than from loss of the objective: the opening instruction remains present but competes with a larger and more recent body of material, so each locally reasonable step accumulates into an unintended direction. | Asking an agent deep into a long run to restate its objective and comparing the answer with the original brief. |
| Response | Checking each stage against the preceding stage validates the chain and cannot detect departure from the destination, because every link is locally sound, so only comparison against the original objective detects drift. | Applying both checks to a run known to have drifted and observing which one fails. |
| Software | An objective held only in the opening message of a session cannot be re-read, so disagreements about whether work has drifted are resolved by recollection, while a one-line objective in a state file converts the question into a comparison. | Attempting to quote the original brief of a long session accurately without scrolling back to it. |
| Constraint | Announced redirection and silent drift are different events, so the design objective is to make reporting a change of direction cheap rather than to prevent divergence, since discovering the stated problem was the wrong one is a valuable outcome. | Checking whether the run's output distinguishes a reported change of direction from work that quietly proceeded on a different basis. |
Each row would be wrong on another industry's page. Where a sourced figure exists it is in the table above instead; these are the constraints that shape the work and do not happen to be numbers.
Start with the measurement.
Reading about a benchmark is not the same as knowing your own number. The audit produces yours, measured rather than estimated.
$497 · delivered in 5 business days · credited against month one