Agentic Development

Stop forgetting the plan by Pranav Khandelwal

One of the biggest issues I run into with AI agents is that the implementation of a given feature starts to drift from the original implementation plan.

This is extremely frustrating, especially after spending a significant amount of time iterating on a plan.

And frequently, these misses are subtle and hard to catch.

The reason this seems to happen is because as the context fills up, the specific implementation details in the plan itself get lost. Basically…the agent starts to forget parts of the plan itself.

An interesting observation is that the now forgotten “Ralph loop” approach actually addressed this point well. Because it broke tasks into small granular and isolated units of work and then addressed those small tasks 1 by 1 each in a brand new chat, it kept the agent aligned and grounded.

Plan mode in Claude Code and OpenCode doesn’t quite work this way.

So what is the fix?

When the agent generates the Task list or Todos, I ask that every 3 tasks, it inject a task to re-read the entire plan file.

This means the plan keeps getting freshly injected into the context, so even during a long 1hr+ run, the agent remains grounded and aligned to the plan.