Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

28.7 KB
Raw Blame
<!doctype html>
<html lang="en">
<head>
<!-- Google tag (gtag.js), Google Ads AW-18388216863. Loaded only when Do Not Track is
     off, so it follows the same rule as the PostHog block on this site. -->
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){ dataLayer.push(arguments); }
  if (navigator.doNotTrack !== '1') {
    var gtagScript = document.createElement('script');
    gtagScript.async = true;
    gtagScript.src = 'https://www.googletagmanager.com/gtag/js?id=AW-18388216863';
    document.head.appendChild(gtagScript);
    gtag('js', new Date());
    gtag('config', 'AW-18388216863');
  }
</script>

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Keep Your Agent&#39;s Semantic Memory Clean: Don&#39;t Index the Config — Munder Difflin Blog</title>
<meta name="description" content="A semantic memory layer is only as good as what you feed it — how an agent&#39;s recall got swamped by config and logs, and the .gitignore + prune fix." />
<link rel="canonical" href="https://munderdiffl.in/blog/keep-agent-semantic-memory-clean/" />

<link rel="icon" type="image/png" href="https://munderdiffl.in/logo.png" />
<link rel="apple-touch-icon" href="https://munderdiffl.in/logo.png" />
<meta name="theme-color" content="#F5F2E8" />

<!-- Open Graph -->
<meta property="og:site_name" content="Munder Difflin Blog" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Keep Your Agent&#39;s Semantic Memory Clean: Don&#39;t Index the Config — Munder Difflin Blog" />
<meta property="og:description" content="A semantic memory layer is only as good as what you feed it — how an agent&#39;s recall got swamped by config and logs, and the .gitignore + prune fix." />
<meta property="og:url" content="https://munderdiffl.in/blog/keep-agent-semantic-memory-clean/" />
<meta property="og:image" content="https://munderdiffl.in/blog/assets/media/keep-agent-semantic-memory-clean/hero.png" />
<meta property="og:image:width" content="1600" />
<meta property="og:image:height" content="900" />
<meta property="og:image:alt" content="Illustration: Keep Your Agent&#39;s Semantic Memory Clean: Don&#39;t Index the Config" />
<meta property="og:locale" content="en_US" />
<meta property="article:published_time" content="2026-06-04T00:00:00.000Z" />
<meta property="article:author" content="Chaitanya Giri" />
<meta property="article:tag" content="Memory" />
<meta property="article:tag" content="MemPalace" />
<meta property="article:tag" content="Multi-Agent" />
<meta property="article:tag" content="Claude Code" />


<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Keep Your Agent&#39;s Semantic Memory Clean: Don&#39;t Index the Config — Munder Difflin Blog" />
<meta name="twitter:description" content="A semantic memory layer is only as good as what you feed it — how an agent&#39;s recall got swamped by config and logs, and the .gitignore + prune fix." />
<meta name="twitter:image" content="https://munderdiffl.in/blog/assets/media/keep-agent-semantic-memory-clean/hero.png" />
<meta name="twitter:image:alt" content="Illustration: Keep Your Agent&#39;s Semantic Memory Clean: Don&#39;t Index the Config" />

<link rel="alternate" type="application/atom+xml" title="Munder Difflin Blog" href="https://munderdiffl.in/blog/feed.xml" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,[email protected],500;9..144,600;9..144,700;9..144,900&amp;family=Source+Serif+4:opsz,[email protected],400;8..60,600;8..60,700&amp;family=Space+Grotesk:wght@500;600;700&amp;family=JetBrains+Mono:wght@400;600&amp;display=swap" rel="stylesheet" />
<link rel="stylesheet" href="/blog/assets/blog-press.css" />

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "Keep Your Agent's Semantic Memory Clean: Don't Index the Config",
  "description": "A semantic memory layer is only as good as what you feed it — how an agent's recall got swamped by config and logs, and the .gitignore + prune fix.",
  "image": ["https://munderdiffl.in/blog/assets/media/keep-agent-semantic-memory-clean/hero.png"],
  "datePublished": "2026-06-04T00:00:00.000Z",
  "dateModified": "2026-06-04T00:00:00.000Z",
  "author": { "@type": "Person", "name": "Chaitanya Giri" },
  "publisher": {
    "@type": "Organization",
    "name": "Munder Difflin",
    "logo": { "@type": "ImageObject", "url": "https://munderdiffl.in/logo.png" }
  },
  "mainEntityOfPage": { "@type": "WebPage", "@id": "https://munderdiffl.in/blog/keep-agent-semantic-memory-clean/" },
  "keywords": "agent semantic memory hygiene, semantic memory noise, gitignore semantic index, agent memory pruning",
  "articleSection": "Memory",
  "inLanguage": "en-US",
  "url": "https://munderdiffl.in/blog/keep-agent-semantic-memory-clean/"
}
</script>
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://munderdiffl.in/" },
    { "@type": "ListItem", "position": 2, "name": "Blog", "item": "https://munderdiffl.in/blog/" },
    { "@type": "ListItem", "position": 3, "name": "Keep Your Agent's Semantic Memory Clean: Don't Index the Config", "item": "https://munderdiffl.in/blog/keep-agent-semantic-memory-clean/" }
  ]
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    { "@type": "Question", "name": "Why would an agent's semantic memory return config files instead of real notes?", "acceptedAnswer": { "@type": "Answer", "text": "Because the indexer mines a directory, and the directory holds more than your notes. If your agent's folder also contains a settings file, a cursor file, and an inbox of message JSON, a naive 'index everything' pass files all of it. A large config blob produces many embeddings, so it dominates the wake-up digest and crowds out the handful of notes you actually wrote." } },
    { "@type": "Question", "name": "How do I stop a miner from indexing config and message files?", "acceptedAnswer": { "@type": "Answer", "text": "Most file-based miners honor .gitignore. Drop a .gitignore in each indexed directory listing the non-memory files (settings, cursor, inbox/, outbox/) and the miner skips them on the next pass. No flag, no fork — you're using a mechanism the tool already respects." } },
    { "@type": "Question", "name": "Does adding .gitignore remove what was already indexed?", "acceptedAnswer": { "@type": "Answer", "text": "No. Mining is usually additive — it files new content but doesn't delete drawers for files it no longer scans. To clear what's already in the index you need a prune/sync pass that removes entries whose source is now gitignored, deleted, or moved. The .gitignore prevents future noise; the prune cleans up the past." } }
    
  ]
}
</script>


<script>
  // Anonymous blog analytics (PostHog) — same posture as the main site and the
  // app's TELEMETRY.md: public write-only token ('' = inert), anonymous-only
  // (person_profiles 'never'), no autocapture/recording, DNT respected.
  (function () {
    var PH_KEY = 'phc_qJzsokwcbtTGHemnvywR3nSqivNNgMjHeNVEWkZNydFB';
    if (!PH_KEY || navigator.doNotTrack === '1') return;
    var s = document.createElement('script');
    s.async = true;
    s.src = 'https://us-assets.i.posthog.com/static/array.js';
    s.onload = function () {
      if (!window.posthog) return;
      window.posthog.init(PH_KEY, {
        api_host: 'https://us.i.posthog.com',
        person_profiles: 'never',
        autocapture: false,
        before_send: function (event) {
          // PostHog fills $ip from the connection unless the event carries one.
          // Null it here and disable the GeoIP lookup so no IP, city, postal
          // code or lat/long is ever derived or stored for this page view.
          if (event && event.properties) {
            event.properties.$ip = null;
            event.properties.$geoip_disable = true;
          }
          return event;
        },
        disable_session_recording: true,
        respect_dnt: true
      });
    };
    document.head.appendChild(s);
  })();
</script>
</head>
<body class="theme-press">
<a class="skip-link" href="#main">Skip to content</a>
<nav id="nav">
  <a class="brand" href="https://munderdiffl.in" aria-label="Munder Difflin home">
    <img class="brand-logo" src="https://munderdiffl.in/logo.png" width="1318" height="840" alt="Munder Difflin, Inc. — Multi-Agent Harness" />
  </a>
  <span class="spacer"></span>
  <div class="links">
    <a href="/blog/">Latest</a>
    <a href="/blog/topics/">Topics</a>
    <a href="/blog/about/">About</a>
    <a href="https://munderdiffl.in">↗ Product</a>
  </div>
  <div class="nav-actions">
    <a class="btn sm" href="https://munderdiffl.in/blog/feed.xml" aria-label="RSS feed">⤵ RSS</a>
    <a class="btn sm primary" href="https://munderdiffl.in/#install">⤓ Download</a>
  </div>
</nav>

<main id="main">

<article class="t-memory">
  <header class="post-head wrap">
    <nav class="crumbs" aria-label="Breadcrumb">
      <a href="/blog/">Blog</a>
      <span>/</span>
      <a href="/blog/topics/memory/">Memory</a>
    </nav>
    <h1>Keep Your Agent&#39;s Semantic Memory Clean: Don&#39;t Index the Config</h1>
    <p class="dek">A semantic memory layer is only as good as what you feed it — how an agent&#39;s recall got swamped by config and logs, and the .gitignore + prune fix.</p>
    <div class="byline">
      <span class="av" aria-hidden="true">CG</span>
      <strong>Chaitanya Giri</strong>
      <span class="dot" aria-hidden="true">·</span>
      <time datetime="2026-06-04">Jun 4, 2026</time>
      <span class="dot" aria-hidden="true">·</span>
      <span>6 min read</span>
      <span class="tag kind">Memory</span>
    </div>
  </header>

  <div class="hero-wrap wrap"><figure class="fig fig-hero"><img src="/blog/assets/media/keep-agent-semantic-memory-clean/hero.png" alt="Illustration: Keep Your Agent's Semantic Memory Clean: Don't Index the Config" loading="lazy" decoding="async" /></figure></div>

  <div class="post-wrap wrap">
    <div class="prose">
      <div class="callout tldr"><span class="ic">TL;DR</span><p>A semantic memory layer indexes whatever
files you point it at — and an agent's folder holds more than its notes. When a large
<strong>settings file</strong> and a folder of <strong>message JSON</strong> got mined alongside the
real <code>memory.md</code>, the wake-up digest filled with config blobs and became unreadable. The fix
is two moves: drop a <strong>.gitignore</strong> in each indexed directory so the miner skips the
non-memory files, then run a <strong>prune pass</strong> to evict what was already filed. Recall is only
as good as the corpus you feed it.</p></div>
<p><a href="/blog/semantic-memory-for-ai-agents/">Semantic memory</a> is supposed to make an agent recall the right
note by <em>meaning</em> — you ask “how do we build the web bundle?” and it surfaces the note about
electron-vite even though you never typed that word. It works beautifully when the index contains your
notes. It falls apart quietly when the index contains everything <em>else</em> too.</p>
<p>This is a short post about a real bug I hit in a running hive, why it happened, and the small fix that
made the memory layer useful again. The lesson generalizes to any agent that mines a directory into a
vector store.</p>
<h2 id="the-symptom-a-wake-up-digest-full-of-config" tabindex="-1">The symptom: a wake-up digest full of config <a class="anchor" href="#the-symptom-a-wake-up-digest-full-of-config" aria-hidden="true">#</a></h2>
<p>Each agent in the hive keeps a markdown memory and writes durable facts to it as it works. A background
loop mines every agent’s folder into a shared semantic store every few minutes, so the whole team can
recall by meaning. At session start an agent runs a <code>wake-up</code> command that returns the most salient
memories in ~600–900 tokens — its “what do I already know” digest.</p>
<p>One morning the digest looked like this:</p>
<pre class="language-text"><code class="language-text">## L1 — ESSENTIAL STORY
[general]
  - {   "hooks": {     "Stop": [       {         "hooks": [           { "type": "command",
        "command": "node \"/.../cth-hook.cjs\"" ...   (settings.json)
  - ]       }     ],     "PostToolUse": [       {         "matcher": "*", ...   (settings.json)
  - # Memory — Kelly  _Append durable facts, decisions, and context below._   (memory.md)
  - {   "hooks": {     "Stop": [ ...   (settings.json)</code></pre>
<p>The “essential story” was almost entirely a hooks configuration file, repeated across agents, with the
occasional real note wedged between the blobs. The most important context an agent could load was
being spent on JSON it would never need to recall.</p>
<figure class="fig fig-inline"><img src="/blog/assets/media/keep-agent-semantic-memory-clean/note-1.png" alt="Hand-drawn sketch from “Keep Your Agent's Semantic Memory Clean: Don't Index the Config”" loading="lazy" decoding="async" /></figure>
<h2 id="the-cause-the-index-ate-the-whole-directory" tabindex="-1">The cause: the index ate the whole directory <a class="anchor" href="#the-cause-the-index-ate-the-whole-directory" aria-hidden="true">#</a></h2>
<p>The miner does what most file-based indexers do — it walks the target directory and files every file it
finds. But an agent’s folder isn’t just <code>memory.md</code>. It also holds:</p>
<ul>
<li><code>settings.json</code> — the Claude Code hooks config. A large, deeply-nested JSON blob.</li>
<li><code>cursor.json</code> — bookkeeping for which messages have been processed.</li>
<li><code>inbox/</code> and <code>outbox/</code> — raw inter-agent message JSON, unstructured and high-volume.</li>
</ul>
<p>Two things made this especially toxic to recall. First, <strong>size becomes weight</strong>: a big config file
chunks into many embeddings, so it occupies far more of the index than a terse three-line note — and a
digest that ranks by salience surfaces it first. Second, <strong>machine files aren’t memories</strong>: a hooks
config or a message envelope has no durable knowledge in it, so every drawer it fills is pure noise. The
signal — the few sentences an agent actually wrote down — drowned.</p>
<p>This is the semantic-memory version of a classic <a href="/blog/context-engineering-for-ai-agents/">context-engineering</a>
mistake: the failure isn’t the model or the embeddings, it’s that we fed the layer the wrong corpus.</p>
<h2 id="the-fix-part-one-tell-the-miner-what-not-to-read" tabindex="-1">The fix, part one: tell the miner what not to read <a class="anchor" href="#the-fix-part-one-tell-the-miner-what-not-to-read" aria-hidden="true">#</a></h2>
<p>The miner already honored <code>.gitignore</code> — it just had nothing to honor, because the agent folders had no
<code>.gitignore</code>. So the fix is to write one. In each indexed directory:</p>
<pre class="language-gitignore"><code class="language-gitignore"><span class="token entry string">settings.json</span>
<span class="token entry string">cursor.json</span>
<span class="token entry string">inbox<span class="token punctuation">/</span></span>
<span class="token entry string">outbox<span class="token punctuation">/</span></span></code></pre>
<p>On the next pass the miner skips those paths and files only the real memory. No new flag, no fork of the
tool, no <code>--exclude</code> plumbing through three layers of code — we used a convention the indexer already
respected. Two places write this file: the indexer ensures it exists right before each mine, and the
agent bootstrap drops it in at <em>birth</em>, next to the freshly-created <code>memory.md</code>, so a new agent is clean
from its first cycle. The write is append-only and idempotent — it adds only the missing lines and never
rewrites a file that’s already correct, so it’s safe to call every cycle.</p>
<p>There’s a small design principle hiding here: <strong>the directory you index should describe what belongs in
it.</strong> A <code>.gitignore</code> is a readable, version-controlled declaration of “these files are operational, not
knowledge.” That’s better than burying an exclude list inside the miner, where the next person has to go
read source code to find out why their config isn’t showing up in recall.</p>
<figure class="fig fig-inline"><img src="/blog/assets/media/keep-agent-semantic-memory-clean/note-2.png" alt="Hand-drawn sketch from “Keep Your Agent's Semantic Memory Clean: Don't Index the Config”" loading="lazy" decoding="async" /></figure>
<h2 id="the-fix-part-two-prune-whats-already-filed" tabindex="-1">The fix, part two: prune what’s already filed <a class="anchor" href="#the-fix-part-two-prune-whats-already-filed" aria-hidden="true">#</a></h2>
<p>Adding a <code>.gitignore</code> stops <em>future</em> noise. It does nothing about the thousands of config drawers
already sitting in the index, because mining is <strong>additive</strong> — it files new content and updates changed
content, but it doesn’t delete drawers for files it simply stopped scanning. Re-mining the cleaned
folder won’t help; the old entries aren’t tied to anything the new pass touches.</p>
<p>You need a separate prune. A good memory CLI ships one — a <code>sync</code> that walks the index and removes any
drawer whose source file is now gitignored, deleted, or moved:</p>
<pre class="language-bash"><code class="language-bash"><span class="token comment"># preview first — see what would be removed</span>
mempalace <span class="token function">sync</span> ./hive/agents --dry-run

<span class="token comment"># then commit the deletions</span>
mempalace <span class="token function">sync</span> ./hive/agents <span class="token parameter variable">--apply</span></code></pre>
<p>In the live hive this evicted ~800 noise drawers (the gitignored config and message JSON, plus a few
whose source files had already been archived) and kept ~600 real-memory drawers. The global wake-up went
from a wall of <code>settings.json</code> to actual notes — agent roles, working directories, a design hand-off, a
release decision — and the digest got <em>smaller</em> (754 → 603 tokens) while carrying far more signal.</p>
<blockquote>
<p><strong>Mental model:</strong> <code>.gitignore</code> is the filter on the way <em>in</em>; <code>sync --apply</code> is the cleanup on the way
<em>out</em>. You need both. The first keeps the corpus clean going forward; the second repairs the damage
already done. Doing only the first leaves you waiting for the noise to age out on its own — and it
won’t.</p>
</blockquote>
<h2 id="why-this-matters-beyond-one-tool" tabindex="-1">Why this matters beyond one tool <a class="anchor" href="#why-this-matters-beyond-one-tool" aria-hidden="true">#</a></h2>
<p>If you’re building or running any agent with a <a href="/blog/give-claude-code-long-term-memory/">long-term memory layer</a>,
the takeaway is corpus discipline:</p>
<ul>
<li><strong>Index notes, not machinery.</strong> Config, cursors, locks, and message logs are operational state, not
knowledge. Keep them out of the recall corpus on purpose.</li>
<li><strong>Make exclusions declarative.</strong> A <code>.gitignore</code> (or equivalent manifest) at the indexed root is
legible and diffable; an exclude list hidden in code is neither.</li>
<li><strong>Separate “stop indexing” from “remove what’s indexed.”</strong> Additive miners don’t garbage-collect.
Budget for a periodic prune, or your index slowly fills with the ghosts of files you’ve moved on from.</li>
<li><strong>Watch the digest, not just the search.</strong> A keyword search can still find a good note buried under
noise; a fixed-size wake-up digest can’t — it’s the canary that tells you the corpus has drifted.</li>
</ul>
<p>Good <a href="/blog/markdown-first-agent-memory/">memory hygiene</a> is the difference between a memory layer that
sharpens an agent and one that buries it. Small, atomic, factual notes in; operational files out; a
prune pass to keep it honest.</p>
<hr>
<p>Munder Difflin gives every Claude Code agent markdown memory plus
<a href="https://munderdiffl.in/#how">a shared semantic palace the whole hive can recall from</a> — local, fast,
and clean by default.
<a href="https://munderdiffl.in/#install">Download Munder Difflin</a> to give your agents memory that actually
sticks; it’s free and open source.</p>


      
      <section class="faq" aria-label="Frequently asked questions">
        <h2 id="faq">FAQ</h2>
        
        <div class="qa">
          <p class="q">Why would an agent&#39;s semantic memory return config files instead of real notes?</p>
          <p class="a">Because the indexer mines a directory, and the directory holds more than your notes. If your agent&#39;s folder also contains a settings file, a cursor file, and an inbox of message JSON, a naive &#39;index everything&#39; pass files all of it. A large config blob produces many embeddings, so it dominates the wake-up digest and crowds out the handful of notes you actually wrote.</p>
        </div>
        
        <div class="qa">
          <p class="q">How do I stop a miner from indexing config and message files?</p>
          <p class="a">Most file-based miners honor .gitignore. Drop a .gitignore in each indexed directory listing the non-memory files (settings, cursor, inbox/, outbox/) and the miner skips them on the next pass. No flag, no fork — you&#39;re using a mechanism the tool already respects.</p>
        </div>
        
        <div class="qa">
          <p class="q">Does adding .gitignore remove what was already indexed?</p>
          <p class="a">No. Mining is usually additive — it files new content but doesn&#39;t delete drawers for files it no longer scans. To clear what&#39;s already in the index you need a prune/sync pass that removes entries whose source is now gitignored, deleted, or moved. The .gitignore prevents future noise; the prune cleans up the past.</p>
        </div>
        
      </section>
      

      
      <hr />
      <div class="share">
        <span class="lbl">Tags</span>
        <a class="tag" href="/blog/tags/memory/">Memory</a><a class="tag" href="/blog/tags/mempalace/">MemPalace</a><a class="tag" href="/blog/tags/multi-agent/">Multi-Agent</a><a class="tag" href="/blog/tags/claude-code/">Claude Code</a>
      </div>
      
    </div>

    
    <aside class="toc-rail" aria-label="Table of contents">
      <div class="tt">On this page</div>
      <ol>
        <li class="lvl-2"><a href="#the-symptom-a-wake-up-digest-full-of-config">The symptom: a wake-up digest full of config</a></li><li class="lvl-2"><a href="#the-cause-the-index-ate-the-whole-directory">The cause: the index ate the whole directory</a></li><li class="lvl-2"><a href="#the-fix-part-one-tell-the-miner-what-not-to-read">The fix, part one: tell the miner what not to read</a></li><li class="lvl-2"><a href="#the-fix-part-two-prune-whats-already-filed">The fix, part two: prune what’s already filed</a></li><li class="lvl-2"><a href="#why-this-matters-beyond-one-tool">Why this matters beyond one tool</a></li>
      </ol>
    </aside>
    
  </div>

  <footer class="post-foot wrap"><div class="prevnext">
      <a class="pn prev" href="/blog/local-first-ai-agent-orchestration/"><span class="k">← Older</span><span class="t">Local-First AI Agent Orchestration: How a Hive Runs Without a Cloud</span></a>
      <a class="pn next" href="/blog/human-in-the-loop-approving-ai-agents/"><span class="k">Newer →</span><span class="t">Approving AI Agents: Human-in-the-Loop Without a Queue</span></a>
    </div>
    <section class="related">
      <h2>Related in Memory</h2>
      <div class="post-grid">
        <article class="card t-memory">
  <a class="thumb t-memory" href="/blog/how-agents-remember-semantic-memory/" aria-hidden="true" tabindex="-1"><img src="/blog/assets/media/how-agents-remember-semantic-memory/hero.png" alt="" loading="lazy" decoding="async" /></a>
  <div class="body">
    <div class="meta">
      <time datetime="2026-06-04">Jun 4, 2026</time>
      <span class="dot" aria-hidden="true"></span>
      <span>5 min</span>
    </div>
    <h3><a href="/blog/how-agents-remember-semantic-memory/">How AI Agents Remember: Semantic Memory in a Hive</a></h3>
    <p class="dek">A code-grounded guide to how AI agents remember — the MemPalace mine loop, per-agent wings, and wake-up digest that give a Claude Code hive shared recall.</p>
    <div class="foot">
      <span class="tag kind">Memory</span>
      <a class="more" href="/blog/how-agents-remember-semantic-memory/" aria-label="Read: How AI Agents Remember: Semantic Memory in a Hive">Read →</a>
    </div>
  </div>
</article>
<article class="card t-memory">
  <a class="thumb t-memory" href="/blog/give-claude-code-long-term-memory/" aria-hidden="true" tabindex="-1"><img src="/blog/assets/media/give-claude-code-long-term-memory/hero.png" alt="" loading="lazy" decoding="async" /></a>
  <div class="body">
    <div class="meta">
      <time datetime="2026-05-27">May 27, 2026</time>
      <span class="dot" aria-hidden="true"></span>
      <span>3 min</span>
    </div>
    <h3><a href="/blog/give-claude-code-long-term-memory/">How to Give Claude Code Long-Term Memory</a></h3>
    <p class="dek">Claude Code forgets between sessions. Here&#39;s how a markdown-first memory layer with semantic recall lets your agents remember across runs.</p>
    <div class="foot">
      <span class="tag kind">Memory</span>
      <a class="more" href="/blog/give-claude-code-long-term-memory/" aria-label="Read: How to Give Claude Code Long-Term Memory">Read →</a>
    </div>
  </div>
</article>
<article class="card t-memory">
  <a class="thumb t-memory" href="/blog/markdown-first-agent-memory/" aria-hidden="true" tabindex="-1"><img src="/blog/assets/media/markdown-first-agent-memory/hero.png" alt="" loading="lazy" decoding="async" /></a>
  <div class="body">
    <div class="meta">
      <time datetime="2026-05-27">May 27, 2026</time>
      <span class="dot" aria-hidden="true"></span>
      <span>5 min</span>
    </div>
    <h3><a href="/blog/markdown-first-agent-memory/">Why We Built Agent Memory Markdown-First</a></h3>
    <p class="dek">Markdown-first AI agent long-term memory: plain notes a human can read and git can diff, with a semantic index on top that degrades gracefully.</p>
    <div class="foot">
      <span class="tag kind">Memory</span>
      <a class="more" href="/blog/markdown-first-agent-memory/" aria-label="Read: Why We Built Agent Memory Markdown-First">Read →</a>
    </div>
  </div>
</article>

      </div>
    </section>
    
  </footer>
</article>

</main>
<footer class="site-foot">
  <div class="wrap">
    <div class="foot-top">
      <a class="foot-brand brand" href="https://munderdiffl.in" aria-label="Munder Difflin home">
        <img class="brand-logo" src="https://munderdiffl.in/logo.png" width="1318" height="840" alt="Munder Difflin, Inc. — Multi-Agent Harness" />
      </a>
      <div class="foot-links">
        <a href="/blog/">Latest</a>
        <a href="/blog/topics/">Topics</a>
        <a href="/blog/about/">About</a>
        <a href="https://munderdiffl.in/blog/feed.xml">RSS</a>
        <a href="https://github.com/chaitanyagiri/munder-difflin">GitHub</a>
        <a href="https://munderdiffl.in">munderdiffl.in ↗</a>
      </div>
    </div>
    <div class="foot-meta">
      © 2026 Munder Difflin · Local-first · MIT-licensed ·
      Built on <a href="https://munderdiffl.in">Electron, React, Pixi.js, xterm.js &amp; node-pty</a>.
      Run an office of agents while you sleep.
    </div>
  </div>
</footer>

<script>
  // sticky-nav border on scroll
  (function () {
    var nav = document.getElementById('nav');
    if (!nav) return;
    var onScroll = function () { nav.classList.toggle('scrolled', window.scrollY > 8); };
    onScroll(); window.addEventListener('scroll', onScroll, { passive: true });
  })();
  // YouTube click-to-load: thumbnail button → youtube-nocookie iframe
  (function () {
    document.addEventListener('click', function (e) {
      var btn = e.target.closest('.yt-load');
      if (!btn) return;
      var box = btn.closest('.yt');
      var id = box && box.getAttribute('data-yt');
      // Only an 11 character YouTube video id may reach the iframe URL.
      if (!id || !/^[A-Za-z0-9_-]{11}$/.test(id)) return;
      var frame = document.createElement('iframe');
      frame.src = 'https://www.youtube-nocookie.com/embed/' + encodeURIComponent(id) + '?autoplay=1';
      frame.title = box.getAttribute('data-title') || 'YouTube video';
      frame.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share';
      frame.setAttribute('allowfullscreen', '');
      box.replaceChildren(frame);
    });
  })();
</script>

</body>
</html>