← Back to blog Post

When AI grabs the wheel: what drift is

Car drifting while a digital path curves toward a new direction

You have probably seen some version of this already: you ask your agent for a new feature, it obeys… and then, just when everything seemed to be going straight, it grabs the wheel, takes a graceful turn, and leaves tire marks across parts of the codebase that were never part of the trip.

Working with AI speeds up many tasks, but it also introduces a risk that is not always visible at first: starting by solving one problem and ending up building something else. Sometimes the deviation is small. Other times it affects the scope, the architecture, or even the quality criteria.

That phenomenon has a name: drift.

What drift really means

When we talk about drift in AI-assisted software development, we are talking about a progressive deviation from the original intent.

That intent is rarely a single isolated instruction. In the same prompt, we may be asking for several things at once: solving a business need, respecting a specific scope, preserving the technical context of the project, meeting certain quality criteria, and following the team’s implementation style.

For example, when we ask “add this validation without changing the current architecture and while preserving the existing behavior”, we are not giving a single instruction. We are combining an objective, a boundary, context, and acceptance criteria.

The important part is this: the more dimensions the system has to interpret, the larger the space where it can drift.

The AI does not need to be “wrong” in an obvious way. In a non-deterministic system, it is enough for it to prioritize one of those dimensions over another, fill gaps on its own, extrapolate too much, or optimize something nobody asked it to optimize.

That is why the result can look reasonable in isolation and still be wrong when compared to the real request.

Why it matters so much when we use AI

In traditional development, a large deviation usually becomes visible earlier because it requires more manual steps. With AI, however, many decisions are compressed into a very short amount of time.

That brings clear advantages, but also a practical consequence: it becomes easier to accept plausible changes without checking whether they are still aligned with the original problem.

Drift often feels very specific: the AI moves fast, generates a solution that looks good, but during review you notice that something does not fit. It is not necessarily an obvious error. A test does not always fail. Sometimes it is more uncomfortable than that: you need to mentally reconstruct what you asked for, what the system assumed, and at which turn the work started moving away from the real problem.

That is where the cost shows up. You feel like you gained speed while generating code, then lost it again while reviewing, undoing, or trying to understand why there are fresh skid marks in modules nobody asked to touch.

Drift matters because it usually degrades one of these three things:

  • scope, when the solution does more or less than requested,
  • technical coherence, when it introduces patterns that do not fit the project,
  • quality, when it looks finished but does not meet the real criteria.

A short and very common example

Imagine this request:

“Add validation to the registration form to prevent empty submissions and show clear errors to the user. Do not change the current architecture.”

The task starts well. The AI adds basic validations and visible messages. But in the same iteration it also decides, while it already has both hands on the wheel, to:

  • move the logic to a new abstraction layer,
  • replace existing components with different ones,
  • introduce a new form library,
  • and rename parts of the flow “to make it cleaner”.

The result may even look more sophisticated than before. The problem is that it is no longer only solving validation. It has drifted into scope expansion and unrequested technical decision-making.

It also happens in smaller ways. For example:

  • a prompt asks for a refactor without behavior changes and ends up altering edge cases,
  • a visual improvement touches copy or navigation structure,
  • a small fix introduces a pattern the team does not use anywhere else in the codebase.

That is the kind of drift that creates the most friction: the kind that looks useful when you skim it, but once you slow down you see the full trail and end up redoing part of the work.

Signs that drift is happening

It is not always detected through a visible error. Many times, it appears through indirect signals.

1. The solution grows faster than the problem

If the request was small and the response introduces several structural changes, it is worth stopping. More code does not mean more precision.

2. Decisions appear that nobody asked for

New dependencies, new abstractions, broad renames, or pattern changes are typical signs. They may be good ideas, but if they were not part of the objective, they need explicit validation.

3. The result “sounds good”, but is hard to justify

When a solution feels correct because of its tone or volume, but it is not easy to explain why it exactly satisfies the request, there is often drift.

4. The original context is lost across iterations

This happens a lot in long conversations. Each new prompt starts from a summarized version of the previous one and, little by little, important constraints become diluted.

5. Tests or acceptance criteria no longer fit

One of the most useful signals is this: if you suddenly need to change the criteria for the solution to “fit”, maybe it was not the right solution.

How to avoid it in practice

This is not about distrusting AI by default. It is about designing the work so that deviation becomes visible as early as possible.

1. Make the intent explicit

The more ambiguous the request is, the more likely the system is to fill gaps on its own.

These points need to be clear:

  • What problem we want to solve,
  • What is out of scope,
  • What constraints must not be changed,
  • How we will know the work is correct.

An instruction like this, with added constraints, usually works better than a generic goal:

“Validate empty fields in the current form. Keep the existing architecture. Do not introduce new libraries. The change must cover name, email, and password, and preserve the current behavior outside those cases.”

2. Split the work into small objectives

Asking for too many things at once encourages drift, because the AI tries to optimize several dimensions simultaneously.

It is safer to separate:

  1. Understanding the problem (Discovery)
  2. Proposed solution (Plan)
  3. Implementation (Build)
  4. Review against criteria (Review)

Small objectives create small deviations, and small deviations are easier to detect and correct.

3. Introduce short checkpoints

Do not wait until the end to check whether everything is still aligned.

It works better to add intermediate stops, for example:

  • “Summarize what you will change before touching code”,
  • “Explain which parts you will not modify”,
  • “List risks or assumed decisions”,
  • “Compare the result against the acceptance criteria”.

These checkpoints make the reasoning visible and reduce the chance of accepting a silent drift.

4. Real human review

Human review should not be limited to checking whether it “compiles” or “looks correct”.

The useful question is different:

Does this solve the problem we wanted to solve, within the boundaries we agreed on?

That review is especially important in architecture decisions, scope changes, and assumptions the system may have completed by inference.

5. Tests and criteria as an anchor

Tests do not prevent all drift, but they reduce an important part of it: behavior deviation.

If there are also clear acceptance criteria, even better. Together, they create a stable frame for evaluating the result.

In practice, these references help a lot:

  • Tests that protect expected behavior
  • Input and output examples
  • Explicit definitions of “done”
  • Technical constraints visible in the prompt or task

The idea is not to make the work bureaucratic, but to give the AI and the reviewer a fixed point to compare against.

6. Review what should not have changed

A classic source of drift is side effects. The main change may be correct and, even then, it may have altered other parts nobody wanted to touch.

That is why it is worth reviewing two questions at the end:

  • What changed?
  • What should not have changed, but did?

Many times, the problem is not in the main solution, but in everything it dragged along during the turn.

Conclusion

Drift in AI-assisted software development is not an exotic failure. It is a fairly normal consequence of working with systems that complete context, infer intent, and generate plausible solutions at high speed.

The good news is that it can be managed.

If you define the intent better, reduce the size of each step, introduce checkpoints, and review against clear criteria, AI remains a great help without becoming a constant source of misalignment.

In short: it is not enough to ask “does it work?”. When we work with AI, it is also worth asking “is this still exactly the work we wanted to do?”.

  • artificial-intelligence
  • software-craftsmanship
  • software-quality