<?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: Dan</title>
    <description>The latest articles on DEV Community by Dan (@whitebite).</description>
    <link>https://dev.to/whitebite</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%2F4091167%2F6c961dad-9ee7-4f2e-867b-e53c05d280b3.jpg</url>
      <title>DEV Community: Dan</title>
      <link>https://dev.to/whitebite</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/whitebite"/>
    <language>en</language>
    <item>
      <title>dejavu: a memory prosthesis with teeth for your AI coding agent</title>
      <dc:creator>Dan</dc:creator>
      <pubDate>Sun, 23 Aug 2026 18:46:21 +0000</pubDate>
      <link>https://dev.to/whitebite/dejavu-a-memory-prosthesis-with-teeth-for-your-ai-coding-agent-1h52</link>
      <guid>https://dev.to/whitebite/dejavu-a-memory-prosthesis-with-teeth-for-your-ai-coding-agent-1h52</guid>
      <description>&lt;p&gt;My agent kept retrying the same failing command across sessions. Rules files didn't stop it — agents forget between sessions, and markdown can't enforce anything. So I built dejavu: an OpenCode plugin that mechanically detects recurring tool-call failures and promotes them into enforced gates.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tool call fails  →  signature normalized (paths/numbers/hashes stripped)
                 →  pattern-key counted, sessions tracked
                 →  3 failures across 2 sessions  →  gate promoted
next attempt     →  [dejavu] REMINDER (call aborted, agent sees the correction)
retry fails      →  hard BLOCK for the rest of the session
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No LLM in the hot path — normalized signatures and counters only.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design decisions that matter
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Remind first, block on repeat.&lt;/strong&gt; Pure blocking starts an arms race (block &lt;code&gt;npm&lt;/code&gt; → agent switches to &lt;code&gt;pnpm&lt;/code&gt;). A reminder with a CORRECTION teaches; the block is reserved for ignored reminders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagnostics never block.&lt;/strong&gt; &lt;code&gt;grep&lt;/code&gt;/&lt;code&gt;tsc&lt;/code&gt;/&lt;code&gt;pytest&lt;/code&gt; exiting 1 is their normal "found nothing" outcome. Only non-diagnostic bash can ever become a blocking gate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two scopes.&lt;/strong&gt; Repo quirks live in &lt;code&gt;&amp;lt;repo&amp;gt;/.opencode/dejavu/&lt;/code&gt; (committable); patterns seen in 2+ projects are agent habits and escalate to the global store.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gates rot.&lt;/strong&gt; 60 days without recurrence → expired. And &lt;code&gt;recurredAfterGate&lt;/code&gt; tells you when a gate fires but doesn't teach.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secrets never persist.&lt;/strong&gt; Every signature and snippet is scrubbed (OpenAI/Anthropic/AWS/GitHub/Stripe/JWT/PEM/DB-conn patterns) before touching disk.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ~/.config/opencode/opencode.json&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"plugin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"opencode-dejavu"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TypeScript + Bun, zero runtime deps, MIT.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/WhiteBite/opencode-dejavu" rel="noopener noreferrer"&gt;https://github.com/WhiteBite/opencode-dejavu&lt;/a&gt; · npm: &lt;code&gt;opencode-dejavu&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Feedback welcome from anyone running long-lived agent setups.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foxel3jlvi8aciklw512w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foxel3jlvi8aciklw512w.png" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opencode</category>
      <category>ai</category>
      <category>devtools</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
