<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mayank</title>
    <description>The latest articles on DEV Community by Mayank (@mayank_b4b824331985d19b42).</description>
    <link>https://dev.to/mayank_b4b824331985d19b42</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4079270%2Fcdd33378-9fde-476e-b282-032dbce70ffc.png</url>
      <title>DEV Community: Mayank</title>
      <link>https://dev.to/mayank_b4b824331985d19b42</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mayank_b4b824331985d19b42"/>
    <language>en</language>
    <item>
      <title>I checked what 6 AI coding tools write to disk to stop the agent forgetting its plan. Half write nothing.</title>
      <dc:creator>Mayank</dc:creator>
      <pubDate>Sat, 15 Aug 2026 18:48:11 +0000</pubDate>
      <link>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</link>
      <guid>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</guid>
      <description>&lt;p&gt;Every AI coding tool has the same top complaint: &lt;em&gt;"it forgot what we were doing."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I 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: &lt;strong&gt;where does the plan get written down?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug that made me go looking
&lt;/h2&gt;

&lt;p&gt;Our 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.&lt;/p&gt;

&lt;p&gt;The 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:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// inside one turn, then gone&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;activePlan&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parsePlanFromModelOutput&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;savePlan()&lt;/code&gt; function existed. Nothing in the codebase ever read a plan back. The UI reset the plan to &lt;code&gt;null&lt;/code&gt; on every new message. So "continue" was always a cold start — the agent had no record that a plan had ever existed.&lt;/p&gt;

&lt;p&gt;Then it got worse. We had a &lt;code&gt;completePlan()&lt;/code&gt; that fired whenever the agent hit its max iteration limit — i.e. in the exact moment &lt;em&gt;before&lt;/em&gt; a user types "continue" — and it marked every pending step &lt;code&gt;skipped&lt;/code&gt;. We were actively erasing the roadmap at the worst possible moment.&lt;/p&gt;

&lt;p&gt;And 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What everyone else does
&lt;/h2&gt;

&lt;p&gt;So 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.)&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Durable plan?&lt;/th&gt;
&lt;th&gt;Always-injected memory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Claude Code&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes — plan files under &lt;code&gt;~/.claude/plans/&lt;/code&gt;, survive compaction&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;CLAUDE.md&lt;/code&gt;, re-read from disk after every compaction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lovable&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes — &lt;code&gt;.lovable/plan.md&lt;/code&gt; + an archive dir, inspectable and diffable&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;AGENTS.md&lt;/code&gt; + knowledge layers injected every message&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Replit Agent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes — &lt;code&gt;.local/session_plan.md&lt;/code&gt; + a native task board&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;replit.md&lt;/code&gt;, persists across sessions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Devin&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes — structured JSON plan, editable, survives crashes&lt;/td&gt;
&lt;td&gt;scoped memory layers + playbooks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cursor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;No&lt;/strong&gt; first-class plan; the community maintains a &lt;code&gt;TODO.md&lt;/code&gt; by hand&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.cursor/rules/*.mdc&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;bolt.new&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;No&lt;/strong&gt; — Plan Mode keeps the plan in the chat&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;agents.md&lt;/code&gt; + Project Knowledge&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The two that write nothing to disk are the two with the loudest "it forgets" threads. Cursor's forum has the &lt;em&gt;"completely forgets it's trying to solve a problem"&lt;/em&gt; thread; bolt's own documentation concedes that after many prompts the AI loses track of earlier decisions and contradicts its own code.&lt;/p&gt;

&lt;p&gt;That correlation isn't proof of causation. But it's a strong hint that this is an engineering decision, not a model-intelligence ceiling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two failure modes to design around
&lt;/h2&gt;

&lt;p&gt;If you're building something similar, persistence alone isn't the finish line. Both of these are real and documented:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Replit's stale-plan bug&lt;/strong&gt; — &lt;code&gt;session_plan.md&lt;/code&gt; isn'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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code issue #34782&lt;/strong&gt; — the plan gets re-injected &lt;em&gt;after&lt;/em&gt; it's complete. Same root cause, opposite symptom.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So: persist the plan, &lt;strong&gt;and archive it on completion&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we changed
&lt;/h2&gt;

&lt;p&gt;The plan now lives as &lt;code&gt;plan.json&lt;/code&gt; plus a human-readable &lt;code&gt;PLAN.md&lt;/code&gt; on 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  The lesson that generalises
&lt;/h2&gt;

&lt;p&gt;This is the part I'd actually tell other people building agents:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You cannot ask a model to maintain a file by putting it in the prompt.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We told our agent to keep a &lt;code&gt;NOTES.md&lt;/code&gt; of its decisions. It never created it. Not once. I only found out by inspecting the container.&lt;/p&gt;

&lt;p&gt;It 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.&lt;/p&gt;

&lt;p&gt;The moment we made it a &lt;strong&gt;tool the agent has to call&lt;/strong&gt;, 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.&lt;/p&gt;

&lt;p&gt;Enforce it in code. Don't ask the model nicely.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you're hitting this
&lt;/h2&gt;

&lt;p&gt;Stop 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.&lt;/p&gt;




&lt;p&gt;I build &lt;a href="https://nocoder.codes/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=plan-persistence" rel="noopener noreferrer"&gt;NoCoder&lt;/a&gt;, 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.&lt;/p&gt;

&lt;p&gt;Curious what the folks here have hit — has anyone found a tool that handles long-running plan state well?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
