Why Your Agent Forgets Step 5 by Step 12
You hand an agent a ten-task plan. By task four it has drifted; by task ten the plan is a memory and the code is a surprise. The model is not forgetful, the plan is too coarse. The fix is smaller tasks with sharper edges.
Why big tasks drift
"Implement user authentication" is not a task, it is a feature hiding subtasks with their own decisions. Run as one unit, the agent decides on the fly, and the decisions bury themselves in code. By task seven it is working inside constraints it created by accident three tasks ago.
The bite-sized rule
A task is one action that takes two to five minutes. Writing a failing test, watching it fail, writing minimal code, watching it pass, committing: five tasks for what a junior would call "write the login function". Small tasks produce small failures, and small failures are easy to locate. When task 12 breaks the build, the break is in task 12.
What every task contains
Three things, every time. Exact file paths, never "the relevant file". Complete code, ready to paste, never "implement similar to above". Verification commands with expected output, never just "run the tests". If any of the three is missing, the agent guesses, and guessing is where drift starts.
The no-placeholder rule
Placeholders look like progress and produce nothing. Banned phrases: TBD, TODO, implement later, fill in details, "add appropriate error handling", "similar to Task N". If you do not yet know the content, the plan is not ready. Writing the content first sounds slow and is faster, because the alternative is reviewing improvisations.
Structure first, self-review second
Before any task is written, map the file structure: which files are created, which modified, what each is responsible for. The plan then decides the tasks, and the agent never decides "where does this go". After drafting, self-review: spec coverage (every requirement maps to a task), placeholder scan, and type consistency, because clearLayers in task 3 versus clearFullLayers in task 7 is a bug.
The trade-off
Agents cannot write these plans alone: they reach for abstractions and leave placeholders, because filling them requires decisions nobody made. The plan must come from a layer above the implementer, which costs your time up front. You pay it back by never reviewing improvisations or hunting drift across an eight-task diff.
The smallest test
Take the next plan you are about to hand an agent. Split anything longer than five minutes, replace every placeholder with real code, then run it.
Recommended for you
- WorkflowSuperpowersClaude Code
Why Your Multi-Agent Workflow Keeps Colliding
Two agents in two threads share files but not context. Both decide on stale state. Fix: one fresh agent per task, with isolated context.
- WorkflowSuperpowersClaude Code
The Discipline Stack That Makes Agent Output Trustworthy
The reliability problem is not the model. It is the missing disciplines around it. Brainstorm, plan, test, verify, review: each gate before the next step.
- Workflow
Why Your Worktree Directory Becomes Unmanageable Past Ten Active Tasks
Ten or more active worktrees with no naming and cleanup rules becomes a graveyard of old branches and lost work. Three rules fix it.
- WorkflowHerdr
How I Close My Laptop Without Losing My Coding Agent Mid-Run
An agent that runs forty minutes cannot survive a laptop sleep. The fix is a session that outlives the laptop, not faster agents.
Enjoyed this article?
Subscribe for new articles. No spam. Unsubscribe anytime.