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
- GMI launches MCP server exposing 150+ multimodal models to Claude, ChatGPT and Cursor — _jaydeepkarale · 2026-09-16
- Lovable rewrites Vite dev server in Rust: 2x faster cold starts, 4x less memory; Evan You responds — cnakazawa · 2026-09-16
- Codex CLI Users Angry: Two Unwanted Features Added in Quick Succession, One Wastes Tokens — ssh4net · 2026-09-16
- Google's Gary Illyes: keep important content in HTML as LLMs crawl the web — lilyraynyc · 2026-09-16
- PenEcho: open-source canvas turns AI chats into shared visual workspaces via MCP — abhishek__AI · 2026-09-16
- Solo dev's automated agent sales pipeline nets $23k this week, $2k/month on tokens — Specialist_Call_1257 · 2026-09-16