DEV Community

Discussion on: Validation Is the Bottleneck: Why Your Claude Agent Keeps Drifting

Collapse
 
vdalhambra profile image
vdalhambra

The PLAN.md/PROGRESS.md pattern maps exactly onto what happens when you wire MCP tools into the loop.

Instead of the agent writing its own state file (which it can rationalize away), the state lives in a tool response the agent has to parse. You can't drift past a tool call that returns structured JSON — the model has to process what the external system actually says, not what it assumed it would say.

We built this into axiom-perception-mcp: the agent queries the workflow pattern store before each phase, gets back the last validated checkpoint, and has to explicitly acknowledge it before proceeding. The "state file IS the validation gate" observation holds — you just get more reliable enforcement when the file lives outside the model's context window entirely.

Gate 2 (post-step state assertion) is where this matters most. Disk/API state verification only works if the verification signal is external and authoritative, not another LLM call over the same context.