I stopped letting the conversation be my project state

Reddit r/AI_Agents Tools

Summary

The article describes a method to improve coding agent performance by moving project state from conversation history to disk-based markdown files, enabling better task tracking, verification, and agent handoff in multi-file tasks.

The problem that pushed me to change how I use coding agents was frustratingly mundane. During any multi-file task, the agent would eventually redo work it had already completed. It would re-edit a helper file it finished twenty minutes earlier, or hallucinate that a test passed because the chat history said it did. I tried better system prompts, stern instructions, and summaries at the top of every turn. They helped for three or four turns, then failed again. The reason was simple: the memory mechanism was stored inside the exact place that degraded over time: the conversation window. So I moved project state completely out of the chat window and onto disk. A plan in my setup is now an explicit markdown file in the repository. Each row represents a task contract: # Requires Dep Task Verify P Est. (m) Worker (Suggested) Validator (Suggested) ☐ Done ☐ Valid 1 πŸ”¨ Worker β€” Fix prop types in WBCode /wbTest --scope=task-1 P1 15 -M=$WORKER -M=$VALIDATOR βœ… βœ… 9/10 2 πŸ”¨ Worker 1 Extract helpers into wbc-utils npm test P1 30 -M=$WORKER -M=$VALIDATOR βœ… βœ… 8/10 3 βœ… Validator 2 Audit exports for safety /wbAudit --focus=exports P0 20 β€” -M=$VALIDATOR ⬜ ⬜ 4 🧠 Planner 2 Plan parser migration /wbAudit wb-parser P2 45 β€” β€” ⬜ ⬜ The CLI resolves dependencies into parallel waves: /wbWork executes the wave tasks. Validation is layered: individual tasks are verified against their Verify command and scored /10, /wbReview checks if the plan's tasks fit together, and /wbAudit checks global repo health. You can route roles ($WORKER, $VALIDATOR, $PLANNER, $MECHANICAL) to different models/providers to avoid same-family blindspots. Once the state lived on disk, several persistent agent issues disappeared: First, context window limits stopped mattering. If a session crashes, rate limits hit, or context compresses, nothing is lost. A fresh agent session opens the file, reads the unchecked rows, and immediately knows where things stand without twenty minutes of background catch-up. Second, task dependencies became real data. When row 2 declares Dep: 1, the execution order is a deterministic DAG rather than an instruction the agent must remember to respect. Third, verification moved before the work. The Verify command is written when the plan is created, not after the code is generated. Formulating how you will test a change before generating it prevents the agent from grading its own homework or rewriting unit tests to match buggy code. Fourth, agent handoff became lossless. One model can plan, another can execute, and an independent model can validate. Each agent reads the file, executes its assigned role, logs evidence, and signs off. What does it cost? Spontaneity. Exploratory prototyping without structure does not survive unless converted into a plan row. That is a real trade-off, but for complex refactors, it turned messy multi-turn loops into predictable pipelines. How are you handling task tracking across long agent coding sessions?
Original Article

Similar Articles

How do you keep context across projects when the agent's memory is scoped per folder?

Reddit r/AI_Agents

I work solo across a lot of repos, and I keep hitting the same wall with Claude Code. Two separate problems that compound: Context dies on compaction. Long session, lots of hard-won detail about why something is built the way it is, then it compacts and most of that is gone. The only thing that reliably survives is whatever I wrote to a file mid-session. Memory is scoped per project folder. Each repo gets its own isolated memory keyed to its path. So conventions I've established, infrastructure