Move Your Coding Agent's Project State Off the Chat Window: Markdown Task Contracts Fix Redo Loops and Hallucinations
Muted_Ad_9442 · reddit · 2026-09-16
The author kept hitting coding agents redoing finished work or "believing" tests passed because the chat history said so — the memory lived in the very context window that degrades. His fix: move project state entirely to disk as a Markdown plan file, where each row is a task contract with dependencies, a pre-written verify command, priority, done status, and validity score.
This yields four wins: context window limits stop mattering (a fresh session reads unchecked rows and picks up instantly); dependencies become a deterministic DAG instead of an instruction; verification is written before code generation, so the agent can't grade its own homework or rewrite tests to match buggy code; and handoffs become lossless — one model plans, another executes, an independent model validates.
The cost is spontaneity: exploratory prototyping must be converted into a plan row first. For complex refactors, the author finds the trade-off worth it.
More from coding & agent
- Tencent unveils Hyra 2.0, a research agent that builds reusable scientific tools — TencentHunyuan · 2026-11-02
- What broke when I ran a leaderless agent swarm with no orchestrator — 7 failure modes and fixes — LostHumanity67 · 2026-11-02
- Forced yes/no prompts push GPT and Claude to 95%+ confidence on Goldbach's unproved halt test — Nir777 · 2026-11-02
- Automation took over my daily work — so why am I still sitting in the office for 8 hours? — Am1rSori · 2026-11-02
- General Reasoning explains how to train agent swarms with RL and latency pressure — rosstaylor90 · 2026-11-02
- "Coding isn't the bottleneck anymore — usage windows are," says founder Kyle Gawley — kylegawley · 2026-11-02