{"slug": "i-checked-what-6-ai-coding-tools-write-to-disk-to-stop-the-agent-forgetting-its", "title": "I checked what 6 AI coding tools write to disk to stop the agent forgetting its plan. Half write nothing.", "summary": "A developer investigated why AI coding tools forget their plans and found that the issue is often a filesystem problem, not a context-window limitation. The developer's own tool suffered because the plan was never saved to disk, and a review of six popular tools showed that those that don't persist plans (Cursor and bolt.new) have the most complaints about forgetting. The developer recommends persisting plans and archiving them on completion, and warns that prompting a model to maintain a file is unreliable.", "body_md": "Every AI coding tool has the same top complaint: *\"it forgot what we were doing.\"*\n\nI spent weeks assuming that was a context-window problem. It mostly isn't. It's a filesystem problem — and you can predict which tools suffer from it by asking one question: **where does the plan get written down?**\n\nOur own builder had it badly. You'd say \"build me a CRM,\" the agent would plan it, start building, hit its step limit, stop. You'd type \"continue\" — and it would either start over from a different angle or silently drop half the plan.\n\nThe cause was mundane and a little humbling. The plan was never saved anywhere. It was a local variable inside one function, parsed out of the model's own output text, used for step tracking during that single turn, then discarded:\n\n``` js\n// inside one turn, then gone\nconst activePlan = parsePlanFromModelOutput(text);\n```\n\nA `savePlan()`\n\nfunction existed. Nothing in the codebase ever read a plan back. The UI reset the plan to `null`\n\non every new message. So \"continue\" was always a cold start — the agent had no record that a plan had ever existed.\n\nThen it got worse. We had a `completePlan()`\n\nthat fired whenever the agent hit its max iteration limit — i.e. in the exact moment *before* a user types \"continue\" — and it marked every pending step `skipped`\n\n. We were actively erasing the roadmap at the worst possible moment.\n\nAnd one more: the plan object was only ever built on one model provider's code path. Route the session through a different provider and there was no plan at all. The bug was load-bearing on which model you happened to be using.\n\nSo I went and read the docs, changelogs and forum threads for the tools people actually use. (This is from public documentation and user reports — I can't read their source.)\n\n| Tool | Durable plan? | Always-injected memory |\n|---|---|---|\nClaude Code |\nYes — plan files under `~/.claude/plans/` , survive compaction |\n`CLAUDE.md` , re-read from disk after every compaction |\nLovable |\nYes — `.lovable/plan.md` + an archive dir, inspectable and diffable |\n`AGENTS.md` + knowledge layers injected every message |\nReplit Agent |\nYes — `.local/session_plan.md` + a native task board |\n`replit.md` , persists across sessions |\nDevin |\nYes — structured JSON plan, editable, survives crashes | scoped memory layers + playbooks |\nCursor |\nNo first-class plan; the community maintains a `TODO.md` by hand |\n`.cursor/rules/*.mdc` |\nbolt.new |\nNo — Plan Mode keeps the plan in the chat |\n`agents.md` + Project Knowledge |\n\nThe two that write nothing to disk are the two with the loudest \"it forgets\" threads. Cursor's forum has the *\"completely forgets it's trying to solve a problem\"* thread; bolt's own documentation concedes that after many prompts the AI loses track of earlier decisions and contradicts its own code.\n\nThat correlation isn't proof of causation. But it's a strong hint that this is an engineering decision, not a model-intelligence ceiling.\n\nIf you're building something similar, persistence alone isn't the finish line. Both of these are real and documented:\n\n`session_plan.md`\n\nisn't cleared between sessions, so the agent abandons what you just asked for to go finish an old plan. A plan that survives forever is its own bug.So: persist the plan, **and archive it on completion**.\n\nThe plan now lives as `plan.json`\n\nplus a human-readable `PLAN.md`\n\non the workspace's persistent volume. It's written through on every step transition, re-read at the start of every turn, and archived when complete. If the agent stops early, pending steps persist untouched instead of being wiped. We added a provider-parity test so the plan can't silently exist on only one code path again.\n\nThis is the part I'd actually tell other people building agents:\n\nYou cannot ask a model to maintain a file by putting it in the prompt.\n\nWe told our agent to keep a `NOTES.md`\n\nof its decisions. It never created it. Not once. I only found out by inspecting the container.\n\nIt also kept referring to a \"bug log\" it claimed to have been writing. There was no such file anywhere in the codebase — I grepped. It had hallucinated its own persistence layer, and it described it confidently.\n\nThe moment we made it a **tool the agent has to call**, it worked — because a tool call shows up in the trajectory and is verifiable. A prompt instruction is a suggestion; a tool call is evidence.\n\nEnforce it in code. Don't ask the model nicely.\n\nStop tuning your prompt and go ask where the plan is written to disk. If the answer is \"nowhere,\" you've found your bug. It's a persistence problem wearing a memory problem's clothes.\n\nI build [NoCoder](https://nocoder.codes/?utm_source=devto&utm_medium=article&utm_campaign=plan-persistence), an AI app builder where you review every change as a diff before it applies. It's a beta. If you want to try to break it, I'd genuinely value that more than a compliment.\n\nCurious what the folks here have hit — has anyone found a tool that handles long-running plan state well?", "url": "https://wpnews.pro/news/i-checked-what-6-ai-coding-tools-write-to-disk-to-stop-the-agent-forgetting-its", "canonical_source": "https://dev.to/mayank_b4b824331985d19b42/i-checked-what-6-ai-coding-tools-write-to-disk-to-stop-the-agent-forgetting-its-plan-half-write-5bck", "published_at": "2026-08-15 18:48:11+00:00", "updated_at": "2026-08-15 19:11:50.666279+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-products"], "entities": ["Claude Code", "Lovable", "Replit Agent", "Devin", "Cursor", "bolt.new"], "alternates": {"html": "https://wpnews.pro/news/i-checked-what-6-ai-coding-tools-write-to-disk-to-stop-the-agent-forgetting-its", "markdown": "https://wpnews.pro/news/i-checked-what-6-ai-coding-tools-write-to-disk-to-stop-the-agent-forgetting-its.md", "text": "https://wpnews.pro/news/i-checked-what-6-ai-coding-tools-write-to-disk-to-stop-the-agent-forgetting-its.txt", "jsonld": "https://wpnews.pro/news/i-checked-what-6-ai-coding-tools-write-to-disk-to-stop-the-agent-forgetting-its.jsonld"}}