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

26.2 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>How to Manage Multiple Claude Code Sessions Like a Pro — Munder Difflin Blog</title>
<meta name="description" content="Tactics to manage multiple Claude Code sessions without losing track: naming, roles, context isolation, and when a harness beats juggling terminal tabs." />
<link rel="canonical" href="https://munderdiffl.in/blog/manage-multiple-claude-code-sessions/" />

<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="How to Manage Multiple Claude Code Sessions Like a Pro — Munder Difflin Blog" />
<meta property="og:description" content="Tactics to manage multiple Claude Code sessions without losing track: naming, roles, context isolation, and when a harness beats juggling terminal tabs." />
<meta property="og:url" content="https://munderdiffl.in/blog/manage-multiple-claude-code-sessions/" />
<meta property="og:image" content="https://munderdiffl.in/blog/assets/media/manage-multiple-claude-code-sessions/hero.png" />
<meta property="og:image:width" content="1600" />
<meta property="og:image:height" content="900" />
<meta property="og:image:alt" content="Illustration: How to Manage Multiple Claude Code Sessions Like a Pro" />
<meta property="og:locale" content="en_US" />
<meta property="article:published_time" content="2026-05-25T00:00:00.000Z" />
<meta property="article:author" content="Chaitanya Giri" />
<meta property="article:tag" content="Guides" />
<meta property="article:tag" content="Workflow" />
<meta property="article:tag" content="Claude Code" />
<meta property="article:tag" content="Multi-Agent" />


<!-- Twitter -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="How to Manage Multiple Claude Code Sessions Like a Pro — Munder Difflin Blog" />
<meta name="twitter:description" content="Tactics to manage multiple Claude Code sessions without losing track: naming, roles, context isolation, and when a harness beats juggling terminal tabs." />
<meta name="twitter:image" content="https://munderdiffl.in/blog/assets/media/manage-multiple-claude-code-sessions/hero.png" />
<meta name="twitter:image:alt" content="Illustration: How to Manage Multiple Claude Code Sessions Like a Pro" />

<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": "How to Manage Multiple Claude Code Sessions Like a Pro",
  "description": "Tactics to manage multiple Claude Code sessions without losing track: naming, roles, context isolation, and when a harness beats juggling terminal tabs.",
  "image": ["https://munderdiffl.in/blog/assets/media/manage-multiple-claude-code-sessions/hero.png"],
  "datePublished": "2026-05-25T00:00:00.000Z",
  "dateModified": "2026-05-25T00: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/manage-multiple-claude-code-sessions/" },
  "keywords": "how to manage multiple claude code sessions, manage claude code sessions, claude code workflow, multiple terminals",
  "articleSection": "Guides",
  "inLanguage": "en-US",
  "url": "https://munderdiffl.in/blog/manage-multiple-claude-code-sessions/"
}
</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": "How to Manage Multiple Claude Code Sessions Like a Pro", "item": "https://munderdiffl.in/blog/manage-multiple-claude-code-sessions/" }
  ]
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    { "@type": "Question", "name": "How many Claude Code sessions should I run at once?", "acceptedAnswer": { "@type": "Answer", "text": "As many as you can still account for. Most people stay legible at two to four manual sessions; past that, the tracking overhead grows faster than the throughput, which is the point where a coordinating harness pays off." } },
    { "@type": "Question", "name": "How do I stop two Claude Code sessions from editing the same file?", "acceptedAnswer": { "@type": "Answer", "text": "Give each session a clearly scoped role so their files rarely overlap, and run shared work through a single coordination rule. In a harness this is automatic: a single-committer git design and per-agent workspaces keep writes from colliding." } },
    { "@type": "Question", "name": "What's the difference between a session and an agent?", "acceptedAnswer": { "@type": "Answer", "text": "A session is one running `claude` process. An agent is a session with a durable identity — a role, its own memory, and a mailbox — so it persists as a teammate across tasks instead of being a throwaway window." } }
    
  ]
}
</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-guides">
  <header class="post-head wrap">
    <nav class="crumbs" aria-label="Breadcrumb">
      <a href="/blog/">Blog</a>
      <span>/</span>
      <a href="/blog/topics/guides/">Guides</a>
    </nav>
    <h1>How to Manage Multiple Claude Code Sessions Like a Pro</h1>
    <p class="dek">Tactics to manage multiple Claude Code sessions without losing track: naming, roles, context isolation, and when a harness beats juggling terminal tabs.</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-05-25">May 25, 2026</time>
      <span class="dot" aria-hidden="true">·</span>
      <span>4 min read</span>
      <span class="tag kind">Guides</span>
    </div>
  </header>

  <div class="hero-wrap wrap"><figure class="fig fig-hero"><img src="/blog/assets/media/manage-multiple-claude-code-sessions/hero.png" alt="Illustration: How to Manage Multiple Claude Code Sessions Like a Pro" 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>To
<strong>manage multiple Claude Code sessions</strong> without losing track, give each a
<strong>name and a role</strong>, keep their <strong>contexts isolated</strong> so they don't step on
each other, and write down what each learns somewhere the others can read. Manual tabs work to about
three or four sessions; past that, a harness that adds messaging, shared memory, and a single committer
is what keeps it calm.</p></div>
<p>Running one Claude Code session is easy. The trouble starts around session three, when “what is each
of these doing right now?” stops having an obvious answer. Here’s how to keep multiple sessions
legible — first by hand, then with tooling once the hand-management stops scaling.
Claude Code also has experimental <a href="/blog/claude-code-agent-teams/">agent teams</a>.</p>
<h2 id="the-three-failure-modes" tabindex="-1">The three failure modes <a class="anchor" href="#the-three-failure-modes" aria-hidden="true">#</a></h2>
<p>Almost every multi-session mess is one of these:</p>
<ol>
<li><strong>Lost track.</strong> Six tabs, and you can’t say what’s in flight without reading each one.</li>
<li><strong>Collisions.</strong> Two sessions edit the same file or commit at the same moment, and you get
half-applied changes or a <code>git index.lock</code> error.</li>
<li><strong>Re-explaining.</strong> Each session forgets what the others figured out, so you become the courier,
pasting context between windows.</li>
</ol>
<p>Good management is just the set of habits that prevent these three. Take them in order.</p>
<h2 id="habit-1-name-and-scope-every-session" tabindex="-1">Habit 1 — Name and scope every session <a class="anchor" href="#habit-1-name-and-scope-every-session" aria-hidden="true">#</a></h2>
<p>An unnamed session is an anonymous liability. Give each one a name that <em>is</em> its job:
<code>test-writer</code>, <code>migration</code>, <code>reviewer</code>, <code>docs</code>. The name does two things — it tells you what the tab
is for at a glance, and it constrains the session so it doesn’t wander into another’s work.</p>
<p>Scope follows naming. A session called <code>reviewer</code> reviews; it doesn’t start refactoring. The tighter
the scope, the less the sessions overlap, which directly defuses failure mode #2.</p>
<figure class="fig fig-inline"><img src="/blog/assets/media/manage-multiple-claude-code-sessions/note-1.png" alt="Hand-drawn sketch from “How to Manage Multiple Claude Code Sessions Like a Pro”" loading="lazy" decoding="async" /></figure>
<h2 id="habit-2-isolate-context-on-purpose" tabindex="-1">Habit 2 — Isolate context on purpose <a class="anchor" href="#habit-2-isolate-context-on-purpose" aria-hidden="true">#</a></h2>
<p>Each <code>claude</code> session has its own context window, and that’s a feature: it keeps one task’s noise out
of another’s reasoning. The mistake is fighting it — trying to keep one giant session that “knows
everything.” Instead, lean into isolation:</p>
<ul>
<li>One session per <strong>independent</strong> unit of work.</li>
<li>Don’t paste the whole codebase into every session; let each pull only what its task needs.</li>
<li>When two tasks genuinely depend on each other, that’s a <em>coordination</em> problem, not a reason to
merge sessions (more on that below).</li>
</ul>
<p>Isolation is why parallel sessions are fast. It’s also why they forget — which is the next habit.</p>
<h2 id="habit-3-externalize-what-each-session-learns" tabindex="-1">Habit 3 — Externalize what each session learns <a class="anchor" href="#habit-3-externalize-what-each-session-learns" aria-hidden="true">#</a></h2>
<p>Context windows are wiped at the end of a session. Anything a session learned — a convention, a
gotcha, a decision — is gone unless it’s written somewhere durable. The fix is a small ritual: each
session writes durable facts to a file, and reads the relevant ones at the start of its next task.</p>
<pre class="language-markdown"><code class="language-markdown"><span class="token title important"><span class="token punctuation">##</span> build</span>
<span class="token list punctuation">-</span> The web bundle is built with electron-vite, NOT plain vite. Use <span class="token code-snippet code keyword">`npm run build`</span>.
<span class="token list punctuation">-</span> node-pty needs an electron-rebuild after install (the postinstall handles it).</code></pre>
<p>Plain markdown is enough to start. Once the notes pile up, you add a semantic index so a session can
recall the few relevant notes by meaning instead of re-reading everything — the full version of this
is <a href="/blog/give-claude-code-long-term-memory/">long-term memory for Claude Code</a>.</p>
<figure class="fig fig-inline"><img src="/blog/assets/media/manage-multiple-claude-code-sessions/note-2.png" alt="Hand-drawn sketch from “How to Manage Multiple Claude Code Sessions Like a Pro”" loading="lazy" decoding="async" /></figure>
<h2 id="habit-4-give-shared-work-a-single-coordination-rule" tabindex="-1">Habit 4 — Give shared work a single coordination rule <a class="anchor" href="#habit-4-give-shared-work-a-single-coordination-rule" aria-hidden="true">#</a></h2>
<p>Failure mode #2 — collisions — is the one pure discipline can’t fully solve, because two well-behaved
sessions can still both decide to commit at the same instant. The rule that fixes it: <strong>one writer per
thing.</strong> One session owns a file; shared state has one committer. When you do this by hand it means
agreeing, out loud, who touches what. It’s tedious, and it’s exactly the part that breaks down as you
add sessions.</p>
<h2 id="when-manual-management-stops-scaling" tabindex="-1">When manual management stops scaling <a class="anchor" href="#when-manual-management-stops-scaling" aria-hidden="true">#</a></h2>
<p>Two to four sessions are manageable with the habits above. Past that, the overhead curve bends the
wrong way — you spend more time being the message bus and the traffic cop than you save running the
sessions in parallel. That’s the signal to move from “managing sessions” to running a <strong>team</strong>.</p>
<p>A harness automates all four habits at once:</p>
<ul>
<li><strong>Naming and roles</strong> become first-class — each agent gets an identity injected into its system
prompt, so it knows who it is across tasks.</li>
<li><strong>Context isolation</strong> stays (every agent is still its own <code>claude</code> process) but coordination no
longer requires merging them.</li>
<li><strong>Externalized memory</strong> becomes shared and searchable — each agent’s notes are mined into a
store the whole team can recall from.</li>
<li><strong>The single-committer rule</strong> is enforced in code: agents write plain files and never call git;
one process commits, with retry and stale-lock recovery, so <code>index.lock</code> races simply can’t corrupt
the repo.</li>
</ul>
<p>That’s the leap from a <a href="/blog/claude-code-multi-agent-setup-tutorial/">multi-agent setup</a> you babysit
to one that runs itself. If you’re not sure you need it yet, you probably don’t — the honest rule is
to add tooling only when the tabs start costing you more than they return. The next read up is
<a href="/blog/how-to-run-multiple-claude-code-agents/">how to run multiple Claude Code agents</a>, which walks
the same progression with the orchestration layer in view.</p>
<h2 id="a-quick-management-checklist" tabindex="-1">A quick management checklist <a class="anchor" href="#a-quick-management-checklist" aria-hidden="true">#</a></h2>
<ul>
<li>[ ] Every session has a name that states its job.</li>
<li>[ ] Roles are scoped tightly enough that files rarely overlap.</li>
<li>[ ] Each session writes durable facts to memory and reads them on startup.</li>
<li>[ ] Shared state has exactly one writer.</li>
<li>[ ] When you can’t say what every session is doing, you have too many — consolidate or coordinate.</li>
</ul>
<hr>
<p>When the checklist starts feeling like a second job, that’s what a <a href="https://munderdiffl.in/#what">multi-agent harness</a> like Munder Difflin automates: roles,
isolated agents, shared memory, and a single committer, all on your own machine.
<a href="https://munderdiffl.in/#install">Download Munder Difflin</a> — 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">How many Claude Code sessions should I run at once?</p>
          <p class="a">As many as you can still account for. Most people stay legible at two to four manual sessions; past that, the tracking overhead grows faster than the throughput, which is the point where a coordinating harness pays off.</p>
        </div>
        
        <div class="qa">
          <p class="q">How do I stop two Claude Code sessions from editing the same file?</p>
          <p class="a">Give each session a clearly scoped role so their files rarely overlap, and run shared work through a single coordination rule. In a harness this is automatic: a single-committer git design and per-agent workspaces keep writes from colliding.</p>
        </div>
        
        <div class="qa">
          <p class="q">What&#39;s the difference between a session and an agent?</p>
          <p class="a">A session is one running `claude` process. An agent is a session with a durable identity — a role, its own memory, and a mailbox — so it persists as a teammate across tasks instead of being a throwaway window.</p>
        </div>
        
      </section>
      

      
      <hr />
      <div class="share">
        <span class="lbl">Tags</span>
        <a class="tag" href="/blog/tags/guides/">Guides</a><a class="tag" href="/blog/tags/workflow/">Workflow</a><a class="tag" href="/blog/tags/claude-code/">Claude Code</a><a class="tag" href="/blog/tags/multi-agent/">Multi-Agent</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-three-failure-modes">The three failure modes</a></li><li class="lvl-2"><a href="#habit-1-name-and-scope-every-session">Habit 1 — Name and scope every session</a></li><li class="lvl-2"><a href="#habit-2-isolate-context-on-purpose">Habit 2 — Isolate context on purpose</a></li><li class="lvl-2"><a href="#habit-3-externalize-what-each-session-learns">Habit 3 — Externalize what each session learns</a></li><li class="lvl-2"><a href="#habit-4-give-shared-work-a-single-coordination-rule">Habit 4 — Give shared work a single coordination rule</a></li><li class="lvl-2"><a href="#when-manual-management-stops-scaling">When manual management stops scaling</a></li><li class="lvl-2"><a href="#a-quick-management-checklist">A quick management checklist</a></li>
      </ol>
    </aside>
    
  </div>

  <footer class="post-foot wrap"><div class="prevnext">
      <a class="pn prev" href="/blog/claude-code-multi-agent-setup-tutorial/"><span class="k">← Older</span><span class="t">Set Up a Claude Code Multi-Agent Workflow in 10 Minutes</span></a>
      <a class="pn next" href="/blog/semantic-memory-for-ai-agents/"><span class="k">Newer →</span><span class="t">Semantic Memory for AI Agents: Recall in Milliseconds</span></a>
    </div>
    <section class="related">
      <h2>Related in Guides</h2>
      <div class="post-grid">
        <article class="card t-guides">
  <a class="thumb t-guides" href="/blog/claude-md-best-practices/" aria-hidden="true" tabindex="-1"><img src="/blog/assets/media/claude-md-best-practices/hero.png" alt="" loading="lazy" decoding="async" /></a>
  <div class="body">
    <div class="meta">
      <time datetime="2026-10-26">Oct 26, 2026</time>
      <span class="dot" aria-hidden="true"></span>
      <span>4 min</span>
    </div>
    <h3><a href="/blog/claude-md-best-practices/">CLAUDE.md Best Practices: What to Write, Where It Lives, How Long (Oct 2026)</a></h3>
    <p class="dek">CLAUDE.md best practices from Anthropic&#39;s docs, checked 26 Oct 2026: what to put in it, where each file lives, the 200 line target and how AGENTS.md loads.</p>
    <div class="foot">
      <span class="tag kind">Guides</span>
      <a class="more" href="/blog/claude-md-best-practices/" aria-label="Read: CLAUDE.md Best Practices: What to Write, Where It Lives, How Long (Oct 2026)">Read →</a>
    </div>
  </div>
</article>
<article class="card t-guides">
  <a class="thumb t-guides" href="/blog/codex-computer-use/" aria-hidden="true" tabindex="-1"><img src="/blog/assets/media/codex-computer-use/hero.png" alt="" loading="lazy" decoding="async" /></a>
  <div class="body">
    <div class="meta">
      <time datetime="2026-10-26">Oct 26, 2026</time>
      <span class="dot" aria-hidden="true"></span>
      <span>4 min</span>
    </div>
    <h3><a href="/blog/codex-computer-use/">Codex Computer Use: How to Turn It On, Plans and Limits (Oct 2026)</a></h3>
    <p class="dek">Codex computer use lets the ChatGPT desktop app see and click apps on macOS and Windows. Setup, which plans get it, locked use and how Claude&#39;s compares.</p>
    <div class="foot">
      <span class="tag kind">Guides</span>
      <a class="more" href="/blog/codex-computer-use/" aria-label="Read: Codex Computer Use: How to Turn It On, Plans and Limits (Oct 2026)">Read →</a>
    </div>
  </div>
</article>
<article class="card t-guides">
  <a class="thumb t-guides" href="/blog/cursor-pricing/" aria-hidden="true" tabindex="-1"><img src="/blog/assets/media/cursor-pricing/hero.png" alt="" loading="lazy" decoding="async" /></a>
  <div class="body">
    <div class="meta">
      <time datetime="2026-10-26">Oct 26, 2026</time>
      <span class="dot" aria-hidden="true"></span>
      <span>5 min</span>
    </div>
    <h3><a href="/blog/cursor-pricing/">Cursor Pricing (Oct 2026): Every Plan After the 12 Oct Change</a></h3>
    <p class="dek">Cursor pricing as of 26 Oct 2026: Free, Plus $8, Premium $30, Super $100, Ultra $200, Teams seats, what changed on 12 Oct and what old plans keep.</p>
    <div class="foot">
      <span class="tag kind">Guides</span>
      <a class="more" href="/blog/cursor-pricing/" aria-label="Read: Cursor Pricing (Oct 2026): Every Plan After the 12 Oct Change">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>