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
HTML agent-harnessagent-orchestrationagentsai-agentsautonomous-agentsclaude-codecodexcoding-agentsdesktop-appdeveloper-toolselectrongemini-cliharnessharness-engineeringlocal-firstmemorymulti-agentopencodeorchestrationtypescript
blog: standup h4 — 4 educational posts (62 → 66)
Chaitanya Giri783137c2a200
diff --git a/blog/src/posts/local-first-vs-cloud-agent-sdks.md b/blog/src/posts/local-first-vs-cloud-agent-sdks.mdnew file mode 100644index 00000000..7738419d--- /dev/null+++ b/blog/src/posts/local-first-vs-cloud-agent-sdks.md@@ -0,0 +1,142 @@+---+title: "Local-First vs Cloud Agent SDKs: Which Wins in 2026?"+description: "Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which."+date: 2026-06-04+category: comparisons+categoryLabel: Comparisons+type: Non-technical+primaryKeyword: "local-first vs cloud agent sdks"+secondaryKeywords: ["cloud agent sdk", "mcp a2a interop", "local ai agents vs cloud"]+tags: ["Comparisons", "Local-First", "Cloud Agents", "MCP"]+author:+ name: Chaitanya Giri+ initials: CG+faq:+ - q: "What's the difference between a local-first agent hive and a cloud agent SDK?"+ a: "A local-first hive runs the orchestration, files, and memory on your own machine; a cloud agent SDK runs the control plane as a managed service. Both call the same models — they differ in where coordination, data, and cost live."+ - q: "Do MCP and A2A only work in the cloud?"+ a: "No. MCP (tool integration) and A2A (agent-to-agent) are open interop standards, not cloud features — a local-first hive can speak MCP to your tools too. The standards are about interoperability, not where agents run."+ - q: "When should I choose a cloud agent SDK over a local hive?"+ a: "Choose cloud SDKs for distributed teams, enterprise governance, cross-vendor agent meshes, and elastic managed scale; choose a local-first hive for solo/small-team work on your own code, privacy, predictable cost, and no platform lock-in."+ - q: "Is local-first cheaper than cloud agents?"+ a: "Often, and more predictably. With platforms moving to usage-based billing — GitHub Copilot switched all plans to metered AI Credits in June 2026 — you pay a platform meter on top of model usage; a local hive adds no platform tax beyond the model calls you'd make anyway."+---++<div class="callout tldr"><span class="ic">TL;DR</span><p>2026 is the year the big labs shipped+<strong>cloud agent SDKs</strong> — OpenAI's Agents SDK, Google's ADK, Microsoft's Agent Framework —+and the interop standards <strong>MCP</strong> and <strong>A2A</strong> consolidated underneath them.+Meanwhile, <strong>local-first hives</strong> run the whole control plane on your own machine. They're+not really enemies: both call the same models and can speak the same standards. The real question is+<em>where the control plane, your data, and your cost live</em>. This is the honest decision guide for+which to pick.</p></div>++If you've been picking an approach for running AI agents in 2026, you've felt the whiplash: every major+lab now ships an agent SDK, two interop protocols are consolidating fast, and billing is going metered —+while a quieter movement says "just run the whole thing on your own machine." Both camps are right about+different things. Here's what each actually optimizes for, grounded in what shipped this year.++## The 2026 cloud agent SDK wave++The platform story moved quickly. OpenAI replaced its experimental Swarm with a production-grade+**Agents SDK**; Google shipped **ADK** across multiple languages; Anthropic renamed its SDK to the+**Claude Agent SDK** to signal broader ambitions; and Microsoft merged Semantic Kernel and AutoGen into+a unified **Agent Framework**, which [shipped 1.0 GA on April 3, 2026](https://visualstudiomagazine.com/articles/2026/04/06/microsoft-ships-production-ready-agent-framework-1-0-for-net-and-python.aspx)+with graph workflows, checkpointing, streaming, and human-in-the-loop built in.++Underneath the SDKs, the protocol layer is converging on a two-layer stack: **MCP** (Model Context+Protocol) for vertical *tool* integration and **A2A** (Agent-to-Agent) for horizontal *agent*+coordination. Per a [2026 survey of interop protocols](https://zylos.ai/research/2026-03-26-agent-interoperability-protocols-mcp-a2a-acp-convergence),+ACP folded into A2A under the Linux Foundation and MCP crossed 200 server implementations — the combo is+[becoming the enterprise default](https://www.morphllm.com/ai-agent-framework). The pitch is coherent:+managed scale, cross-vendor agent meshes, and governance you can hand to a platform team.++## The local-first hive++The other model keeps the coordination on your machine. A **local-first hive** runs the orchestrator,+the agents, their files, and their memory as local processes — only the model inference call leaves the+box. There's no control-plane server: agents coordinate through files, and the+[architecture is mechanically simple](/blog/local-first-ai-agent-orchestration/) precisely because it+isn't distributed across a vendor's infrastructure. The case for it — control, privacy, predictable+cost — is [made in full here](/blog/why-local-first-matters-for-ai-agents/).++The crucial nuance people miss: **local-first doesn't mean cut off from the standards.** A local hive+can speak MCP to your tools just like a cloud SDK does — [bringing your MCP servers and skills into the+hive](/blog/mcp-and-skills-in-a-hive/) is a feature, not a contradiction. Interop is about protocols,+not about where the agents run.++## They're not opposites — pick the axis that matters++It's tempting to frame this as local *versus* cloud, but most of the headline features (MCP, A2A,+HITL, streaming) are available to both. The decisions that actually differ come down to three axes:++- **Where the control plane runs** — a vendor's service, or a process on your laptop.+- **Where your data lives** — your code, memory, and message history on someone's servers, or on your+ disk.+- **How you pay** — a platform meter on top of model usage, or just the model usage.++Frame your choice around those, not around a local-vs-cloud team jersey.++## When cloud agent SDKs win++Be honest about where the managed approach is the right call:++- **Distributed teams** that need always-on, shared agent state across many people and locations.+- **Cross-vendor agent meshes** — if you're wiring agents from several frameworks together, native A2A+ (strongest today in Google ADK and CrewAI) earns its keep.+- **Enterprise governance** — centralized policy, audit, and identity that a security org can own.+- **Elastic scale** — bursty, large fan-out workloads where you'd rather rent compute than provision it.++If that's your situation, the cloud SDK wave is genuinely built for you.++## When a local-first hive wins++And where the local model is the better fit:++- **Solo developers and small teams** working against their own repositories, where the agents should+ edit your real working tree, not a synced sandbox.+- **Privacy-sensitive work** — client code, regulated environments, or anything where your codebase and+ its accumulated [memory](/blog/semantic-memory-for-ai-agents/) shouldn't sit on a third party's+ servers.+- **Predictable cost** — no per-seat or per-run platform tax layered on top of model spend.+- **No lock-in** — files and markdown you own, on standards you can take elsewhere.++For one person or a handful of developers shipping against their own code, the control and cost story+usually outweighs managed convenience.++## The cost axis is shifting — in local-first's favor++Cost deserves its own note, because 2026 changed the math. GitHub Copilot+[moved all plans to usage-based billing on June 1, 2026](https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/),+replacing flat premium-request units with metered **AI Credits** consumed by token usage. That's the+broader direction of travel for cloud agent platforms: a meter on top of the model calls. A local-first+hive adds **no platform tax** — you pay for the inference you'd pay for anyway, and the orchestration is+free because it's just code running on your machine. As you scale from two agents to a dozen, that gap+compounds. (Related: [doing more with less via model routing](/blog/do-more-with-less-model-routing/).)++## The decision table++| If you need… | Lean toward |+|---|---|+| Always-on shared state for a distributed team | Cloud agent SDK |+| Cross-vendor agent mesh (multiple frameworks) | Cloud SDK with native A2A |+| Centralized enterprise governance / audit | Cloud agent SDK |+| Editing your own real codebase, privately | Local-first hive |+| Predictable cost with no platform meter | Local-first hive |+| Standards (MCP) without lock-in | Either — both can speak MCP |++## The bottom line++The 2026 cloud agent SDKs are a real, well-built answer to *distributed, governed, elastic* agent work.+A local-first hive is the right answer to *private, predictable, own-your-code* agent work. The+standards — MCP and A2A — belong to neither camp, which is the most useful thing to internalize: you can+adopt the interoperability without surrendering the control plane. Pick based on where your data and+cost should live, not on the hype cycle. If you're still weighing options,+[how to choose a multi-agent tool](/blog/how-to-choose-a-multi-agent-tool/) is the buyer's checklist.++---++Munder Difflin is the [local-first](/#why) end of this spectrum — a hive where the orchestrator, agents,+and memory run on your machine and still speak MCP to your tools. [Download Munder Difflin](/#install)+to run agents on your own terms — free and open source.++<p style="font-size:0.85em;opacity:0.7;margin-top:2rem">Sources: <a href="https://visualstudiomagazine.com/articles/2026/04/06/microsoft-ships-production-ready-agent-framework-1-0-for-net-and-python.aspx">Visual Studio Magazine — Microsoft Agent Framework 1.0 GA</a>; <a href="https://zylos.ai/research/2026-03-26-agent-interoperability-protocols-mcp-a2a-acp-convergence">Zylos — Agent Interoperability Protocols 2026 (MCP/A2A/ACP)</a>; <a href="https://www.morphllm.com/ai-agent-framework">Morph — AI Agent Frameworks in 2026</a>; <a href="https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/">GitHub Blog — Copilot usage-based billing</a>.</p>diff --git a/blog/src/posts/long-running-agents-the-2026-shift.md b/blog/src/posts/long-running-agents-the-2026-shift.mdnew file mode 100644index 00000000..9f888e37--- /dev/null+++ b/blog/src/posts/long-running-agents-the-2026-shift.md@@ -0,0 +1,150 @@+---+title: "Long-Running Agents: The 2026 Shift from Minutes to Hours"+description: "Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one."+date: 2026-06-04+category: concepts+categoryLabel: Concepts+type: Non-technical+primaryKeyword: "long-running ai agents"+secondaryKeywords: ["autonomous coding agents", "ai agent time horizon", "long-horizon agents", "agentic ai 2026"]+tags: ["Long-Running Agents", "Agentic AI", "Trends", "Multi-Agent"]+author:+ name: Chaitanya Giri+ initials: CG+faq:+ - q: "What is a long-running AI agent?"+ a: "It's an agent that works autonomously on a task for an extended stretch — minutes to hours — rather than answering a single prompt and stopping. Instead of a turn-by-turn assistant you steer constantly, a long-running agent takes a goal and pursues it across many steps, tool calls, and decisions before coming back to you. Owning a whole feature or a migration end-to-end, rather than one edit at a time, is the difference."+ - q: "How fast is agent task length actually growing?"+ a: "METR, which measures the length of tasks AI can complete autonomously at roughly 50% reliability, found this 'time horizon' has doubled about every seven months since 2019 — and accelerated to roughly every four months in the 2024–2025 window. Extrapolated, that points toward agents handling tasks that take humans many hours, then days, within a few years."+ - q: "Why is a longer agent harder, not just bigger?"+ a: "Because the failure modes change. A short agent mostly needs the right answer. A long-running one also has to stay coherent over hours, avoid drifting off the goal, manage a context window that keeps filling, and recover from the failures that inevitably happen along the way. Capability gets you the long run; engineering keeps it from falling apart partway through."+ - q: "Do I need one giant agent or several coordinated ones?"+ a: "Often several. A long-horizon goal can be split across a coordinated team of agents working in parallel — each on a scoped piece, sharing durable state — instead of one agent grinding linearly for ten hours. That keeps each agent's context small and contains the blast radius if one stumbles."+---++<div class="callout tldr"><span class="ic">TL;DR</span><p>The defining change in agentic AI this year:+agents stopped being <strong>seconds-long assistants</strong> and became <strong>hours-long+workers</strong>. METR's data shows the length of task an agent can complete autonomously has been+<strong>doubling roughly every seven months</strong> — lately faster — and model makers now report+single autonomous runs lasting <em>tens of hours</em>. But a longer agent is a <strong>different+engineering problem, not just a bigger one</strong>: it has to stay coherent, not drift, manage a+filling context window, and recover from failure — over hours. The teams ready for it are the ones who+already treat memory, reliability, and context as first-class.</p></div>++For most of the short history of AI coding tools, the interaction was a conversation: you asked, the+model answered in seconds, you asked again. The agent was a fast assistant you steered turn by turn. The+biggest shift of 2026 is that this is no longer the ceiling. Agents now **run for hours** — taking a+goal and working toward it across hundreds of steps before they need you again. That changes what an+agent can *do*, and it changes what you have to *build* to make it work.++## The trend, in numbers++This isn't a vibe; it's measurable. [METR](https://metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasks/)+tracks AI capability by a clever metric: the **length of task** an agent can complete autonomously at+about 50% reliability — its "time horizon." Their headline finding is that this time horizon has been+**doubling roughly every seven months since 2019**, and the pace has *accelerated* to around every four+months in the most recent stretch. A capability that doubles on that cadence doesn't creep; it+compounds. Tasks that were out of reach a year ago — multi-hour, multi-file, multi-decision work — land+inside the frontier fast.++The model makers' own reports track the same curve from the other side. Anthropic has described Claude+models sustaining focus on a single multi-step task for **tens of hours** of continuous autonomous+coding — the kind of run that can produce a working application end-to-end, not just a snippet. (Simon+Willison's [field notes on scaling long-running autonomous+coding](https://simonwillison.net/2026/jan/19/scaling-long-running-autonomous-coding/) are a good+practitioner's-eye view of what that actually looks like in practice.) Whichever number you watch, the+direction is the same: **minutes became hours.**++## What hours unlock++The jump from minutes to hours isn't quantitative, it's qualitative. A ten-minute agent fixes a bug. A+ten-*hour* agent can own a whole feature, work through a migration that sat on the backlog for a year, or+grind out the unglamorous refactor nobody scheduled. The unit of delegation changes from "this edit" to+"this outcome" — you hand over a goal and get back a result, not a turn in a conversation. That's the+promise people mean when they say agents are starting to feel less like autocomplete and more like+teammates.++## Why "longer" is a different problem++Here's the catch, and it's the part the headline numbers skip: **a longer agent fails in new ways.**++A short agent mostly has one job — get this answer right. A long-running agent has that job *plus*+several it never had to worry about before:++- **Coherence over time.** It has to remember what it decided an hour ago and not contradict itself on+ step 300.+- **Not drifting.** Over a long run it can slowly wander off the original goal, optimizing something+ adjacent to what you asked for.+- **A filling context window.** Hours of tool output and history pile up; without management, the window+ bloats and quality degrades — the thing we've called [context+ rot](/blog/prompt-caching-for-ai-agents/) elsewhere.+- **Failure along the way.** Across hundreds of steps, *something* will error, time out, or come back+ wrong. A short agent that fails just gets re-run. A long one that fails at hour nine can't afford to+ throw away nine hours.++In other words, capability gets the agent *into* a ten-hour run; **engineering** is what keeps it from+falling apart in the middle of one. That's why the boring infrastructure suddenly matters more than the+demo.++## What long-running agents actually need++The capabilities that were "nice to have" for a quick assistant become **load-bearing** the moment an+agent runs for hours:++- **Durable memory and state.** Progress has to live somewhere it survives a crash, so hour nine doesn't+ reset to zero. Persistent, [markdown-first memory](/blog/markdown-first-agent-memory/) and+ [semantic recall](/blog/semantic-memory-for-ai-agents/) are how an agent carries what it learned across+ a long run without dragging it all through the window.+- **Context engineering.** With hours of history, *what stays in the window* is a constant decision —+ curate the relevant, shed the stale, and keep the stable prefix [cacheable so you're not re-paying for+ it every turn](/blog/prompt-caching-for-ai-agents/).+- **Reliability by design.** Bounded retries, validation at the boundary, and recovery from a known-good+ state are what let a long run survive its inevitable failures instead of dying on them — the whole case+ for [building reliable agents](/blog/building-reliable-ai-agents/).+- **Observability.** When an agent works for hours unattended, you need to be able to see what it did and+ [debug it after the fact](/blog/debugging-multi-agent-systems/) — a long silent run you can't inspect+ is a liability, not a feature.++None of these are new ideas. What's new is that the shift to long-running agents turned them from+optional polish into the price of admission.++## One long agent, or a coordinated team?++There's a tempting picture of a single heroic agent grinding autonomously for ten hours. Often the better+answer is a **team**. A long-horizon goal can be decomposed across coordinated agents working in+parallel — each on a scoped slice, each with a small context, sharing durable state through files — so+the work fans out instead of stretching into one fragile linear marathon. It keeps every agent's window+lean, contains the blast radius when one stumbles, and finishes wall-clock faster. The shift to+long-running work and the move to multi-agent hives are, in that sense, two sides of the same coin: both+are answers to "how do we get more done autonomously without it collapsing under its own length?"++## FAQ++**What is a long-running AI agent?** One that works autonomously toward a goal for an extended stretch —+minutes to hours — across many steps and tool calls, rather than answering a single prompt and stopping.+The unit of delegation becomes an outcome (a whole feature, a migration) instead of a single edit.++**How fast is agent task length growing?** METR's "time horizon" metric — the task length an agent+completes at ~50% reliability — has doubled about every seven months since 2019, accelerating to roughly+every four months recently. Extrapolated, that points to agents handling work that takes humans hours,+then days, within a few years.++**Why is a longer agent harder, not just bigger?** The failure modes change: it must stay coherent over+hours, avoid drifting off-goal, manage a filling context window, and recover from the failures that+inevitably occur. Capability enables the long run; engineering keeps it from collapsing partway.++## The bottom line++The minutes-to-hours shift is real and measurable, and it rewrites the priority list. When agents+answered in seconds, you could get away with thin memory and no recovery story. When they run for hours,+durable memory, context discipline, reliability, and observability stop being optional. The teams that+will get the most out of long-running agents are the ones who [built for the long+run](https://munderdiffl.in/#how) before the runs got long.++Munder Difflin is designed for exactly that — persistent memory, reliable-by-design agents, and a+coordinated hive that splits long work across a team. [Download Munder+Difflin](https://munderdiffl.in/#install) to run agents built for the hours-long era; it's free and open+source.++Sources: [METR — Measuring AI Ability to Complete Long Tasks](https://metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasks/);+[Simon Willison — Scaling long-running autonomous coding](https://simonwillison.net/2026/jan/19/scaling-long-running-autonomous-coding/).diff --git a/blog/src/posts/recovering-from-agent-failures.md b/blog/src/posts/recovering-from-agent-failures.mdnew file mode 100644index 00000000..b7fddfe6--- /dev/null+++ b/blog/src/posts/recovering-from-agent-failures.md@@ -0,0 +1,152 @@+---+title: "Recovering From Agent Failures: Resilience Patterns for a Hive"+description: "How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling."+date: 2026-06-04+category: internals+categoryLabel: Internals+type: Technical+primaryKeyword: "recovering from agent failures"+secondaryKeywords: ["multi-agent resilience", "ai agent failure recovery", "idempotent agent messaging", "fault tolerance ai agents"]+tags: ["Internals", "Concurrency", "Multi-Agent", "Messaging"]+author:+ name: Chaitanya Giri+ initials: CG+faq:+ - q: "What happens when an AI agent in a multi-agent system fails?"+ a: "In a well-built hive, a single failure stays local. A crashed step doesn't take down the router; a malformed message is quarantined instead of retried forever; a runaway loop is dropped by a hop cap; and shared state is protected by retries so one stalled write doesn't block the rest. The system keeps running and the failure is recoverable, not fatal."+ - q: "How do you make agent message handling idempotent?"+ a: "Make 'already handled' a cheap, observable fact. In a file-based hive, an agent moves a message to inbox/.done/ once handled, and re-reading a done message is a no-op. Delivery is at-least-once; handling is idempotent — so a duplicate or replayed message does nothing the second time. The same idea drives an append-only event log: re-reading a line you've already processed changes nothing."+ - q: "How do you stop AI agents from looping forever?"+ a: "Put a circuit breaker on the message path. Every message carries a hop count; once it exceeds a cap, the router drops it and logs the drop rather than letting two agents ping-pong indefinitely. It's a blunt instrument on purpose — it guarantees termination, and the dropped, logged message tells you where to look."+---++<div class="callout tldr"><span class="ic">TL;DR</span><p>In a multi-agent system, <strong>partial+failure is the default</strong>, not the exception — a crashed committer, a contended lock, a malformed+message, a routing loop. Resilience isn't avoiding those; it's making each one <strong>local,+recoverable, and idempotent</strong>. A handful of small patterns do most of the work: <strong>retry with+backoff + stale-lock recovery</strong> for shared writes, <strong>quarantine</strong> for poison messages,+a <strong>hop-cap circuit breaker</strong> for runaway loops, <strong>idempotent handling</strong> so+replays are no-ops, and <strong>error isolation</strong> so one bad step never takes down the loop.</p></div>++Run one agent and failures are simple: it works or it doesn't. Run a *hive* of them sharing files and a+message bus, and you inherit the unglamorous reality of distributed systems — things fail halfway, two+writers collide, a message arrives twice or malformed, a conversation loops. The goal isn't a system that+never fails; it's one where any single failure is contained and the team keeps moving. Here are the+patterns that get you there, grounded in how a real [multi-agent harness](/#what) handles each.++## Partial failure is the default++The mental shift is to stop treating failure as exceptional. With many agents writing files concurrently+and a router draining their outboxes, on any given tick *something* can be mid-write, locked, or garbage.+A resilient design assumes that and answers four questions up front: when a shared write collides, then+what? When a message won't parse, then what? When a conversation loops, then what? When one step throws,+does the whole loop die? Good answers to those four are most of fault tolerance.++## Make shared writes survivable++The hive commits all coordination to one git repo with a [single committer](/blog/single-committer-git-pattern/).+That removes interleaved writes, but the committer can still race itself or inherit a lock from a crashed+run. So the commit isn't a single shot — it's a small retry loop with backoff and **stale-lock recovery**:++```ts+// src/main/hive.ts — commit under contention+for (let attempt = 0; attempt < 5; attempt++) {+ this.clearStaleLock(root); // a crashed run? clear a >10s-old index.lock+ const commit = this.git(['commit', '-q', '-m', message], root);+ if (commit.ok) return;+ if (/nothing to commit/i.test(out)) return; // benign — done+ if (/index\.lock/i.test(commit.err)) { // contended — back off and retry+ sleepSync(50 * (attempt + 1));+ continue;+ }+ return; // a non-lock failure: bail quietly; the next mutation retries+}+```++Three resilience ideas are packed into those lines. **Backoff:** each retry waits longer (`50 * (attempt+1)`+ms), so a transient collision clears instead of hammering. **Stale-lock recovery:** a `.git/index.lock`+older than ten seconds is from a committer that died, so it's safe to remove — otherwise one crash would+wedge the repo forever. And **graceful give-up:** a non-lock error doesn't throw or block; it returns,+because the *next* mutation will stage and commit the same pending changes anyway. Nothing is lost by+bailing early.++## Don't choke on a poison message++A file-based mailbox will eventually contain a half-written or malformed JSON file. The naive router+reads it, throws, and — if it retries the same file — spins on it forever. The fix is to **quarantine**:++```ts+try {+ const msg = this.normalize(JSON.parse(read(full)), id);+ this.routeMessage(msg);+ renameSync(full, join(outbox, '.sent', f)); // archive, don't reprocess+} catch {+ renameSync(full, join(outbox, '.sent', `bad-${f}`)); // quarantine so we don't spin on it+}+```++A message that won't parse is moved aside with a `bad-` prefix and the router moves on. One corrupt file+can't stall the bus, and the quarantined file is still on disk for you to inspect. (Successful messages+get archived too — moved out of the outbox so they're never routed twice.)++## Circuit-break the runaways++Two agents can get into a polite infinite loop — A asks B, B asks A, forever. Protocol etiquette helps+(only `request`/`query`/`propose` expect a reply; `inform`/`done` are terminal), but you still want a hard+backstop. Every message carries a **hop count**, and the router drops anything past the cap:++```ts+if (msg.hops > HOP_CAP) {+ this.appendLog({ kind: 'drop', reason: 'hop-cap', from: msg.from, to: msg.to, id: msg.id });+ return;+}+```++It's deliberately blunt: it guarantees the conversation terminates. And because the drop is *logged*, a+runaway leaves a breadcrumb instead of a silent hang — you can read the log and see exactly which thread+ran away.++## Idempotent by construction++The cheapest way to survive duplicates and replays is to make re-handling a no-op. In the hive, an agent+moves a message to `inbox/.done/` once it's handled, and the protocol is explicit: *re-reading a message+you already moved to `.done/` is a no-op — don't reprocess.* Delivery is **at-least-once**; handling is+**idempotent**. So a redelivered message, a crash-and-resume, or a curious re-read all do nothing the+second time. The same property underwrites the [append-only event log](/blog/append-only-event-log-agents/):+each consumer tracks how far it has read, and re-reading a line it already processed changes no state.+Idempotency turns "did this run twice?" from a bug into a shrug.++## Keep the loop alive, keep a record++The last pattern is error isolation: a failure in one step must not kill the whole system. The hive's+router wraps each pass so a single bad tick can't bring it down —++```ts+try { this.routeOnce(); } catch { /* keep the loop alive */ }+```++— and lifecycle handlers are written to "never crash" on a best-effort path. Pair that with two recovery+affordances and you can always get back to a known state: the **append-only `log.jsonl`** lets you replay+the system's history to find exactly where it diverged, and **agent archival** means closing an agent+keeps its memory and history intact rather than deleting them — a stopped agent is recoverable, not gone.+This is the same timeline you'd reach for when [debugging a multi-agent system](/blog/debugging-multi-agent-systems/);+resilience and debuggability come from the same record.++## A resilience checklist++For any multi-agent system you build:++1. **Retry shared writes** with backoff, and recover stale locks — never let one crash wedge shared state.+2. **Quarantine** unparseable messages instead of retrying them forever.+3. **Cap the hops** on your message path so conversations can't loop infinitely.+4. **Make handling idempotent** — "already done" should be a cheap, observable fact (a moved file, a cursor).+5. **Isolate failures** so one thrown step doesn't take down the loop.+6. **Keep an append-only record** so any state is reconstructable and any agent is recoverable.++None of these are exotic — they're the boring distributed-systems hygiene that turns a flaky pile of+agents into a system you can trust to run unattended. Build them in once, at the+[orchestration layer](/#how), and every agent inherits them for free.++Want to see these patterns in a hive you can actually watch recover? You can+[download Munder Difflin](/#install) free — it's open source, and the whole coordination layer is right+there to read.diff --git a/blog/src/posts/the-hook-shim-pattern.md b/blog/src/posts/the-hook-shim-pattern.mdnew file mode 100644index 00000000..ebcb01b8--- /dev/null+++ b/blog/src/posts/the-hook-shim-pattern.md@@ -0,0 +1,147 @@+---+title: "The Hook Shim Pattern: Wiring Agent Hooks to a Live Process"+description: "How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel."+date: 2026-06-04+category: internals+categoryLabel: Internals+type: Technical+primaryKeyword: "claude code hook shim"+secondaryKeywords: ["claude code hooks architecture", "agent lifecycle hooks", "unix socket ipc agents"]+tags: ["Internals", "Claude Code", "Hooks", "Multi-Agent"]+author:+ name: Chaitanya Giri+ initials: CG+faq:+ - q: "Why not put the logic directly in the hook command?"+ a: "Because a hook is a per-event shell command, and burying real logic there means editing the user's repo settings, re-installing on every code change, and duplicating state across short-lived processes. A shim forwards the event to one long-running process that holds all the logic — so you change behavior in one place, and the hook config never has to move."+ - q: "What does the shim actually do?"+ a: "Almost nothing, on purpose. It reads the hook payload from stdin, tags it with the agent's id, opens a Unix-domain socket to the main process, writes the payload, relays the response back to stdout, and exits. Every failure path exits 0 so it can never crash the agent's turn."+ - q: "Can a hook do more than observe — can it steer the agent?"+ a: "Yes. Claude Code reads the hook's JSON response, so the main process can reply with a decision — for example {\"decision\":\"block\",\"reason\":\"...\"} on a Stop event to keep the agent working. That's how an autonomous inbox-drain loop is built, guarded so it can never loop forever."+---++<div class="callout tldr"><span class="ic">TL;DR</span><p>Claude Code fires <strong>lifecycle hooks</strong>+(Stop, PreToolUse, Notification…) as shell commands. Putting real logic in those commands is a trap —+it's per-event, lives in the user's repo, and can't share state. The <strong>hook shim pattern</strong>+fixes it: each hook runs a tiny shim that forwards its payload over a <strong>Unix-domain socket</strong>+to one long-running process holding all the logic. The shim is a dumb pipe that never crashes a turn; the+main process gets a live telemetry feed <em>and</em> a control channel back.</p></div>++[Claude Code hooks](/blog/claude-code-hooks-explained/) are a great extension point: at defined moments —+a tool is about to run, the agent stopped, a notification fired — Claude Code runs a shell command you+configure, hands it a JSON payload on stdin, and reads a JSON response from stdout. Simple and powerful.++The trap is doing the work *in* that command. If you're building something live — a UI that shows what+each agent is doing, an autonomous loop that re-engages an idle agent — a per-event shell script is the+wrong home for that logic. Here's the pattern we use instead, and why it holds up.++## Why logic-in-the-hook doesn't scale++A hook command has three problems as a place for real behavior:++- **It's short-lived.** Each event spawns a fresh process that dies immediately. There's nowhere to keep+ state — avatar status, a per-agent cursor, an event log — without re-reading it from disk every time.+- **It lives in the user's settings.** Hook config is attached to a session via `--settings`. Bake logic+ in and every code change means rewriting that config; it also can't easily reach your app's in-memory+ state.+- **It's risky.** A hook that throws or hangs can stall the agent. Logic and the agent's turn shouldn't+ share a failure mode.++You want the *trigger* to stay at the edge and the *logic* to live in one place. That's exactly what a+shim buys you.++## The shim: a dumb pipe++The harness writes a tiny script — `cth-hook.cjs` — into the hive directory and points every hook at it.+Its entire job is to forward:++```javascript+// read the hook payload on stdin, tag it, forward to the socket, relay the reply+const net = require('net');+let data = '';+process.stdin.on('data', (d) => { data += d; });+process.stdin.on('end', () => {+ const payload = JSON.parse(data || '{}');+ payload.agent_id ||= process.env.AGENT_ID;+ const sock = process.env.HIVE_SOCK;+ if (!sock) process.exit(0);+ const c = net.createConnection(sock, () => c.write(JSON.stringify(payload) + '\n'));+ let resp = '';+ c.on('data', (d) => { resp += d; });+ c.on('end', () => { if (resp) process.stdout.write(resp); process.exit(0); });+ c.on('error', () => process.exit(0));+ setTimeout(() => process.exit(0), 5000).unref();+});+```++Notice what it does *not* do: no decisions, no disk, no state. It tags the payload with the agent's id+(from an env var the agent was spawned with), opens a Unix-domain socket to the main process, writes one+line of JSON, and relays whatever comes back. And notice the guards — missing socket, connection error,+and a 5-second timeout all `exit(0)`. **The shim can never crash the agent's turn.** That's the contract.++## All the logic lives in one process++On the other end, the app's main process listens on that socket and holds everything:++```javascript+const server = createServer((conn) => {+ let buf = '';+ conn.on('data', (d) => {+ buf += d.toString();+ const nl = buf.indexOf('\n');+ if (nl === -1) return; // wait for the full line+ const payload = JSON.parse(buf.slice(0, nl));+ conn.end(JSON.stringify(handle(payload)));+ });+});+server.listen(sockPath);+```++`handle()` is where the real work happens — and because it's one resident process, it can keep live state+the per-event hooks never could. PreToolUse / PostToolUse / Notification events drive each agent's avatar+on the [office floor](/blog/visualizing-ai-agents-pixijs/); the same feed can append to an+[event log](/blog/append-only-event-log-agents/). The hooks settings route all the relevant events+(`Stop`, `SubagentStop`, `PreToolUse`, `PostToolUse`, `UserPromptSubmit`, `Notification`, `SessionStart`)+through the one shim, so the main process sees the whole lifecycle of every agent in real time.++## The real payoff: a control channel, not just telemetry++Because Claude Code reads the hook's JSON *response*, the shim isn't a one-way feed — it's a round trip.+The main process can answer. That's what turns observation into control.++The clearest example is the autonomous loop. When an agent hits `Stop`, the main process checks that+agent's [inbox](/blog/atomic-file-mailboxes-for-agents/). If a message is waiting, it replies with+`{"decision":"block","reason":"<the message>"}` — and Claude Code keeps the agent working to handle it+instead of going idle. An agent that another agent (or the [orchestrator](/blog/how-the-god-orchestrator-works/))+just messaged picks the work up on its own.++The danger with any "keep going" mechanism is an infinite loop, so the payload carries a `stop_hook_active`+flag: if a previous Stop already blocked this turn, the process lets the agent stop. Re-engage once, never+forever. A genuine stop with an empty inbox falls through to a desktop "idle" notification.++## Why this pattern is worth copying++If you're wiring agent lifecycle hooks into anything stateful, the shim pattern gives you four things at+once: **decoupling** (refresh the shim from code on startup; the session's hook config never moves),+**a single source of truth** (one process, real in-memory state), **safety** (the edge can fail without+stalling the agent), and **a control channel** (reply with a decision, don't just log). The trigger stays+tiny and dumb; the brains stay in one testable place.++## FAQ++**Why a Unix socket and not HTTP?** It's local-only, fast, and needs no port or auth — the shim and the+app are on the same machine. The payload is one line of newline-delimited JSON, so framing is trivial.++**What happens if the main app isn't running?** The shim finds no socket (or fails to connect) and exits+0\. The agent's turn proceeds normally; you lose telemetry for that event, not the agent.++**Does this only work for Claude Code?** The pattern is general: any tool that runs a command per event+and reads a response can be bridged this way. Claude Code's hook payloads and decision response just make+it a clean fit.++---++Munder Difflin uses exactly this shim to drive a live office floor and an autonomous inbox-drain loop for a+whole [hive of Claude Code agents](https://munderdiffl.in/#how) — all local, with the agent's turn never+at the mercy of the bridge.+[Download Munder Difflin](https://munderdiffl.in/#install) to see it run; it's free and open source.diff --git a/docs/blog/append-only-event-log-agents/index.html b/docs/blog/append-only-event-log-agents/index.htmlindex 02c65f59..74d6f8c0 100644--- a/docs/blog/append-only-event-log-agents/index.html+++ b/docs/blog/append-only-event-log-agents/index.html@@ -304,38 +304,38 @@ it’s free and open source.</p></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>8 min</span>+ <span>6 min</span></div>- <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>- <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-an-ai-office-floor/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/building-an-ai-office-floor/">Building an AI "Office Floor": Avatars, Pathfinding, Envelopes</a></h3>- <p class="dek">The game-dev techniques behind a dev tool's office floor: Tiled maps, BFS pathfinding, sprite recoloring, and flying message envelopes in Pixi.js.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-an-ai-office-floor/" aria-label="Read: Building an AI "Office Floor": Avatars, Pathfinding, Envelopes">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article>diff --git a/docs/blog/architecture-two-planes-one-renderer/index.html b/docs/blog/architecture-two-planes-one-renderer/index.htmlindex bba10a2e..504de6c1 100644--- a/docs/blog/architecture-two-planes-one-renderer/index.html+++ b/docs/blog/architecture-two-planes-one-renderer/index.html@@ -289,56 +289,56 @@ free and open source.</p><h2>Related in Internals</h2><div class="post-grid"><article class="card">- <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>8 min</span>+ <span>6 min</span></div>- <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>- <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-an-ai-office-floor/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/building-an-ai-office-floor/">Building an AI "Office Floor": Avatars, Pathfinding, Envelopes</a></h3>- <p class="dek">The game-dev techniques behind a dev tool's office floor: Tiled maps, BFS pathfinding, sprite recoloring, and flying message envelopes in Pixi.js.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-an-ai-office-floor/" aria-label="Read: Building an AI "Office Floor": Avatars, Pathfinding, Envelopes">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/claude-code-hooks-explained/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta"><time datetime="2026-06-03">Jun 3, 2026</time><span class="dot" aria-hidden="true"></span>- <span>6 min</span>+ <span>8 min</span></div>- <h3><a href="/blog/claude-code-hooks-explained/">Claude Code Hooks, Explained (PreToolUse, PostToolUse, Stop)</a></h3>- <p class="dek">A practical tour of Claude Code hooks — the PreToolUse, PostToolUse, and Stop lifecycle — and how a Unix-socket hook shim drives a live office floor.</p>+ <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>+ <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/claude-code-hooks-explained/" aria-label="Read: Claude Code Hooks, Explained (PreToolUse, PostToolUse, Stop)">Read →</a>+ <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a></div></div></article>diff --git a/docs/blog/atomic-file-mailboxes-for-agents/index.html b/docs/blog/atomic-file-mailboxes-for-agents/index.htmlindex d16f80f8..2406bed6 100644--- a/docs/blog/atomic-file-mailboxes-for-agents/index.html+++ b/docs/blog/atomic-file-mailboxes-for-agents/index.html@@ -319,38 +319,38 @@ the office floor; it’s free and open source.</p></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>8 min</span>+ <span>6 min</span></div>- <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>- <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-an-ai-office-floor/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/building-an-ai-office-floor/">Building an AI "Office Floor": Avatars, Pathfinding, Envelopes</a></h3>- <p class="dek">The game-dev techniques behind a dev tool's office floor: Tiled maps, BFS pathfinding, sprite recoloring, and flying message envelopes in Pixi.js.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-an-ai-office-floor/" aria-label="Read: Building an AI "Office Floor": Avatars, Pathfinding, Envelopes">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article>diff --git a/docs/blog/best-claude-code-multi-agent-tools/index.html b/docs/blog/best-claude-code-multi-agent-tools/index.htmlindex 185cbea4..ad389d13 100644--- a/docs/blog/best-claude-code-multi-agent-tools/index.html+++ b/docs/blog/best-claude-code-multi-agent-tools/index.html@@ -391,20 +391,20 @@ real team of agents.</p></div></article><article class="card">- <a class="thumb t-comparisons" href="/blog/claude-squad-alternative/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-comparisons" href="/blog/local-first-vs-cloud-agent-sdks/" aria-hidden="true" tabindex="-1"><span>COMPARISONS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>3 min</span>+ <span>5 min</span></div>- <h3><a href="/blog/claude-squad-alternative/">Looking for a Claude Squad Alternative?</a></h3>- <p class="dek">What Claude Squad does well, where it stops, and why a memory-backed, orchestrated hive may be the Claude Squad alternative you're after.</p>+ <h3><a href="/blog/local-first-vs-cloud-agent-sdks/">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</a></h3>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</p><div class="foot"><span class="tag kind">Comparisons</span>- <a class="more" href="/blog/claude-squad-alternative/" aria-label="Read: Looking for a Claude Squad Alternative?">Read →</a>+ <a class="more" href="/blog/local-first-vs-cloud-agent-sdks/" aria-label="Read: Local-First vs Cloud Agent SDKs: Which Wins in 2026?">Read →</a></div></div></article>diff --git a/docs/blog/building-a-terminal-ui-xterm-node-pty/index.html b/docs/blog/building-a-terminal-ui-xterm-node-pty/index.htmlindex 536c73f7..b43cd08e 100644--- a/docs/blog/building-a-terminal-ui-xterm-node-pty/index.html+++ b/docs/blog/building-a-terminal-ui-xterm-node-pty/index.html@@ -362,38 +362,38 @@ to watch many real terminals at once; it’s free and open source.</p></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-an-ai-office-floor/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/building-an-ai-office-floor/">Building an AI "Office Floor": Avatars, Pathfinding, Envelopes</a></h3>- <p class="dek">The game-dev techniques behind a dev tool's office floor: Tiled maps, BFS pathfinding, sprite recoloring, and flying message envelopes in Pixi.js.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-an-ai-office-floor/" aria-label="Read: Building an AI "Office Floor": Avatars, Pathfinding, Envelopes">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/claude-code-hooks-explained/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/claude-code-hooks-explained/">Claude Code Hooks, Explained (PreToolUse, PostToolUse, Stop)</a></h3>- <p class="dek">A practical tour of Claude Code hooks — the PreToolUse, PostToolUse, and Stop lifecycle — and how a Unix-socket hook shim drives a live office floor.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/claude-code-hooks-explained/" aria-label="Read: Claude Code Hooks, Explained (PreToolUse, PostToolUse, Stop)">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article>diff --git a/docs/blog/building-an-ai-office-floor/index.html b/docs/blog/building-an-ai-office-floor/index.htmlindex c9621dc6..2446296b 100644--- a/docs/blog/building-an-ai-office-floor/index.html+++ b/docs/blog/building-an-ai-office-floor/index.html@@ -307,38 +307,38 @@ techniques — the hard part is wiring them to <em>real</em> agent events, not t</div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>8 min</span>+ <span>6 min</span></div>- <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>- <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/claude-code-hooks-explained/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/claude-code-hooks-explained/">Claude Code Hooks, Explained (PreToolUse, PostToolUse, Stop)</a></h3>- <p class="dek">A practical tour of Claude Code hooks — the PreToolUse, PostToolUse, and Stop lifecycle — and how a Unix-socket hook shim drives a live office floor.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/claude-code-hooks-explained/" aria-label="Read: Claude Code Hooks, Explained (PreToolUse, PostToolUse, Stop)">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article>diff --git a/docs/blog/can-claude-code-agents-talk-to-each-other/index.html b/docs/blog/can-claude-code-agents-talk-to-each-other/index.htmlindex 0b6fbbe2..f34b36c3 100644--- a/docs/blog/can-claude-code-agents-talk-to-each-other/index.html+++ b/docs/blog/can-claude-code-agents-talk-to-each-other/index.html@@ -322,20 +322,20 @@ other; it’s free and open source.</p></div></article><article class="card">- <a class="thumb t-concepts" href="/blog/open-source-ai-tools-on-purpose/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-concepts" href="/blog/long-running-agents-the-2026-shift/" aria-hidden="true" tabindex="-1"><span>CONCEPTS</span></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>+ <span>6 min</span></div>- <h3><a href="/blog/open-source-ai-tools-on-purpose/">Building AI Dev Tools in the Open, On Purpose</a></h3>- <p class="dek">Agents touch your code, keys, and memory. That's why agent tooling should be open source and local-first — so you can verify it, not just trust it.</p>+ <h3><a href="/blog/long-running-agents-the-2026-shift/">Long-Running Agents: The 2026 Shift from Minutes to Hours</a></h3>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</p><div class="foot"><span class="tag kind">Concepts</span>- <a class="more" href="/blog/open-source-ai-tools-on-purpose/" aria-label="Read: Building AI Dev Tools in the Open, On Purpose">Read →</a>+ <a class="more" href="/blog/long-running-agents-the-2026-shift/" aria-label="Read: Long-Running Agents: The 2026 Shift from Minutes to Hours">Read →</a></div></div></article>diff --git a/docs/blog/claude-code-hooks-explained/index.html b/docs/blog/claude-code-hooks-explained/index.htmlindex 71cad87e..c2161e64 100644--- a/docs/blog/claude-code-hooks-explained/index.html+++ b/docs/blog/claude-code-hooks-explained/index.html@@ -321,38 +321,38 @@ free and open source.</p></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>8 min</span>+ <span>6 min</span></div>- <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>- <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-an-ai-office-floor/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/building-an-ai-office-floor/">Building an AI "Office Floor": Avatars, Pathfinding, Envelopes</a></h3>- <p class="dek">The game-dev techniques behind a dev tool's office floor: Tiled maps, BFS pathfinding, sprite recoloring, and flying message envelopes in Pixi.js.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-an-ai-office-floor/" aria-label="Read: Building an AI "Office Floor": Avatars, Pathfinding, Envelopes">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article>diff --git a/docs/blog/claude-code-orchestration-tools-compared/index.html b/docs/blog/claude-code-orchestration-tools-compared/index.htmlindex fec70a75..dc7118a2 100644--- a/docs/blog/claude-code-orchestration-tools-compared/index.html+++ b/docs/blog/claude-code-orchestration-tools-compared/index.html@@ -313,20 +313,20 @@ Linux.</p></div></article><article class="card">- <a class="thumb t-comparisons" href="/blog/claude-squad-alternative/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-comparisons" href="/blog/local-first-vs-cloud-agent-sdks/" aria-hidden="true" tabindex="-1"><span>COMPARISONS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>3 min</span>+ <span>5 min</span></div>- <h3><a href="/blog/claude-squad-alternative/">Looking for a Claude Squad Alternative?</a></h3>- <p class="dek">What Claude Squad does well, where it stops, and why a memory-backed, orchestrated hive may be the Claude Squad alternative you're after.</p>+ <h3><a href="/blog/local-first-vs-cloud-agent-sdks/">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</a></h3>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</p><div class="foot"><span class="tag kind">Comparisons</span>- <a class="more" href="/blog/claude-squad-alternative/" aria-label="Read: Looking for a Claude Squad Alternative?">Read →</a>+ <a class="more" href="/blog/local-first-vs-cloud-agent-sdks/" aria-label="Read: Local-First vs Cloud Agent SDKs: Which Wins in 2026?">Read →</a></div></div></article>diff --git a/docs/blog/claude-squad-vs-munder-difflin/index.html b/docs/blog/claude-squad-vs-munder-difflin/index.htmlindex bcdfbd6c..16a2571a 100644--- a/docs/blog/claude-squad-vs-munder-difflin/index.html+++ b/docs/blog/claude-squad-vs-munder-difflin/index.html@@ -338,20 +338,20 @@ local-first.</p></div></article><article class="card">- <a class="thumb t-comparisons" href="/blog/claude-squad-alternative/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-comparisons" href="/blog/local-first-vs-cloud-agent-sdks/" aria-hidden="true" tabindex="-1"><span>COMPARISONS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>3 min</span>+ <span>5 min</span></div>- <h3><a href="/blog/claude-squad-alternative/">Looking for a Claude Squad Alternative?</a></h3>- <p class="dek">What Claude Squad does well, where it stops, and why a memory-backed, orchestrated hive may be the Claude Squad alternative you're after.</p>+ <h3><a href="/blog/local-first-vs-cloud-agent-sdks/">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</a></h3>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</p><div class="foot"><span class="tag kind">Comparisons</span>- <a class="more" href="/blog/claude-squad-alternative/" aria-label="Read: Looking for a Claude Squad Alternative?">Read →</a>+ <a class="more" href="/blog/local-first-vs-cloud-agent-sdks/" aria-label="Read: Local-First vs Cloud Agent SDKs: Which Wins in 2026?">Read →</a></div></div></article>diff --git a/docs/blog/do-more-with-less-model-routing/index.html b/docs/blog/do-more-with-less-model-routing/index.htmlindex 03ad945e..303eb43f 100644--- a/docs/blog/do-more-with-less-model-routing/index.html+++ b/docs/blog/do-more-with-less-model-routing/index.html@@ -311,20 +311,20 @@ agent team that does more with less — it’s free and open source.</p></div></article><article class="card">- <a class="thumb t-concepts" href="/blog/open-source-ai-tools-on-purpose/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-concepts" href="/blog/long-running-agents-the-2026-shift/" aria-hidden="true" tabindex="-1"><span>CONCEPTS</span></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>+ <span>6 min</span></div>- <h3><a href="/blog/open-source-ai-tools-on-purpose/">Building AI Dev Tools in the Open, On Purpose</a></h3>- <p class="dek">Agents touch your code, keys, and memory. That's why agent tooling should be open source and local-first — so you can verify it, not just trust it.</p>+ <h3><a href="/blog/long-running-agents-the-2026-shift/">Long-Running Agents: The 2026 Shift from Minutes to Hours</a></h3>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</p><div class="foot"><span class="tag kind">Concepts</span>- <a class="more" href="/blog/open-source-ai-tools-on-purpose/" aria-label="Read: Building AI Dev Tools in the Open, On Purpose">Read →</a>+ <a class="more" href="/blog/long-running-agents-the-2026-shift/" aria-label="Read: Long-Running Agents: The 2026 Shift from Minutes to Hours">Read →</a></div></div></article>diff --git a/docs/blog/feed.xml b/docs/blog/feed.xmlindex 0fc67c59..47d2d0c8 100644--- a/docs/blog/feed.xml+++ b/docs/blog/feed.xml@@ -151,6 +151,22 @@<updated>2026-06-04T00:00:00.000Z</updated><category term="Orchestration" /><summary>How local-first AI agent orchestration works under the hood — the loop, mailboxes, scheduler, and audit log that coordinate a hive on one machine.</summary></entry>+ <entry>+ <title>Local-First vs Cloud Agent SDKs: Which Wins in 2026?</title>+ <link href="https://munderdiffl.in/blog/local-first-vs-cloud-agent-sdks/" />+ <id>https://munderdiffl.in/blog/local-first-vs-cloud-agent-sdks/</id>+ <published>2026-06-04T00:00:00.000Z</published>+ <updated>2026-06-04T00:00:00.000Z</updated><category term="Comparisons" />+ <summary>Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</summary>+ </entry>+ <entry>+ <title>Long-Running Agents: The 2026 Shift from Minutes to Hours</title>+ <link href="https://munderdiffl.in/blog/long-running-agents-the-2026-shift/" />+ <id>https://munderdiffl.in/blog/long-running-agents-the-2026-shift/</id>+ <published>2026-06-04T00:00:00.000Z</published>+ <updated>2026-06-04T00:00:00.000Z</updated><category term="Concepts" />+ <summary>Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</summary>+ </entry><entry><title>Building AI Dev Tools in the Open, On Purpose</title><link href="https://munderdiffl.in/blog/open-source-ai-tools-on-purpose/" />@@ -175,6 +191,14 @@<updated>2026-06-04T00:00:00.000Z</updated><category term="Guides" /><summary>An agent re-sends the same prompt, tools, and context every turn. Prompt caching makes you pay for that prefix once — here's how to design for it.</summary></entry>+ <entry>+ <title>Recovering From Agent Failures: Resilience Patterns for a Hive</title>+ <link href="https://munderdiffl.in/blog/recovering-from-agent-failures/" />+ <id>https://munderdiffl.in/blog/recovering-from-agent-failures/</id>+ <published>2026-06-04T00:00:00.000Z</published>+ <updated>2026-06-04T00:00:00.000Z</updated><category term="Internals" />+ <summary>How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</summary>+ </entry><entry><title>Make a Hive Work While You Sleep: Scheduling Autonomous Agent Missions</title><link href="https://munderdiffl.in/blog/scheduling-autonomous-agent-missions/" />@@ -199,6 +223,14 @@<updated>2026-06-04T00:00:00.000Z</updated><category term="Guides" /><summary>How a small team adopts a hive of AI coding agents without chaos — the roles to assign, the cadence to run, and the guardrails that keep it safe.</summary></entry>+ <entry>+ <title>The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</title>+ <link href="https://munderdiffl.in/blog/the-hook-shim-pattern/" />+ <id>https://munderdiffl.in/blog/the-hook-shim-pattern/</id>+ <published>2026-06-04T00:00:00.000Z</published>+ <updated>2026-06-04T00:00:00.000Z</updated><category term="Internals" />+ <summary>How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</summary>+ </entry><entry><title>The Office Parody Behind Munder Difflin (and Why It Helps)</title><link href="https://munderdiffl.in/blog/the-office-parody-behind-munder-difflin/" />@@ -455,36 +487,4 @@<updated>2026-05-27T00:00:00.000Z</updated><category term="Memory" /><summary>Claude Code forgets between sessions. Here's how a markdown-first memory layer with semantic recall lets your agents remember across runs.</summary></entry>- <entry>- <title>Why We Built Agent Memory Markdown-First</title>- <link href="https://munderdiffl.in/blog/markdown-first-agent-memory/" />- <id>https://munderdiffl.in/blog/markdown-first-agent-memory/</id>- <published>2026-05-27T00:00:00.000Z</published>- <updated>2026-05-27T00:00:00.000Z</updated><category term="Memory" />- <summary>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.</summary>- </entry>- <entry>- <title>Semantic Memory for AI Agents: Recall in Milliseconds</title>- <link href="https://munderdiffl.in/blog/semantic-memory-for-ai-agents/" />- <id>https://munderdiffl.in/blog/semantic-memory-for-ai-agents/</id>- <published>2026-05-26T00:00:00.000Z</published>- <updated>2026-05-26T00:00:00.000Z</updated><category term="Memory" />- <summary>What semantic memory for AI agents is, why a markdown-first store beats a heavy DB, and how a shared palace lets a hive recall a note by meaning, fast.</summary>- </entry>- <entry>- <title>How to Manage Multiple Claude Code Sessions Like a Pro</title>- <link href="https://munderdiffl.in/blog/manage-multiple-claude-code-sessions/" />- <id>https://munderdiffl.in/blog/manage-multiple-claude-code-sessions/</id>- <published>2026-05-25T00:00:00.000Z</published>- <updated>2026-05-25T00:00:00.000Z</updated><category term="Guides" />- <summary>Tactics to manage multiple Claude Code sessions without losing track: naming, roles, context isolation, and when a harness beats juggling terminal tabs.</summary>- </entry>- <entry>- <title>Set Up a Claude Code Multi-Agent Workflow in 10 Minutes</title>- <link href="https://munderdiffl.in/blog/claude-code-multi-agent-setup-tutorial/" />- <id>https://munderdiffl.in/blog/claude-code-multi-agent-setup-tutorial/</id>- <published>2026-05-24T00:00:00.000Z</published>- <updated>2026-05-24T00:00:00.000Z</updated><category term="Guides" />- <summary>A from-zero Claude Code multi-agent setup: install Munder Difflin, onboard, spawn a few agents, and watch the GOD orchestrator route your first task.</summary>- </entry></feed>diff --git a/docs/blog/how-ai-agents-verify-their-own-work/index.html b/docs/blog/how-ai-agents-verify-their-own-work/index.htmlindex 9eb7cdea..a13c57cc 100644--- a/docs/blog/how-ai-agents-verify-their-own-work/index.html+++ b/docs/blog/how-ai-agents-verify-their-own-work/index.html@@ -310,20 +310,20 @@ and open source.</p></div></article><article class="card">- <a class="thumb t-concepts" href="/blog/open-source-ai-tools-on-purpose/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-concepts" href="/blog/long-running-agents-the-2026-shift/" aria-hidden="true" tabindex="-1"><span>CONCEPTS</span></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>+ <span>6 min</span></div>- <h3><a href="/blog/open-source-ai-tools-on-purpose/">Building AI Dev Tools in the Open, On Purpose</a></h3>- <p class="dek">Agents touch your code, keys, and memory. That's why agent tooling should be open source and local-first — so you can verify it, not just trust it.</p>+ <h3><a href="/blog/long-running-agents-the-2026-shift/">Long-Running Agents: The 2026 Shift from Minutes to Hours</a></h3>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</p><div class="foot"><span class="tag kind">Concepts</span>- <a class="more" href="/blog/open-source-ai-tools-on-purpose/" aria-label="Read: Building AI Dev Tools in the Open, On Purpose">Read →</a>+ <a class="more" href="/blog/long-running-agents-the-2026-shift/" aria-label="Read: Long-Running Agents: The 2026 Shift from Minutes to Hours">Read →</a></div></div></article>diff --git a/docs/blog/index.html b/docs/blog/index.htmlindex 4f3e59c3..ce91d617 100644--- a/docs/blog/index.html+++ b/docs/blog/index.html@@ -85,15 +85,15 @@building a self-coordinating hive of agents with a GOD orchestrator you talk to.</p><div class="filters" role="navigation" aria-label="Topics">- <a class="chip" aria-current="page">All<span class="ct">62</span></a>+ <a class="chip" aria-current="page">All<span class="ct">66</span></a><a class="chip" href="/blog/topics/guides/">guides<span class="ct">17</span></a>- <a class="chip" href="/blog/topics/internals/">internals<span class="ct">10</span></a>+ <a class="chip" href="/blog/topics/internals/">internals<span class="ct">12</span></a>- <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">9</span></a>+ <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">10</span></a>- <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">9</span></a><a class="chip" href="/blog/topics/orchestration/">orchestration<span class="ct">7</span></a>@@ -437,6 +437,42 @@</div></div></article>+<article class="card">+ <a class="thumb t-comparisons" href="/blog/local-first-vs-cloud-agent-sdks/" aria-hidden="true" tabindex="-1">+ <span>COMPARISONS</span>+ </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/local-first-vs-cloud-agent-sdks/">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</a></h3>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</p>+ <div class="foot">+ <span class="tag kind">Comparisons</span>+ <a class="more" href="/blog/local-first-vs-cloud-agent-sdks/" aria-label="Read: Local-First vs Cloud Agent SDKs: Which Wins in 2026?">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-concepts" href="/blog/long-running-agents-the-2026-shift/" aria-hidden="true" tabindex="-1">+ <span>CONCEPTS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/long-running-agents-the-2026-shift/">Long-Running Agents: The 2026 Shift from Minutes to Hours</a></h3>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</p>+ <div class="foot">+ <span class="tag kind">Concepts</span>+ <a class="more" href="/blog/long-running-agents-the-2026-shift/" aria-label="Read: Long-Running Agents: The 2026 Shift from Minutes to Hours">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-concepts" href="/blog/open-source-ai-tools-on-purpose/" aria-hidden="true" tabindex="-1"><span>CONCEPTS</span>@@ -491,6 +527,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-orchestration" href="/blog/scheduling-autonomous-agent-missions/" aria-hidden="true" tabindex="-1"><span>ORCHESTRATION</span>@@ -545,6 +599,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-story" href="/blog/the-office-parody-behind-munder-difflin/" aria-hidden="true" tabindex="-1"><span>STORY</span>diff --git a/docs/blog/local-first-ai-agent-orchestration/index.html b/docs/blog/local-first-ai-agent-orchestration/index.htmlindex 2db24bab..adb65007 100644--- a/docs/blog/local-first-ai-agent-orchestration/index.html+++ b/docs/blog/local-first-ai-agent-orchestration/index.html@@ -279,7 +279,7 @@ loop; it’s free and open source.</p></div><footer class="post-foot wrap"><div class="prevnext">- <a class="pn prev" href="/blog/open-source-ai-tools-on-purpose/"><span class="k">← Older</span><span class="t">Building AI Dev Tools in the Open, On Purpose</span></a>+ <a class="pn prev" href="/blog/local-first-vs-cloud-agent-sdks/"><span class="k">← Older</span><span class="t">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</span></a><a class="pn next" href="/blog/keep-agent-semantic-memory-clean/"><span class="k">Newer →</span><span class="t">Keep Your Agent's Semantic Memory Clean: Don't Index the Config</span></a></div><section class="related">diff --git a/docs/blog/local-first-vs-cloud-agent-sdks/index.html b/docs/blog/local-first-vs-cloud-agent-sdks/index.htmlnew file mode 100644index 00000000..4241d27e--- /dev/null+++ b/docs/blog/local-first-vs-cloud-agent-sdks/index.html@@ -0,0 +1,410 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1.0" />+<title>Local-First vs Cloud Agent SDKs: Which Wins in 2026? — Munder Difflin Blog</title>+<meta name="description" content="Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which." />+<link rel="canonical" href="https://munderdiffl.in/blog/local-first-vs-cloud-agent-sdks/" />++<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="Local-First vs Cloud Agent SDKs: Which Wins in 2026? — Munder Difflin Blog" />+<meta property="og:description" content="Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which." />+<meta property="og:url" content="https://munderdiffl.in/blog/local-first-vs-cloud-agent-sdks/" />+<meta property="og:image" content="https://munderdiffl.in/media/og.png" />+<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="Comparisons" />+<meta property="article:tag" content="Local-First" />+<meta property="article:tag" content="Cloud Agents" />+<meta property="article:tag" content="MCP" />+++<!-- Twitter -->+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:title" content="Local-First vs Cloud Agent SDKs: Which Wins in 2026? — Munder Difflin Blog" />+<meta name="twitter:description" content="Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which." />+<meta name="twitter:image" content="https://munderdiffl.in/media/og.png" />++<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=Geist:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet" />+<link rel="stylesheet" href="/blog/assets/blog.css" />++<script type="application/ld+json">+{+ "@context": "https://schema.org",+ "@type": "BlogPosting",+ "headline": "Local-First vs Cloud Agent SDKs: Which Wins in 2026?",+ "description": "Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.",+ "image": ["https://munderdiffl.in/media/og.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/local-first-vs-cloud-agent-sdks/" },+ "keywords": "local-first vs cloud agent sdks, cloud agent sdk, mcp a2a interop, local ai agents vs cloud",+ "articleSection": "Comparisons",+ "inLanguage": "en-US",+ "url": "https://munderdiffl.in/blog/local-first-vs-cloud-agent-sdks/"+}+</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": "Local-First vs Cloud Agent SDKs: Which Wins in 2026?", "item": "https://munderdiffl.in/blog/local-first-vs-cloud-agent-sdks/" }+ ]+}+</script>++<script type="application/ld+json">+{+ "@context": "https://schema.org",+ "@type": "FAQPage",+ "mainEntity": [+ { "@type": "Question", "name": "What's the difference between a local-first agent hive and a cloud agent SDK?", "acceptedAnswer": { "@type": "Answer", "text": "A local-first hive runs the orchestration, files, and memory on your own machine; a cloud agent SDK runs the control plane as a managed service. Both call the same models — they differ in where coordination, data, and cost live." } },+ { "@type": "Question", "name": "Do MCP and A2A only work in the cloud?", "acceptedAnswer": { "@type": "Answer", "text": "No. MCP (tool integration) and A2A (agent-to-agent) are open interop standards, not cloud features — a local-first hive can speak MCP to your tools too. The standards are about interoperability, not where agents run." } },+ { "@type": "Question", "name": "When should I choose a cloud agent SDK over a local hive?", "acceptedAnswer": { "@type": "Answer", "text": "Choose cloud SDKs for distributed teams, enterprise governance, cross-vendor agent meshes, and elastic managed scale; choose a local-first hive for solo/small-team work on your own code, privacy, predictable cost, and no platform lock-in." } },+ { "@type": "Question", "name": "Is local-first cheaper than cloud agents?", "acceptedAnswer": { "@type": "Answer", "text": "Often, and more predictably. With platforms moving to usage-based billing — GitHub Copilot switched all plans to metered AI Credits in June 2026 — you pay a platform meter on top of model usage; a local hive adds no platform tax beyond the model calls you'd make anyway." } }++ ]+}+</script>+++</head>+<body>+<a class="skip-link" href="#main">Skip to content</a>+<nav id="nav">+ <a class="brand" href="/blog/" aria-label="Munder Difflin Blog home">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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>+ <header class="post-head wrap">+ <nav class="crumbs" aria-label="Breadcrumb">+ <a href="/blog/">Blog</a>+ <span>/</span>+ <a href="/blog/topics/comparisons/">Comparisons</a>+ </nav>+ <h1>Local-First vs Cloud Agent SDKs: Which Wins in 2026?</h1>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</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>5 min read</span>+ <span class="tag kind">Comparisons</span>+ </div>+ </header>++ <div class="post-wrap wrap">+ <div class="prose">+ <div class="callout tldr"><span class="ic">TL;DR</span><p>2026 is the year the big labs shipped+<strong>cloud agent SDKs</strong> — OpenAI's Agents SDK, Google's ADK, Microsoft's Agent Framework —+and the interop standards <strong>MCP</strong> and <strong>A2A</strong> consolidated underneath them.+Meanwhile, <strong>local-first hives</strong> run the whole control plane on your own machine. They're+not really enemies: both call the same models and can speak the same standards. The real question is+<em>where the control plane, your data, and your cost live</em>. This is the honest decision guide for+which to pick.</p></div>+<p>If you’ve been picking an approach for running AI agents in 2026, you’ve felt the whiplash: every major+lab now ships an agent SDK, two interop protocols are consolidating fast, and billing is going metered —+while a quieter movement says “just run the whole thing on your own machine.” Both camps are right about+different things. Here’s what each actually optimizes for, grounded in what shipped this year.</p>+<h2 id="the-2026-cloud-agent-sdk-wave" tabindex="-1">The 2026 cloud agent SDK wave <a class="anchor" href="#the-2026-cloud-agent-sdk-wave" aria-hidden="true">#</a></h2>+<p>The platform story moved quickly. OpenAI replaced its experimental Swarm with a production-grade+<strong>Agents SDK</strong>; Google shipped <strong>ADK</strong> across multiple languages; Anthropic renamed its SDK to the+<strong>Claude Agent SDK</strong> to signal broader ambitions; and Microsoft merged Semantic Kernel and AutoGen into+a unified <strong>Agent Framework</strong>, which <a href="https://visualstudiomagazine.com/articles/2026/04/06/microsoft-ships-production-ready-agent-framework-1-0-for-net-and-python.aspx">shipped 1.0 GA on April 3, 2026</a>+with graph workflows, checkpointing, streaming, and human-in-the-loop built in.</p>+<p>Underneath the SDKs, the protocol layer is converging on a two-layer stack: <strong>MCP</strong> (Model Context+Protocol) for vertical <em>tool</em> integration and <strong>A2A</strong> (Agent-to-Agent) for horizontal <em>agent</em>+coordination. Per a <a href="https://zylos.ai/research/2026-03-26-agent-interoperability-protocols-mcp-a2a-acp-convergence">2026 survey of interop protocols</a>,+ACP folded into A2A under the Linux Foundation and MCP crossed 200 server implementations — the combo is+<a href="https://www.morphllm.com/ai-agent-framework">becoming the enterprise default</a>. The pitch is coherent:+managed scale, cross-vendor agent meshes, and governance you can hand to a platform team.</p>+<h2 id="the-local-first-hive" tabindex="-1">The local-first hive <a class="anchor" href="#the-local-first-hive" aria-hidden="true">#</a></h2>+<p>The other model keeps the coordination on your machine. A <strong>local-first hive</strong> runs the orchestrator,+the agents, their files, and their memory as local processes — only the model inference call leaves the+box. There’s no control-plane server: agents coordinate through files, and the+<a href="/blog/local-first-ai-agent-orchestration/">architecture is mechanically simple</a> precisely because it+isn’t distributed across a vendor’s infrastructure. The case for it — control, privacy, predictable+cost — is <a href="/blog/why-local-first-matters-for-ai-agents/">made in full here</a>.</p>+<p>The crucial nuance people miss: <strong>local-first doesn’t mean cut off from the standards.</strong> A local hive+can speak MCP to your tools just like a cloud SDK does — <a href="/blog/mcp-and-skills-in-a-hive/">bringing your MCP servers and skills into the+hive</a> is a feature, not a contradiction. Interop is about protocols,+not about where the agents run.</p>+<h2 id="theyre-not-opposites-pick-the-axis-that-matters" tabindex="-1">They’re not opposites — pick the axis that matters <a class="anchor" href="#theyre-not-opposites-pick-the-axis-that-matters" aria-hidden="true">#</a></h2>+<p>It’s tempting to frame this as local <em>versus</em> cloud, but most of the headline features (MCP, A2A,+HITL, streaming) are available to both. The decisions that actually differ come down to three axes:</p>+<ul>+<li><strong>Where the control plane runs</strong> — a vendor’s service, or a process on your laptop.</li>+<li><strong>Where your data lives</strong> — your code, memory, and message history on someone’s servers, or on your+disk.</li>+<li><strong>How you pay</strong> — a platform meter on top of model usage, or just the model usage.</li>+</ul>+<p>Frame your choice around those, not around a local-vs-cloud team jersey.</p>+<h2 id="when-cloud-agent-sdks-win" tabindex="-1">When cloud agent SDKs win <a class="anchor" href="#when-cloud-agent-sdks-win" aria-hidden="true">#</a></h2>+<p>Be honest about where the managed approach is the right call:</p>+<ul>+<li><strong>Distributed teams</strong> that need always-on, shared agent state across many people and locations.</li>+<li><strong>Cross-vendor agent meshes</strong> — if you’re wiring agents from several frameworks together, native A2A+(strongest today in Google ADK and CrewAI) earns its keep.</li>+<li><strong>Enterprise governance</strong> — centralized policy, audit, and identity that a security org can own.</li>+<li><strong>Elastic scale</strong> — bursty, large fan-out workloads where you’d rather rent compute than provision it.</li>+</ul>+<p>If that’s your situation, the cloud SDK wave is genuinely built for you.</p>+<h2 id="when-a-local-first-hive-wins" tabindex="-1">When a local-first hive wins <a class="anchor" href="#when-a-local-first-hive-wins" aria-hidden="true">#</a></h2>+<p>And where the local model is the better fit:</p>+<ul>+<li><strong>Solo developers and small teams</strong> working against their own repositories, where the agents should+edit your real working tree, not a synced sandbox.</li>+<li><strong>Privacy-sensitive work</strong> — client code, regulated environments, or anything where your codebase and+its accumulated <a href="/blog/semantic-memory-for-ai-agents/">memory</a> shouldn’t sit on a third party’s+servers.</li>+<li><strong>Predictable cost</strong> — no per-seat or per-run platform tax layered on top of model spend.</li>+<li><strong>No lock-in</strong> — files and markdown you own, on standards you can take elsewhere.</li>+</ul>+<p>For one person or a handful of developers shipping against their own code, the control and cost story+usually outweighs managed convenience.</p>+<h2 id="the-cost-axis-is-shifting-in-local-firsts-favor" tabindex="-1">The cost axis is shifting — in local-first’s favor <a class="anchor" href="#the-cost-axis-is-shifting-in-local-firsts-favor" aria-hidden="true">#</a></h2>+<p>Cost deserves its own note, because 2026 changed the math. GitHub Copilot+<a href="https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/">moved all plans to usage-based billing on June 1, 2026</a>,+replacing flat premium-request units with metered <strong>AI Credits</strong> consumed by token usage. That’s the+broader direction of travel for cloud agent platforms: a meter on top of the model calls. A local-first+hive adds <strong>no platform tax</strong> — you pay for the inference you’d pay for anyway, and the orchestration is+free because it’s just code running on your machine. As you scale from two agents to a dozen, that gap+compounds. (Related: <a href="/blog/do-more-with-less-model-routing/">doing more with less via model routing</a>.)</p>+<h2 id="the-decision-table" tabindex="-1">The decision table <a class="anchor" href="#the-decision-table" aria-hidden="true">#</a></h2>+<table>+<thead>+<tr>+<th>If you need…</th>+<th>Lean toward</th>+</tr>+</thead>+<tbody>+<tr>+<td>Always-on shared state for a distributed team</td>+<td>Cloud agent SDK</td>+</tr>+<tr>+<td>Cross-vendor agent mesh (multiple frameworks)</td>+<td>Cloud SDK with native A2A</td>+</tr>+<tr>+<td>Centralized enterprise governance / audit</td>+<td>Cloud agent SDK</td>+</tr>+<tr>+<td>Editing your own real codebase, privately</td>+<td>Local-first hive</td>+</tr>+<tr>+<td>Predictable cost with no platform meter</td>+<td>Local-first hive</td>+</tr>+<tr>+<td>Standards (MCP) without lock-in</td>+<td>Either — both can speak MCP</td>+</tr>+</tbody>+</table>+<h2 id="the-bottom-line" tabindex="-1">The bottom line <a class="anchor" href="#the-bottom-line" aria-hidden="true">#</a></h2>+<p>The 2026 cloud agent SDKs are a real, well-built answer to <em>distributed, governed, elastic</em> agent work.+A local-first hive is the right answer to <em>private, predictable, own-your-code</em> agent work. The+standards — MCP and A2A — belong to neither camp, which is the most useful thing to internalize: you can+adopt the interoperability without surrendering the control plane. Pick based on where your data and+cost should live, not on the hype cycle. If you’re still weighing options,+<a href="/blog/how-to-choose-a-multi-agent-tool/">how to choose a multi-agent tool</a> is the buyer’s checklist.</p>+<hr>+<p>Munder Difflin is the <a href="/#why">local-first</a> end of this spectrum — a hive where the orchestrator, agents,+and memory run on your machine and still speak MCP to your tools. <a href="/#install">Download Munder Difflin</a>+to run agents on your own terms — free and open source.</p>+<p style="font-size:0.85em;opacity:0.7;margin-top:2rem">Sources: <a href="https://visualstudiomagazine.com/articles/2026/04/06/microsoft-ships-production-ready-agent-framework-1-0-for-net-and-python.aspx">Visual Studio Magazine — Microsoft Agent Framework 1.0 GA</a>; <a href="https://zylos.ai/research/2026-03-26-agent-interoperability-protocols-mcp-a2a-acp-convergence">Zylos — Agent Interoperability Protocols 2026 (MCP/A2A/ACP)</a>; <a href="https://www.morphllm.com/ai-agent-framework">Morph — AI Agent Frameworks in 2026</a>; <a href="https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/">GitHub Blog — Copilot usage-based billing</a>.</p>++++ <section class="faq" aria-label="Frequently asked questions">+ <h2 id="faq">FAQ</h2>++ <div class="qa">+ <p class="q">What's the difference between a local-first agent hive and a cloud agent SDK?</p>+ <p class="a">A local-first hive runs the orchestration, files, and memory on your own machine; a cloud agent SDK runs the control plane as a managed service. Both call the same models — they differ in where coordination, data, and cost live.</p>+ </div>++ <div class="qa">+ <p class="q">Do MCP and A2A only work in the cloud?</p>+ <p class="a">No. MCP (tool integration) and A2A (agent-to-agent) are open interop standards, not cloud features — a local-first hive can speak MCP to your tools too. The standards are about interoperability, not where agents run.</p>+ </div>++ <div class="qa">+ <p class="q">When should I choose a cloud agent SDK over a local hive?</p>+ <p class="a">Choose cloud SDKs for distributed teams, enterprise governance, cross-vendor agent meshes, and elastic managed scale; choose a local-first hive for solo/small-team work on your own code, privacy, predictable cost, and no platform lock-in.</p>+ </div>++ <div class="qa">+ <p class="q">Is local-first cheaper than cloud agents?</p>+ <p class="a">Often, and more predictably. With platforms moving to usage-based billing — GitHub Copilot switched all plans to metered AI Credits in June 2026 — you pay a platform meter on top of model usage; a local hive adds no platform tax beyond the model calls you'd make anyway.</p>+ </div>++ </section>++++ <hr />+ <div class="share">+ <span class="lbl">Tags</span>+ <a class="tag" href="/blog/tags/comparisons/">Comparisons</a><a class="tag" href="/blog/tags/local-first/">Local-First</a><a class="tag" href="/blog/tags/cloud-agents/">Cloud Agents</a><a class="tag" href="/blog/tags/mcp/">MCP</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-2026-cloud-agent-sdk-wave">The 2026 cloud agent SDK wave</a></li><li class="lvl-2"><a href="#the-local-first-hive">The local-first hive</a></li><li class="lvl-2"><a href="#theyre-not-opposites-pick-the-axis-that-matters">They’re not opposites — pick the axis that matters</a></li><li class="lvl-2"><a href="#when-cloud-agent-sdks-win">When cloud agent SDKs win</a></li><li class="lvl-2"><a href="#when-a-local-first-hive-wins">When a local-first hive wins</a></li><li class="lvl-2"><a href="#the-cost-axis-is-shifting-in-local-firsts-favor">The cost axis is shifting — in local-first’s favor</a></li><li class="lvl-2"><a href="#the-decision-table">The decision table</a></li><li class="lvl-2"><a href="#the-bottom-line">The bottom line</a></li>+ </ol>+ </aside>++ </div>++ <footer class="post-foot wrap"><div class="prevnext">+ <a class="pn prev" href="/blog/long-running-agents-the-2026-shift/"><span class="k">← Older</span><span class="t">Long-Running Agents: The 2026 Shift from Minutes to Hours</span></a>+ <a class="pn next" href="/blog/local-first-ai-agent-orchestration/"><span class="k">Newer →</span><span class="t">Local-First AI Agent Orchestration: How a Hive Runs Without a Cloud</span></a>+ </div>+ <section class="related">+ <h2>Related in Comparisons</h2>+ <div class="post-grid">+ <article class="card">+ <a class="thumb t-comparisons" href="/blog/best-claude-code-multi-agent-tools/" aria-hidden="true" tabindex="-1">+ <span>COMPARISONS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/best-claude-code-multi-agent-tools/">The Best Tools to Run Multiple Claude Code Agents (2026)</a></h3>+ <p class="dek">An honest 2026 roundup of tools to run multiple Claude Code agents — Claude Squad, Conductor, Crystal, vibe-kanban, and Munder Difflin — compared.</p>+ <div class="foot">+ <span class="tag kind">Comparisons</span>+ <a class="more" href="/blog/best-claude-code-multi-agent-tools/" aria-label="Read: The Best Tools to Run Multiple Claude Code Agents (2026)">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-comparisons" href="/blog/claude-code-orchestration-tools-compared/" aria-hidden="true" tabindex="-1">+ <span>COMPARISONS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>3 min</span>+ </div>+ <h3><a href="/blog/claude-code-orchestration-tools-compared/">Claude Code Orchestration Tools, Compared</a></h3>+ <p class="dek">Claude Code orchestration tools compared on memory, messaging, visibility, control, and local-first — across Claude Squad, Conductor, Crystal, and more.</p>+ <div class="foot">+ <span class="tag kind">Comparisons</span>+ <a class="more" href="/blog/claude-code-orchestration-tools-compared/" aria-label="Read: Claude Code Orchestration Tools, Compared">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-comparisons" href="/blog/claude-squad-vs-munder-difflin/" aria-hidden="true" tabindex="-1">+ <span>COMPARISONS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>3 min</span>+ </div>+ <h3><a href="/blog/claude-squad-vs-munder-difflin/">Claude Squad vs Munder Difflin: Which Should You Use?</a></h3>+ <p class="dek">Claude Squad vs Munder Difflin: a lean terminal session manager against a memory-backed, orchestrated, visual hive. Feature table and an honest verdict.</p>+ <div class="foot">+ <span class="tag kind">Comparisons</span>+ <a class="more" href="/blog/claude-squad-vs-munder-difflin/" aria-label="Read: Claude Squad vs Munder Difflin: Which Should You Use?">Read →</a>+ </div>+ </div>+</article>++ </div>+ </section>++ </footer>+</article>++</main>+<footer>+ <div class="wrap">+ <div class="foot-top">+ <a class="foot-brand brand" href="/blog/">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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 & 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 });+ })();+</script>++</body>+</html>diff --git a/docs/blog/long-running-agents-the-2026-shift/index.html b/docs/blog/long-running-agents-the-2026-shift/index.htmlnew file mode 100644index 00000000..ebda2c3f--- /dev/null+++ b/docs/blog/long-running-agents-the-2026-shift/index.html@@ -0,0 +1,393 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1.0" />+<title>Long-Running Agents: The 2026 Shift from Minutes to Hours — Munder Difflin Blog</title>+<meta name="description" content="Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one." />+<link rel="canonical" href="https://munderdiffl.in/blog/long-running-agents-the-2026-shift/" />++<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="Long-Running Agents: The 2026 Shift from Minutes to Hours — Munder Difflin Blog" />+<meta property="og:description" content="Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one." />+<meta property="og:url" content="https://munderdiffl.in/blog/long-running-agents-the-2026-shift/" />+<meta property="og:image" content="https://munderdiffl.in/media/og.png" />+<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="Long-Running Agents" />+<meta property="article:tag" content="Agentic AI" />+<meta property="article:tag" content="Trends" />+<meta property="article:tag" content="Multi-Agent" />+++<!-- Twitter -->+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:title" content="Long-Running Agents: The 2026 Shift from Minutes to Hours — Munder Difflin Blog" />+<meta name="twitter:description" content="Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one." />+<meta name="twitter:image" content="https://munderdiffl.in/media/og.png" />++<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=Geist:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet" />+<link rel="stylesheet" href="/blog/assets/blog.css" />++<script type="application/ld+json">+{+ "@context": "https://schema.org",+ "@type": "BlogPosting",+ "headline": "Long-Running Agents: The 2026 Shift from Minutes to Hours",+ "description": "Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.",+ "image": ["https://munderdiffl.in/media/og.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/long-running-agents-the-2026-shift/" },+ "keywords": "long-running ai agents, autonomous coding agents, ai agent time horizon, long-horizon agents, agentic ai 2026",+ "articleSection": "Concepts",+ "inLanguage": "en-US",+ "url": "https://munderdiffl.in/blog/long-running-agents-the-2026-shift/"+}+</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": "Long-Running Agents: The 2026 Shift from Minutes to Hours", "item": "https://munderdiffl.in/blog/long-running-agents-the-2026-shift/" }+ ]+}+</script>++<script type="application/ld+json">+{+ "@context": "https://schema.org",+ "@type": "FAQPage",+ "mainEntity": [+ { "@type": "Question", "name": "What is a long-running AI agent?", "acceptedAnswer": { "@type": "Answer", "text": "It's an agent that works autonomously on a task for an extended stretch — minutes to hours — rather than answering a single prompt and stopping. Instead of a turn-by-turn assistant you steer constantly, a long-running agent takes a goal and pursues it across many steps, tool calls, and decisions before coming back to you. Owning a whole feature or a migration end-to-end, rather than one edit at a time, is the difference." } },+ { "@type": "Question", "name": "How fast is agent task length actually growing?", "acceptedAnswer": { "@type": "Answer", "text": "METR, which measures the length of tasks AI can complete autonomously at roughly 50% reliability, found this 'time horizon' has doubled about every seven months since 2019 — and accelerated to roughly every four months in the 2024–2025 window. Extrapolated, that points toward agents handling tasks that take humans many hours, then days, within a few years." } },+ { "@type": "Question", "name": "Why is a longer agent harder, not just bigger?", "acceptedAnswer": { "@type": "Answer", "text": "Because the failure modes change. A short agent mostly needs the right answer. A long-running one also has to stay coherent over hours, avoid drifting off the goal, manage a context window that keeps filling, and recover from the failures that inevitably happen along the way. Capability gets you the long run; engineering keeps it from falling apart partway through." } },+ { "@type": "Question", "name": "Do I need one giant agent or several coordinated ones?", "acceptedAnswer": { "@type": "Answer", "text": "Often several. A long-horizon goal can be split across a coordinated team of agents working in parallel — each on a scoped piece, sharing durable state — instead of one agent grinding linearly for ten hours. That keeps each agent's context small and contains the blast radius if one stumbles." } }++ ]+}+</script>+++</head>+<body>+<a class="skip-link" href="#main">Skip to content</a>+<nav id="nav">+ <a class="brand" href="/blog/" aria-label="Munder Difflin Blog home">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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>+ <header class="post-head wrap">+ <nav class="crumbs" aria-label="Breadcrumb">+ <a href="/blog/">Blog</a>+ <span>/</span>+ <a href="/blog/topics/concepts/">Concepts</a>+ </nav>+ <h1>Long-Running Agents: The 2026 Shift from Minutes to Hours</h1>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</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">Concepts</span>+ </div>+ </header>++ <div class="post-wrap wrap">+ <div class="prose">+ <div class="callout tldr"><span class="ic">TL;DR</span><p>The defining change in agentic AI this year:+agents stopped being <strong>seconds-long assistants</strong> and became <strong>hours-long+workers</strong>. METR's data shows the length of task an agent can complete autonomously has been+<strong>doubling roughly every seven months</strong> — lately faster — and model makers now report+single autonomous runs lasting <em>tens of hours</em>. But a longer agent is a <strong>different+engineering problem, not just a bigger one</strong>: it has to stay coherent, not drift, manage a+filling context window, and recover from failure — over hours. The teams ready for it are the ones who+already treat memory, reliability, and context as first-class.</p></div>+<p>For most of the short history of AI coding tools, the interaction was a conversation: you asked, the+model answered in seconds, you asked again. The agent was a fast assistant you steered turn by turn. The+biggest shift of 2026 is that this is no longer the ceiling. Agents now <strong>run for hours</strong> — taking a+goal and working toward it across hundreds of steps before they need you again. That changes what an+agent can <em>do</em>, and it changes what you have to <em>build</em> to make it work.</p>+<h2 id="the-trend-in-numbers" tabindex="-1">The trend, in numbers <a class="anchor" href="#the-trend-in-numbers" aria-hidden="true">#</a></h2>+<p>This isn’t a vibe; it’s measurable. <a href="https://metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasks/">METR</a>+tracks AI capability by a clever metric: the <strong>length of task</strong> an agent can complete autonomously at+about 50% reliability — its “time horizon.” Their headline finding is that this time horizon has been+<strong>doubling roughly every seven months since 2019</strong>, and the pace has <em>accelerated</em> to around every four+months in the most recent stretch. A capability that doubles on that cadence doesn’t creep; it+compounds. Tasks that were out of reach a year ago — multi-hour, multi-file, multi-decision work — land+inside the frontier fast.</p>+<p>The model makers’ own reports track the same curve from the other side. Anthropic has described Claude+models sustaining focus on a single multi-step task for <strong>tens of hours</strong> of continuous autonomous+coding — the kind of run that can produce a working application end-to-end, not just a snippet. (Simon+Willison’s <a href="https://simonwillison.net/2026/jan/19/scaling-long-running-autonomous-coding/">field notes on scaling long-running autonomous+coding</a> are a good+practitioner’s-eye view of what that actually looks like in practice.) Whichever number you watch, the+direction is the same: <strong>minutes became hours.</strong></p>+<h2 id="what-hours-unlock" tabindex="-1">What hours unlock <a class="anchor" href="#what-hours-unlock" aria-hidden="true">#</a></h2>+<p>The jump from minutes to hours isn’t quantitative, it’s qualitative. A ten-minute agent fixes a bug. A+ten-<em>hour</em> agent can own a whole feature, work through a migration that sat on the backlog for a year, or+grind out the unglamorous refactor nobody scheduled. The unit of delegation changes from “this edit” to+“this outcome” — you hand over a goal and get back a result, not a turn in a conversation. That’s the+promise people mean when they say agents are starting to feel less like autocomplete and more like+teammates.</p>+<h2 id="why-longer-is-a-different-problem" tabindex="-1">Why “longer” is a different problem <a class="anchor" href="#why-longer-is-a-different-problem" aria-hidden="true">#</a></h2>+<p>Here’s the catch, and it’s the part the headline numbers skip: <strong>a longer agent fails in new ways.</strong></p>+<p>A short agent mostly has one job — get this answer right. A long-running agent has that job <em>plus</em>+several it never had to worry about before:</p>+<ul>+<li><strong>Coherence over time.</strong> It has to remember what it decided an hour ago and not contradict itself on+step 300.</li>+<li><strong>Not drifting.</strong> Over a long run it can slowly wander off the original goal, optimizing something+adjacent to what you asked for.</li>+<li><strong>A filling context window.</strong> Hours of tool output and history pile up; without management, the window+bloats and quality degrades — the thing we’ve called <a href="/blog/prompt-caching-for-ai-agents/">context+rot</a> elsewhere.</li>+<li><strong>Failure along the way.</strong> Across hundreds of steps, <em>something</em> will error, time out, or come back+wrong. A short agent that fails just gets re-run. A long one that fails at hour nine can’t afford to+throw away nine hours.</li>+</ul>+<p>In other words, capability gets the agent <em>into</em> a ten-hour run; <strong>engineering</strong> is what keeps it from+falling apart in the middle of one. That’s why the boring infrastructure suddenly matters more than the+demo.</p>+<h2 id="what-long-running-agents-actually-need" tabindex="-1">What long-running agents actually need <a class="anchor" href="#what-long-running-agents-actually-need" aria-hidden="true">#</a></h2>+<p>The capabilities that were “nice to have” for a quick assistant become <strong>load-bearing</strong> the moment an+agent runs for hours:</p>+<ul>+<li><strong>Durable memory and state.</strong> Progress has to live somewhere it survives a crash, so hour nine doesn’t+reset to zero. Persistent, <a href="/blog/markdown-first-agent-memory/">markdown-first memory</a> and+<a href="/blog/semantic-memory-for-ai-agents/">semantic recall</a> are how an agent carries what it learned across+a long run without dragging it all through the window.</li>+<li><strong>Context engineering.</strong> With hours of history, <em>what stays in the window</em> is a constant decision —+curate the relevant, shed the stale, and keep the stable prefix <a href="/blog/prompt-caching-for-ai-agents/">cacheable so you’re not re-paying for+it every turn</a>.</li>+<li><strong>Reliability by design.</strong> Bounded retries, validation at the boundary, and recovery from a known-good+state are what let a long run survive its inevitable failures instead of dying on them — the whole case+for <a href="/blog/building-reliable-ai-agents/">building reliable agents</a>.</li>+<li><strong>Observability.</strong> When an agent works for hours unattended, you need to be able to see what it did and+<a href="/blog/debugging-multi-agent-systems/">debug it after the fact</a> — a long silent run you can’t inspect+is a liability, not a feature.</li>+</ul>+<p>None of these are new ideas. What’s new is that the shift to long-running agents turned them from+optional polish into the price of admission.</p>+<h2 id="one-long-agent-or-a-coordinated-team" tabindex="-1">One long agent, or a coordinated team? <a class="anchor" href="#one-long-agent-or-a-coordinated-team" aria-hidden="true">#</a></h2>+<p>There’s a tempting picture of a single heroic agent grinding autonomously for ten hours. Often the better+answer is a <strong>team</strong>. A long-horizon goal can be decomposed across coordinated agents working in+parallel — each on a scoped slice, each with a small context, sharing durable state through files — so+the work fans out instead of stretching into one fragile linear marathon. It keeps every agent’s window+lean, contains the blast radius when one stumbles, and finishes wall-clock faster. The shift to+long-running work and the move to multi-agent hives are, in that sense, two sides of the same coin: both+are answers to “how do we get more done autonomously without it collapsing under its own length?”</p>+<h2 id="faq" tabindex="-1">FAQ <a class="anchor" href="#faq" aria-hidden="true">#</a></h2>+<p><strong>What is a long-running AI agent?</strong> One that works autonomously toward a goal for an extended stretch —+minutes to hours — across many steps and tool calls, rather than answering a single prompt and stopping.+The unit of delegation becomes an outcome (a whole feature, a migration) instead of a single edit.</p>+<p><strong>How fast is agent task length growing?</strong> METR’s “time horizon” metric — the task length an agent+completes at ~50% reliability — has doubled about every seven months since 2019, accelerating to roughly+every four months recently. Extrapolated, that points to agents handling work that takes humans hours,+then days, within a few years.</p>+<p><strong>Why is a longer agent harder, not just bigger?</strong> The failure modes change: it must stay coherent over+hours, avoid drifting off-goal, manage a filling context window, and recover from the failures that+inevitably occur. Capability enables the long run; engineering keeps it from collapsing partway.</p>+<h2 id="the-bottom-line" tabindex="-1">The bottom line <a class="anchor" href="#the-bottom-line" aria-hidden="true">#</a></h2>+<p>The minutes-to-hours shift is real and measurable, and it rewrites the priority list. When agents+answered in seconds, you could get away with thin memory and no recovery story. When they run for hours,+durable memory, context discipline, reliability, and observability stop being optional. The teams that+will get the most out of long-running agents are the ones who <a href="https://munderdiffl.in/#how">built for the long+run</a> before the runs got long.</p>+<p>Munder Difflin is designed for exactly that — persistent memory, reliable-by-design agents, and a+coordinated hive that splits long work across a team. <a href="https://munderdiffl.in/#install">Download Munder+Difflin</a> to run agents built for the hours-long era; it’s free and open+source.</p>+<p>Sources: <a href="https://metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasks/">METR — Measuring AI Ability to Complete Long Tasks</a>;+<a href="https://simonwillison.net/2026/jan/19/scaling-long-running-autonomous-coding/">Simon Willison — Scaling long-running autonomous coding</a>.</p>++++ <section class="faq" aria-label="Frequently asked questions">+ <h2 id="faq">FAQ</h2>++ <div class="qa">+ <p class="q">What is a long-running AI agent?</p>+ <p class="a">It's an agent that works autonomously on a task for an extended stretch — minutes to hours — rather than answering a single prompt and stopping. Instead of a turn-by-turn assistant you steer constantly, a long-running agent takes a goal and pursues it across many steps, tool calls, and decisions before coming back to you. Owning a whole feature or a migration end-to-end, rather than one edit at a time, is the difference.</p>+ </div>++ <div class="qa">+ <p class="q">How fast is agent task length actually growing?</p>+ <p class="a">METR, which measures the length of tasks AI can complete autonomously at roughly 50% reliability, found this 'time horizon' has doubled about every seven months since 2019 — and accelerated to roughly every four months in the 2024–2025 window. Extrapolated, that points toward agents handling tasks that take humans many hours, then days, within a few years.</p>+ </div>++ <div class="qa">+ <p class="q">Why is a longer agent harder, not just bigger?</p>+ <p class="a">Because the failure modes change. A short agent mostly needs the right answer. A long-running one also has to stay coherent over hours, avoid drifting off the goal, manage a context window that keeps filling, and recover from the failures that inevitably happen along the way. Capability gets you the long run; engineering keeps it from falling apart partway through.</p>+ </div>++ <div class="qa">+ <p class="q">Do I need one giant agent or several coordinated ones?</p>+ <p class="a">Often several. A long-horizon goal can be split across a coordinated team of agents working in parallel — each on a scoped piece, sharing durable state — instead of one agent grinding linearly for ten hours. That keeps each agent's context small and contains the blast radius if one stumbles.</p>+ </div>++ </section>++++ <hr />+ <div class="share">+ <span class="lbl">Tags</span>+ <a class="tag" href="/blog/tags/long-running-agents/">Long-Running Agents</a><a class="tag" href="/blog/tags/agentic-ai/">Agentic AI</a><a class="tag" href="/blog/tags/trends/">Trends</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-trend-in-numbers">The trend, in numbers</a></li><li class="lvl-2"><a href="#what-hours-unlock">What hours unlock</a></li><li class="lvl-2"><a href="#why-longer-is-a-different-problem">Why “longer” is a different problem</a></li><li class="lvl-2"><a href="#what-long-running-agents-actually-need">What long-running agents actually need</a></li><li class="lvl-2"><a href="#one-long-agent-or-a-coordinated-team">One long agent, or a coordinated team?</a></li><li class="lvl-2"><a href="#faq">FAQ</a></li><li class="lvl-2"><a href="#the-bottom-line">The bottom line</a></li>+ </ol>+ </aside>++ </div>++ <footer class="post-foot wrap"><div class="prevnext">+ <a class="pn prev" href="/blog/open-source-ai-tools-on-purpose/"><span class="k">← Older</span><span class="t">Building AI Dev Tools in the Open, On Purpose</span></a>+ <a class="pn next" href="/blog/local-first-vs-cloud-agent-sdks/"><span class="k">Newer →</span><span class="t">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</span></a>+ </div>+ <section class="related">+ <h2>Related in Concepts</h2>+ <div class="post-grid">+ <article class="card">+ <a class="thumb t-concepts" href="/blog/can-claude-code-agents-talk-to-each-other/" aria-hidden="true" tabindex="-1">+ <span>CONCEPTS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/can-claude-code-agents-talk-to-each-other/">Can Claude Code Agents Talk to Each Other?</a></h3>+ <p class="dek">Can Claude Code agents talk to each other? By default they report to their launcher — but a small coordination layer lets them message peer-to-peer.</p>+ <div class="foot">+ <span class="tag kind">Concepts</span>+ <a class="more" href="/blog/can-claude-code-agents-talk-to-each-other/" aria-label="Read: Can Claude Code Agents Talk to Each Other?">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-concepts" href="/blog/do-more-with-less-model-routing/" aria-hidden="true" tabindex="-1">+ <span>CONCEPTS</span>+ </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/do-more-with-less-model-routing/">Do More With Less: Smart Model Routing Across Agents</a></h3>+ <p class="dek">Why a hive of agents shouldn't all run the biggest model — and how routing the right task to the right model cuts cost and latency without losing quality.</p>+ <div class="foot">+ <span class="tag kind">Concepts</span>+ <a class="more" href="/blog/do-more-with-less-model-routing/" aria-label="Read: Do More With Less: Smart Model Routing Across Agents">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-concepts" href="/blog/how-ai-agents-verify-their-own-work/" aria-hidden="true" tabindex="-1">+ <span>CONCEPTS</span>+ </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-ai-agents-verify-their-own-work/">How AI Agents Verify Their Own Work (Before Saying 'Done')</a></h3>+ <p class="dek">The discipline that makes an autonomous coding agent trustworthy: prove every claim, reproduce the green, and check the fix — not just the intent.</p>+ <div class="foot">+ <span class="tag kind">Concepts</span>+ <a class="more" href="/blog/how-ai-agents-verify-their-own-work/" aria-label="Read: How AI Agents Verify Their Own Work (Before Saying 'Done')">Read →</a>+ </div>+ </div>+</article>++ </div>+ </section>++ </footer>+</article>++</main>+<footer>+ <div class="wrap">+ <div class="foot-top">+ <a class="foot-brand brand" href="/blog/">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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 & 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 });+ })();+</script>++</body>+</html>diff --git a/docs/blog/node-pty-electron-real-terminals/index.html b/docs/blog/node-pty-electron-real-terminals/index.htmlindex d9b7652f..944551c2 100644--- a/docs/blog/node-pty-electron-real-terminals/index.html+++ b/docs/blog/node-pty-electron-real-terminals/index.html@@ -342,38 +342,38 @@ real terminals driving real agents; it’s free and open source.</p></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>8 min</span>+ <span>6 min</span></div>- <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>- <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-an-ai-office-floor/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/building-an-ai-office-floor/">Building an AI "Office Floor": Avatars, Pathfinding, Envelopes</a></h3>- <p class="dek">The game-dev techniques behind a dev tool's office floor: Tiled maps, BFS pathfinding, sprite recoloring, and flying message envelopes in Pixi.js.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-an-ai-office-floor/" aria-label="Read: Building an AI "Office Floor": Avatars, Pathfinding, Envelopes">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article>diff --git a/docs/blog/open-source-ai-tools-on-purpose/index.html b/docs/blog/open-source-ai-tools-on-purpose/index.htmlindex 6084fafc..a27d784e 100644--- a/docs/blog/open-source-ai-tools-on-purpose/index.html+++ b/docs/blog/open-source-ai-tools-on-purpose/index.html@@ -261,7 +261,7 @@ autonomous. <a href="https://munderdiffl.in/#install">Download Munder Difflin</a<footer class="post-foot wrap"><div class="prevnext"><a class="pn prev" href="/blog/overnight-ai-coding-realistic-expectations/"><span class="k">← Older</span><span class="t">Overnight AI Coding: What's Realistic (and What's Not)</span></a>- <a class="pn next" href="/blog/local-first-ai-agent-orchestration/"><span class="k">Newer →</span><span class="t">Local-First AI Agent Orchestration: How a Hive Runs Without a Cloud</span></a>+ <a class="pn next" href="/blog/long-running-agents-the-2026-shift/"><span class="k">Newer →</span><span class="t">Long-Running Agents: The 2026 Shift from Minutes to Hours</span></a></div><section class="related"><h2>Related in Concepts</h2>diff --git a/docs/blog/prompt-caching-for-ai-agents/index.html b/docs/blog/prompt-caching-for-ai-agents/index.htmlindex 8f8c05af..b05d2732 100644--- a/docs/blog/prompt-caching-for-ai-agents/index.html+++ b/docs/blog/prompt-caching-for-ai-agents/index.html@@ -296,7 +296,7 @@ that doesn’t waste your tokens; it’s free and open source.</p></div><footer class="post-foot wrap"><div class="prevnext">- <a class="pn prev" href="/blog/scheduling-autonomous-agent-missions/"><span class="k">← Older</span><span class="t">Make a Hive Work While You Sleep: Scheduling Autonomous Agent Missions</span></a>+ <a class="pn prev" href="/blog/recovering-from-agent-failures/"><span class="k">← Older</span><span class="t">Recovering From Agent Failures: Resilience Patterns for a Hive</span></a><a class="pn next" href="/blog/overnight-ai-coding-realistic-expectations/"><span class="k">Newer →</span><span class="t">Overnight AI Coding: What's Realistic (and What's Not)</span></a></div><section class="related">diff --git a/docs/blog/recovering-from-agent-failures/index.html b/docs/blog/recovering-from-agent-failures/index.htmlnew file mode 100644index 00000000..6821fe11--- /dev/null+++ b/docs/blog/recovering-from-agent-failures/index.html@@ -0,0 +1,380 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1.0" />+<title>Recovering From Agent Failures: Resilience Patterns for a Hive — Munder Difflin Blog</title>+<meta name="description" content="How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling." />+<link rel="canonical" href="https://munderdiffl.in/blog/recovering-from-agent-failures/" />++<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="Recovering From Agent Failures: Resilience Patterns for a Hive — Munder Difflin Blog" />+<meta property="og:description" content="How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling." />+<meta property="og:url" content="https://munderdiffl.in/blog/recovering-from-agent-failures/" />+<meta property="og:image" content="https://munderdiffl.in/media/og.png" />+<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="Internals" />+<meta property="article:tag" content="Concurrency" />+<meta property="article:tag" content="Multi-Agent" />+<meta property="article:tag" content="Messaging" />+++<!-- Twitter -->+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:title" content="Recovering From Agent Failures: Resilience Patterns for a Hive — Munder Difflin Blog" />+<meta name="twitter:description" content="How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling." />+<meta name="twitter:image" content="https://munderdiffl.in/media/og.png" />++<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=Geist:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet" />+<link rel="stylesheet" href="/blog/assets/blog.css" />++<script type="application/ld+json">+{+ "@context": "https://schema.org",+ "@type": "BlogPosting",+ "headline": "Recovering From Agent Failures: Resilience Patterns for a Hive",+ "description": "How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.",+ "image": ["https://munderdiffl.in/media/og.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/recovering-from-agent-failures/" },+ "keywords": "recovering from agent failures, multi-agent resilience, ai agent failure recovery, idempotent agent messaging, fault tolerance ai agents",+ "articleSection": "Internals",+ "inLanguage": "en-US",+ "url": "https://munderdiffl.in/blog/recovering-from-agent-failures/"+}+</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": "Recovering From Agent Failures: Resilience Patterns for a Hive", "item": "https://munderdiffl.in/blog/recovering-from-agent-failures/" }+ ]+}+</script>++<script type="application/ld+json">+{+ "@context": "https://schema.org",+ "@type": "FAQPage",+ "mainEntity": [+ { "@type": "Question", "name": "What happens when an AI agent in a multi-agent system fails?", "acceptedAnswer": { "@type": "Answer", "text": "In a well-built hive, a single failure stays local. A crashed step doesn't take down the router; a malformed message is quarantined instead of retried forever; a runaway loop is dropped by a hop cap; and shared state is protected by retries so one stalled write doesn't block the rest. The system keeps running and the failure is recoverable, not fatal." } },+ { "@type": "Question", "name": "How do you make agent message handling idempotent?", "acceptedAnswer": { "@type": "Answer", "text": "Make 'already handled' a cheap, observable fact. In a file-based hive, an agent moves a message to inbox/.done/ once handled, and re-reading a done message is a no-op. Delivery is at-least-once; handling is idempotent — so a duplicate or replayed message does nothing the second time. The same idea drives an append-only event log: re-reading a line you've already processed changes nothing." } },+ { "@type": "Question", "name": "How do you stop AI agents from looping forever?", "acceptedAnswer": { "@type": "Answer", "text": "Put a circuit breaker on the message path. Every message carries a hop count; once it exceeds a cap, the router drops it and logs the drop rather than letting two agents ping-pong indefinitely. It's a blunt instrument on purpose — it guarantees termination, and the dropped, logged message tells you where to look." } }++ ]+}+</script>+++</head>+<body>+<a class="skip-link" href="#main">Skip to content</a>+<nav id="nav">+ <a class="brand" href="/blog/" aria-label="Munder Difflin Blog home">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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>+ <header class="post-head wrap">+ <nav class="crumbs" aria-label="Breadcrumb">+ <a href="/blog/">Blog</a>+ <span>/</span>+ <a href="/blog/topics/internals/">Internals</a>+ </nav>+ <h1>Recovering From Agent Failures: Resilience Patterns for a Hive</h1>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</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">Internals</span>+ </div>+ </header>++ <div class="post-wrap wrap">+ <div class="prose">+ <div class="callout tldr"><span class="ic">TL;DR</span><p>In a multi-agent system, <strong>partial+failure is the default</strong>, not the exception — a crashed committer, a contended lock, a malformed+message, a routing loop. Resilience isn't avoiding those; it's making each one <strong>local,+recoverable, and idempotent</strong>. A handful of small patterns do most of the work: <strong>retry with+backoff + stale-lock recovery</strong> for shared writes, <strong>quarantine</strong> for poison messages,+a <strong>hop-cap circuit breaker</strong> for runaway loops, <strong>idempotent handling</strong> so+replays are no-ops, and <strong>error isolation</strong> so one bad step never takes down the loop.</p></div>+<p>Run one agent and failures are simple: it works or it doesn’t. Run a <em>hive</em> of them sharing files and a+message bus, and you inherit the unglamorous reality of distributed systems — things fail halfway, two+writers collide, a message arrives twice or malformed, a conversation loops. The goal isn’t a system that+never fails; it’s one where any single failure is contained and the team keeps moving. Here are the+patterns that get you there, grounded in how a real <a href="/#what">multi-agent harness</a> handles each.</p>+<h2 id="partial-failure-is-the-default" tabindex="-1">Partial failure is the default <a class="anchor" href="#partial-failure-is-the-default" aria-hidden="true">#</a></h2>+<p>The mental shift is to stop treating failure as exceptional. With many agents writing files concurrently+and a router draining their outboxes, on any given tick <em>something</em> can be mid-write, locked, or garbage.+A resilient design assumes that and answers four questions up front: when a shared write collides, then+what? When a message won’t parse, then what? When a conversation loops, then what? When one step throws,+does the whole loop die? Good answers to those four are most of fault tolerance.</p>+<h2 id="make-shared-writes-survivable" tabindex="-1">Make shared writes survivable <a class="anchor" href="#make-shared-writes-survivable" aria-hidden="true">#</a></h2>+<p>The hive commits all coordination to one git repo with a <a href="/blog/single-committer-git-pattern/">single committer</a>.+That removes interleaved writes, but the committer can still race itself or inherit a lock from a crashed+run. So the commit isn’t a single shot — it’s a small retry loop with backoff and <strong>stale-lock recovery</strong>:</p>+<pre class="language-ts"><code class="language-ts"><span class="token comment">// src/main/hive.ts — commit under contention</span>+<span class="token keyword">for</span> <span class="token punctuation">(</span><span class="token keyword">let</span> attempt <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span> attempt <span class="token operator"><</span> <span class="token number">5</span><span class="token punctuation">;</span> attempt<span class="token operator">++</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>+ <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">clearStaleLock</span><span class="token punctuation">(</span>root<span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// a crashed run? clear a >10s-old index.lock</span>+ <span class="token keyword">const</span> commit <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">git</span><span class="token punctuation">(</span><span class="token punctuation">[</span><span class="token string">'commit'</span><span class="token punctuation">,</span> <span class="token string">'-q'</span><span class="token punctuation">,</span> <span class="token string">'-m'</span><span class="token punctuation">,</span> message<span class="token punctuation">]</span><span class="token punctuation">,</span> root<span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token keyword">if</span> <span class="token punctuation">(</span>commit<span class="token punctuation">.</span>ok<span class="token punctuation">)</span> <span class="token keyword">return</span><span class="token punctuation">;</span>+ <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token regex"><span class="token regex-delimiter">/</span><span class="token regex-source language-regex">nothing to commit</span><span class="token regex-delimiter">/</span><span class="token regex-flags">i</span></span><span class="token punctuation">.</span><span class="token function">test</span><span class="token punctuation">(</span>out<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token keyword">return</span><span class="token punctuation">;</span> <span class="token comment">// benign — done</span>+ <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token regex"><span class="token regex-delimiter">/</span><span class="token regex-source language-regex">index\.lock</span><span class="token regex-delimiter">/</span><span class="token regex-flags">i</span></span><span class="token punctuation">.</span><span class="token function">test</span><span class="token punctuation">(</span>commit<span class="token punctuation">.</span>err<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span> <span class="token comment">// contended — back off and retry</span>+ <span class="token function">sleepSync</span><span class="token punctuation">(</span><span class="token number">50</span> <span class="token operator">*</span> <span class="token punctuation">(</span>attempt <span class="token operator">+</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token keyword">continue</span><span class="token punctuation">;</span>+ <span class="token punctuation">}</span>+ <span class="token keyword">return</span><span class="token punctuation">;</span> <span class="token comment">// a non-lock failure: bail quietly; the next mutation retries</span>+<span class="token punctuation">}</span></code></pre>+<p>Three resilience ideas are packed into those lines. <strong>Backoff:</strong> each retry waits longer (<code>50 * (attempt+1)</code>+ms), so a transient collision clears instead of hammering. <strong>Stale-lock recovery:</strong> a <code>.git/index.lock</code>+older than ten seconds is from a committer that died, so it’s safe to remove — otherwise one crash would+wedge the repo forever. And <strong>graceful give-up:</strong> a non-lock error doesn’t throw or block; it returns,+because the <em>next</em> mutation will stage and commit the same pending changes anyway. Nothing is lost by+bailing early.</p>+<h2 id="dont-choke-on-a-poison-message" tabindex="-1">Don’t choke on a poison message <a class="anchor" href="#dont-choke-on-a-poison-message" aria-hidden="true">#</a></h2>+<p>A file-based mailbox will eventually contain a half-written or malformed JSON file. The naive router+reads it, throws, and — if it retries the same file — spins on it forever. The fix is to <strong>quarantine</strong>:</p>+<pre class="language-ts"><code class="language-ts"><span class="token keyword">try</span> <span class="token punctuation">{</span>+ <span class="token keyword">const</span> msg <span class="token operator">=</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">normalize</span><span class="token punctuation">(</span><span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">parse</span><span class="token punctuation">(</span><span class="token function">read</span><span class="token punctuation">(</span>full<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span> id<span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">routeMessage</span><span class="token punctuation">(</span>msg<span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token function">renameSync</span><span class="token punctuation">(</span>full<span class="token punctuation">,</span> <span class="token function">join</span><span class="token punctuation">(</span>outbox<span class="token punctuation">,</span> <span class="token string">'.sent'</span><span class="token punctuation">,</span> f<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// archive, don't reprocess</span>+<span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">{</span>+ <span class="token function">renameSync</span><span class="token punctuation">(</span>full<span class="token punctuation">,</span> <span class="token function">join</span><span class="token punctuation">(</span>outbox<span class="token punctuation">,</span> <span class="token string">'.sent'</span><span class="token punctuation">,</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">bad-</span><span class="token interpolation"><span class="token interpolation-punctuation punctuation">${</span>f<span class="token interpolation-punctuation punctuation">}</span></span><span class="token template-punctuation string">`</span></span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token comment">// quarantine so we don't spin on it</span>+<span class="token punctuation">}</span></code></pre>+<p>A message that won’t parse is moved aside with a <code>bad-</code> prefix and the router moves on. One corrupt file+can’t stall the bus, and the quarantined file is still on disk for you to inspect. (Successful messages+get archived too — moved out of the outbox so they’re never routed twice.)</p>+<h2 id="circuit-break-the-runaways" tabindex="-1">Circuit-break the runaways <a class="anchor" href="#circuit-break-the-runaways" aria-hidden="true">#</a></h2>+<p>Two agents can get into a polite infinite loop — A asks B, B asks A, forever. Protocol etiquette helps+(only <code>request</code>/<code>query</code>/<code>propose</code> expect a reply; <code>inform</code>/<code>done</code> are terminal), but you still want a hard+backstop. Every message carries a <strong>hop count</strong>, and the router drops anything past the cap:</p>+<pre class="language-ts"><code class="language-ts"><span class="token keyword">if</span> <span class="token punctuation">(</span>msg<span class="token punctuation">.</span>hops <span class="token operator">></span> <span class="token constant">HOP_CAP</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>+ <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">appendLog</span><span class="token punctuation">(</span><span class="token punctuation">{</span> kind<span class="token operator">:</span> <span class="token string">'drop'</span><span class="token punctuation">,</span> reason<span class="token operator">:</span> <span class="token string">'hop-cap'</span><span class="token punctuation">,</span> from<span class="token operator">:</span> msg<span class="token punctuation">.</span>from<span class="token punctuation">,</span> to<span class="token operator">:</span> msg<span class="token punctuation">.</span>to<span class="token punctuation">,</span> id<span class="token operator">:</span> msg<span class="token punctuation">.</span>id <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token keyword">return</span><span class="token punctuation">;</span>+<span class="token punctuation">}</span></code></pre>+<p>It’s deliberately blunt: it guarantees the conversation terminates. And because the drop is <em>logged</em>, a+runaway leaves a breadcrumb instead of a silent hang — you can read the log and see exactly which thread+ran away.</p>+<h2 id="idempotent-by-construction" tabindex="-1">Idempotent by construction <a class="anchor" href="#idempotent-by-construction" aria-hidden="true">#</a></h2>+<p>The cheapest way to survive duplicates and replays is to make re-handling a no-op. In the hive, an agent+moves a message to <code>inbox/.done/</code> once it’s handled, and the protocol is explicit: <em>re-reading a message+you already moved to <code>.done/</code> is a no-op — don’t reprocess.</em> Delivery is <strong>at-least-once</strong>; handling is+<strong>idempotent</strong>. So a redelivered message, a crash-and-resume, or a curious re-read all do nothing the+second time. The same property underwrites the <a href="/blog/append-only-event-log-agents/">append-only event log</a>:+each consumer tracks how far it has read, and re-reading a line it already processed changes no state.+Idempotency turns “did this run twice?” from a bug into a shrug.</p>+<h2 id="keep-the-loop-alive-keep-a-record" tabindex="-1">Keep the loop alive, keep a record <a class="anchor" href="#keep-the-loop-alive-keep-a-record" aria-hidden="true">#</a></h2>+<p>The last pattern is error isolation: a failure in one step must not kill the whole system. The hive’s+router wraps each pass so a single bad tick can’t bring it down —</p>+<pre class="language-ts"><code class="language-ts"><span class="token keyword">try</span> <span class="token punctuation">{</span> <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token function">routeOnce</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">{</span> <span class="token comment">/* keep the loop alive */</span> <span class="token punctuation">}</span></code></pre>+<p>— and lifecycle handlers are written to “never crash” on a best-effort path. Pair that with two recovery+affordances and you can always get back to a known state: the <strong>append-only <code>log.jsonl</code></strong> lets you replay+the system’s history to find exactly where it diverged, and <strong>agent archival</strong> means closing an agent+keeps its memory and history intact rather than deleting them — a stopped agent is recoverable, not gone.+This is the same timeline you’d reach for when <a href="/blog/debugging-multi-agent-systems/">debugging a multi-agent system</a>;+resilience and debuggability come from the same record.</p>+<h2 id="a-resilience-checklist" tabindex="-1">A resilience checklist <a class="anchor" href="#a-resilience-checklist" aria-hidden="true">#</a></h2>+<p>For any multi-agent system you build:</p>+<ol>+<li><strong>Retry shared writes</strong> with backoff, and recover stale locks — never let one crash wedge shared state.</li>+<li><strong>Quarantine</strong> unparseable messages instead of retrying them forever.</li>+<li><strong>Cap the hops</strong> on your message path so conversations can’t loop infinitely.</li>+<li><strong>Make handling idempotent</strong> — “already done” should be a cheap, observable fact (a moved file, a cursor).</li>+<li><strong>Isolate failures</strong> so one thrown step doesn’t take down the loop.</li>+<li><strong>Keep an append-only record</strong> so any state is reconstructable and any agent is recoverable.</li>+</ol>+<p>None of these are exotic — they’re the boring distributed-systems hygiene that turns a flaky pile of+agents into a system you can trust to run unattended. Build them in once, at the+<a href="/#how">orchestration layer</a>, and every agent inherits them for free.</p>+<p>Want to see these patterns in a hive you can actually watch recover? You can+<a href="/#install">download Munder Difflin</a> free — it’s open source, and the whole coordination layer is right+there to read.</p>++++ <section class="faq" aria-label="Frequently asked questions">+ <h2 id="faq">FAQ</h2>++ <div class="qa">+ <p class="q">What happens when an AI agent in a multi-agent system fails?</p>+ <p class="a">In a well-built hive, a single failure stays local. A crashed step doesn't take down the router; a malformed message is quarantined instead of retried forever; a runaway loop is dropped by a hop cap; and shared state is protected by retries so one stalled write doesn't block the rest. The system keeps running and the failure is recoverable, not fatal.</p>+ </div>++ <div class="qa">+ <p class="q">How do you make agent message handling idempotent?</p>+ <p class="a">Make 'already handled' a cheap, observable fact. In a file-based hive, an agent moves a message to inbox/.done/ once handled, and re-reading a done message is a no-op. Delivery is at-least-once; handling is idempotent — so a duplicate or replayed message does nothing the second time. The same idea drives an append-only event log: re-reading a line you've already processed changes nothing.</p>+ </div>++ <div class="qa">+ <p class="q">How do you stop AI agents from looping forever?</p>+ <p class="a">Put a circuit breaker on the message path. Every message carries a hop count; once it exceeds a cap, the router drops it and logs the drop rather than letting two agents ping-pong indefinitely. It's a blunt instrument on purpose — it guarantees termination, and the dropped, logged message tells you where to look.</p>+ </div>++ </section>++++ <hr />+ <div class="share">+ <span class="lbl">Tags</span>+ <a class="tag" href="/blog/tags/internals/">Internals</a><a class="tag" href="/blog/tags/concurrency/">Concurrency</a><a class="tag" href="/blog/tags/multi-agent/">Multi-Agent</a><a class="tag" href="/blog/tags/messaging/">Messaging</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="#partial-failure-is-the-default">Partial failure is the default</a></li><li class="lvl-2"><a href="#make-shared-writes-survivable">Make shared writes survivable</a></li><li class="lvl-2"><a href="#dont-choke-on-a-poison-message">Don’t choke on a poison message</a></li><li class="lvl-2"><a href="#circuit-break-the-runaways">Circuit-break the runaways</a></li><li class="lvl-2"><a href="#idempotent-by-construction">Idempotent by construction</a></li><li class="lvl-2"><a href="#keep-the-loop-alive-keep-a-record">Keep the loop alive, keep a record</a></li><li class="lvl-2"><a href="#a-resilience-checklist">A resilience checklist</a></li>+ </ol>+ </aside>++ </div>++ <footer class="post-foot wrap"><div class="prevnext">+ <a class="pn prev" href="/blog/scheduling-autonomous-agent-missions/"><span class="k">← Older</span><span class="t">Make a Hive Work While You Sleep: Scheduling Autonomous Agent Missions</span></a>+ <a class="pn next" href="/blog/prompt-caching-for-ai-agents/"><span class="k">Newer →</span><span class="t">Prompt Caching for AI Agents: Stop Paying for the Same Tokens Twice</span></a>+ </div>+ <section class="related">+ <h2>Related in Internals</h2>+ <div class="post-grid">+ <article class="card">+ <a class="thumb t-internals" href="/blog/architecture-two-planes-one-renderer/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </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/architecture-two-planes-one-renderer/">Munder Difflin's Architecture: Two Data Planes, One Renderer</a></h3>+ <p class="dek">A walkthrough of the multi-agent harness architecture: a node-pty terminal plane and a hooks/hive event plane feeding one React + Pixi.js renderer.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/architecture-two-planes-one-renderer/" aria-label="Read: Munder Difflin's Architecture: Two Data Planes, One Renderer">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-03">Jun 3, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>8 min</span>+ </div>+ <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>+ <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ </div>+ </div>+</article>++ </div>+ </section>++ </footer>+</article>++</main>+<footer>+ <div class="wrap">+ <div class="foot-top">+ <a class="foot-brand brand" href="/blog/">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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 & 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 });+ })();+</script>++</body>+</html>diff --git a/docs/blog/rendering-many-live-terminals-performance/index.html b/docs/blog/rendering-many-live-terminals-performance/index.htmlindex 4fc21239..7a6a7771 100644--- a/docs/blog/rendering-many-live-terminals-performance/index.html+++ b/docs/blog/rendering-many-live-terminals-performance/index.html@@ -302,38 +302,38 @@ to run many real terminals without melting your CPU; it’s free and open source</div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>8 min</span>+ <span>6 min</span></div>- <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>- <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-an-ai-office-floor/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/building-an-ai-office-floor/">Building an AI "Office Floor": Avatars, Pathfinding, Envelopes</a></h3>- <p class="dek">The game-dev techniques behind a dev tool's office floor: Tiled maps, BFS pathfinding, sprite recoloring, and flying message envelopes in Pixi.js.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-an-ai-office-floor/" aria-label="Read: Building an AI "Office Floor": Avatars, Pathfinding, Envelopes">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article>diff --git a/docs/blog/scheduling-autonomous-agent-missions/index.html b/docs/blog/scheduling-autonomous-agent-missions/index.htmlindex cb4a07e7..cfa89004 100644--- a/docs/blog/scheduling-autonomous-agent-missions/index.html+++ b/docs/blog/scheduling-autonomous-agent-missions/index.html@@ -291,7 +291,7 @@ mission and watch the floor wake itself up; it’s free and open source.</p><footer class="post-foot wrap"><div class="prevnext"><a class="pn prev" href="/blog/security-for-ai-coding-agents/"><span class="k">← Older</span><span class="t">Security for AI Coding Agents: A Practical Guide</span></a>- <a class="pn next" href="/blog/prompt-caching-for-ai-agents/"><span class="k">Newer →</span><span class="t">Prompt Caching for AI Agents: Stop Paying for the Same Tokens Twice</span></a>+ <a class="pn next" href="/blog/recovering-from-agent-failures/"><span class="k">Newer →</span><span class="t">Recovering From Agent Failures: Resilience Patterns for a Hive</span></a></div><section class="related"><h2>Related in Orchestration</h2>diff --git a/docs/blog/single-committer-git-pattern/index.html b/docs/blog/single-committer-git-pattern/index.htmlindex 1405c3f6..7012d8f4 100644--- a/docs/blog/single-committer-git-pattern/index.html+++ b/docs/blog/single-committer-git-pattern/index.html@@ -309,38 +309,38 @@ never corrupt their own state; it’s free and open source.</p></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>8 min</span>+ <span>6 min</span></div>- <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>- <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-an-ai-office-floor/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/building-an-ai-office-floor/">Building an AI "Office Floor": Avatars, Pathfinding, Envelopes</a></h3>- <p class="dek">The game-dev techniques behind a dev tool's office floor: Tiled maps, BFS pathfinding, sprite recoloring, and flying message envelopes in Pixi.js.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-an-ai-office-floor/" aria-label="Read: Building an AI "Office Floor": Avatars, Pathfinding, Envelopes">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article>diff --git a/docs/blog/small-team-ai-agents-playbook/index.html b/docs/blog/small-team-ai-agents-playbook/index.htmlindex 84aed55b..6b6e7a5f 100644--- a/docs/blog/small-team-ai-agents-playbook/index.html+++ b/docs/blog/small-team-ai-agents-playbook/index.html@@ -266,7 +266,7 @@ it’s free and open source.</p></div><footer class="post-foot wrap"><div class="prevnext">- <a class="pn prev" href="/blog/the-office-parody-behind-munder-difflin/"><span class="k">← Older</span><span class="t">The Office Parody Behind Munder Difflin (and Why It Helps)</span></a>+ <a class="pn prev" href="/blog/the-hook-shim-pattern/"><span class="k">← Older</span><span class="t">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</span></a><a class="pn next" href="/blog/security-for-ai-coding-agents/"><span class="k">Newer →</span><span class="t">Security for AI Coding Agents: A Practical Guide</span></a></div><section class="related">diff --git a/docs/blog/tags/agentic-ai/index.html b/docs/blog/tags/agentic-ai/index.htmlindex b20e3f90..ad4fd02b 100644--- a/docs/blog/tags/agentic-ai/index.html+++ b/docs/blog/tags/agentic-ai/index.html@@ -58,11 +58,29 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#Agentic AI</h1>- <p class="lead">1 post tagged <strong>Agentic AI</strong>.</p>+ <p class="lead">2 posts tagged <strong>Agentic AI</strong>.</p></header><section class="wrap"><div class="post-grid"><article class="card">+ <a class="thumb t-concepts" href="/blog/long-running-agents-the-2026-shift/" aria-hidden="true" tabindex="-1">+ <span>CONCEPTS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/long-running-agents-the-2026-shift/">Long-Running Agents: The 2026 Shift from Minutes to Hours</a></h3>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</p>+ <div class="foot">+ <span class="tag kind">Concepts</span>+ <a class="more" href="/blog/long-running-agents-the-2026-shift/" aria-label="Read: Long-Running Agents: The 2026 Shift from Minutes to Hours">Read →</a>+ </div>+ </div>+</article>+<article class="card"><a class="thumb t-guides" href="/blog/whats-new-in-agentic-ai-june-2026/" aria-hidden="true" tabindex="-1"><span>GUIDES</span></a>diff --git a/docs/blog/tags/claude-code/index.html b/docs/blog/tags/claude-code/index.htmlindex fa1525fc..88ec915c 100644--- a/docs/blog/tags/claude-code/index.html+++ b/docs/blog/tags/claude-code/index.html@@ -58,7 +58,7 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#Claude Code</h1>- <p class="lead">32 posts tagged <strong>Claude Code</strong>.</p>+ <p class="lead">33 posts tagged <strong>Claude Code</strong>.</p></header><section class="wrap"><div class="post-grid">@@ -296,6 +296,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-internals" href="/blog/claude-code-hooks-explained/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span>diff --git a/docs/blog/tags/cloud-agents/index.html b/docs/blog/tags/cloud-agents/index.htmlnew file mode 100644index 00000000..ff8c0f82--- /dev/null+++ b/docs/blog/tags/cloud-agents/index.html@@ -0,0 +1,124 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1.0" />+<title>Cloud Agents — Munder Difflin Blog</title>+<meta name="description" content="Munder Difflin blog posts tagged Cloud Agents." />+<link rel="canonical" href="https://munderdiffl.in/blog/tags/cloud-agents/" />++<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="website" />+<meta property="og:title" content="Cloud Agents — Munder Difflin Blog" />+<meta property="og:description" content="Munder Difflin blog posts tagged Cloud Agents." />+<meta property="og:url" content="https://munderdiffl.in/blog/tags/cloud-agents/" />+<meta property="og:image" content="https://munderdiffl.in/media/og.png" />+<meta property="og:locale" content="en_US" />+++<!-- Twitter -->+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:title" content="Cloud Agents — Munder Difflin Blog" />+<meta name="twitter:description" content="Munder Difflin blog posts tagged Cloud Agents." />+<meta name="twitter:image" content="https://munderdiffl.in/media/og.png" />++<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=Geist:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet" />+<link rel="stylesheet" href="/blog/assets/blog.css" />++</head>+<body>+<a class="skip-link" href="#main">Skip to content</a>+<nav id="nav">+ <a class="brand" href="/blog/" aria-label="Munder Difflin Blog home">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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">+<header class="page-head wrap">+ <p class="eyebrow">Tag</p>+ <h1>#Cloud Agents</h1>+ <p class="lead">1 post tagged <strong>Cloud Agents</strong>.</p>+</header>+<section class="wrap">+ <div class="post-grid">+ <article class="card">+ <a class="thumb t-comparisons" href="/blog/local-first-vs-cloud-agent-sdks/" aria-hidden="true" tabindex="-1">+ <span>COMPARISONS</span>+ </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/local-first-vs-cloud-agent-sdks/">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</a></h3>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</p>+ <div class="foot">+ <span class="tag kind">Comparisons</span>+ <a class="more" href="/blog/local-first-vs-cloud-agent-sdks/" aria-label="Read: Local-First vs Cloud Agent SDKs: Which Wins in 2026?">Read →</a>+ </div>+ </div>+</article>++ </div>+</section>+++</main>+<footer>+ <div class="wrap">+ <div class="foot-top">+ <a class="foot-brand brand" href="/blog/">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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 & 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 });+ })();+</script>++</body>+</html>diff --git a/docs/blog/tags/comparisons/index.html b/docs/blog/tags/comparisons/index.htmlindex 8fa9c2d4..b7e09eed 100644--- a/docs/blog/tags/comparisons/index.html+++ b/docs/blog/tags/comparisons/index.html@@ -58,7 +58,7 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#Comparisons</h1>- <p class="lead">8 posts tagged <strong>Comparisons</strong>.</p>+ <p class="lead">9 posts tagged <strong>Comparisons</strong>.</p></header><section class="wrap"><div class="post-grid">@@ -116,6 +116,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-comparisons" href="/blog/local-first-vs-cloud-agent-sdks/" aria-hidden="true" tabindex="-1">+ <span>COMPARISONS</span>+ </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/local-first-vs-cloud-agent-sdks/">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</a></h3>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</p>+ <div class="foot">+ <span class="tag kind">Comparisons</span>+ <a class="more" href="/blog/local-first-vs-cloud-agent-sdks/" aria-label="Read: Local-First vs Cloud Agent SDKs: Which Wins in 2026?">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-comparisons" href="/blog/claude-squad-alternative/" aria-hidden="true" tabindex="-1"><span>COMPARISONS</span>diff --git a/docs/blog/tags/concurrency/index.html b/docs/blog/tags/concurrency/index.htmlindex 445feed2..aa71a0f4 100644--- a/docs/blog/tags/concurrency/index.html+++ b/docs/blog/tags/concurrency/index.html@@ -58,11 +58,29 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#Concurrency</h1>- <p class="lead">1 post tagged <strong>Concurrency</strong>.</p>+ <p class="lead">2 posts tagged <strong>Concurrency</strong>.</p></header><section class="wrap"><div class="post-grid"><article class="card">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a>+ </div>+ </div>+</article>+<article class="card"><a class="thumb t-internals" href="/blog/single-committer-git-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a>diff --git a/docs/blog/tags/hooks/index.html b/docs/blog/tags/hooks/index.htmlindex 85876ab3..e438c74a 100644--- a/docs/blog/tags/hooks/index.html+++ b/docs/blog/tags/hooks/index.html@@ -58,11 +58,29 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#Hooks</h1>- <p class="lead">1 post tagged <strong>Hooks</strong>.</p>+ <p class="lead">2 posts tagged <strong>Hooks</strong>.</p></header><section class="wrap"><div class="post-grid"><article class="card">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a>+ </div>+ </div>+</article>+<article class="card"><a class="thumb t-internals" href="/blog/claude-code-hooks-explained/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a>diff --git a/docs/blog/tags/internals/index.html b/docs/blog/tags/internals/index.htmlindex bb916ac2..cda464bd 100644--- a/docs/blog/tags/internals/index.html+++ b/docs/blog/tags/internals/index.html@@ -58,7 +58,7 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#Internals</h1>- <p class="lead">15 posts tagged <strong>Internals</strong>.</p>+ <p class="lead">17 posts tagged <strong>Internals</strong>.</p></header><section class="wrap"><div class="post-grid">@@ -152,6 +152,42 @@</div></div></article>+<article class="card">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span>diff --git a/docs/blog/tags/local-first/index.html b/docs/blog/tags/local-first/index.htmlindex fa40a296..e472cca9 100644--- a/docs/blog/tags/local-first/index.html+++ b/docs/blog/tags/local-first/index.html@@ -58,7 +58,7 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#Local-First</h1>- <p class="lead">3 posts tagged <strong>Local-First</strong>.</p>+ <p class="lead">4 posts tagged <strong>Local-First</strong>.</p></header><section class="wrap"><div class="post-grid">@@ -80,6 +80,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-comparisons" href="/blog/local-first-vs-cloud-agent-sdks/" aria-hidden="true" tabindex="-1">+ <span>COMPARISONS</span>+ </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/local-first-vs-cloud-agent-sdks/">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</a></h3>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</p>+ <div class="foot">+ <span class="tag kind">Comparisons</span>+ <a class="more" href="/blog/local-first-vs-cloud-agent-sdks/" aria-label="Read: Local-First vs Cloud Agent SDKs: Which Wins in 2026?">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-concepts" href="/blog/open-source-ai-tools-on-purpose/" aria-hidden="true" tabindex="-1"><span>CONCEPTS</span>diff --git a/docs/blog/tags/long-running-agents/index.html b/docs/blog/tags/long-running-agents/index.htmlnew file mode 100644index 00000000..59e67540--- /dev/null+++ b/docs/blog/tags/long-running-agents/index.html@@ -0,0 +1,124 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1.0" />+<title>Long-Running Agents — Munder Difflin Blog</title>+<meta name="description" content="Munder Difflin blog posts tagged Long-Running Agents." />+<link rel="canonical" href="https://munderdiffl.in/blog/tags/long-running-agents/" />++<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="website" />+<meta property="og:title" content="Long-Running Agents — Munder Difflin Blog" />+<meta property="og:description" content="Munder Difflin blog posts tagged Long-Running Agents." />+<meta property="og:url" content="https://munderdiffl.in/blog/tags/long-running-agents/" />+<meta property="og:image" content="https://munderdiffl.in/media/og.png" />+<meta property="og:locale" content="en_US" />+++<!-- Twitter -->+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:title" content="Long-Running Agents — Munder Difflin Blog" />+<meta name="twitter:description" content="Munder Difflin blog posts tagged Long-Running Agents." />+<meta name="twitter:image" content="https://munderdiffl.in/media/og.png" />++<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=Geist:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet" />+<link rel="stylesheet" href="/blog/assets/blog.css" />++</head>+<body>+<a class="skip-link" href="#main">Skip to content</a>+<nav id="nav">+ <a class="brand" href="/blog/" aria-label="Munder Difflin Blog home">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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">+<header class="page-head wrap">+ <p class="eyebrow">Tag</p>+ <h1>#Long-Running Agents</h1>+ <p class="lead">1 post tagged <strong>Long-Running Agents</strong>.</p>+</header>+<section class="wrap">+ <div class="post-grid">+ <article class="card">+ <a class="thumb t-concepts" href="/blog/long-running-agents-the-2026-shift/" aria-hidden="true" tabindex="-1">+ <span>CONCEPTS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/long-running-agents-the-2026-shift/">Long-Running Agents: The 2026 Shift from Minutes to Hours</a></h3>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</p>+ <div class="foot">+ <span class="tag kind">Concepts</span>+ <a class="more" href="/blog/long-running-agents-the-2026-shift/" aria-label="Read: Long-Running Agents: The 2026 Shift from Minutes to Hours">Read →</a>+ </div>+ </div>+</article>++ </div>+</section>+++</main>+<footer>+ <div class="wrap">+ <div class="foot-top">+ <a class="foot-brand brand" href="/blog/">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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 & 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 });+ })();+</script>++</body>+</html>diff --git a/docs/blog/tags/mcp/index.html b/docs/blog/tags/mcp/index.htmlindex 85a53154..1f7cde0b 100644--- a/docs/blog/tags/mcp/index.html+++ b/docs/blog/tags/mcp/index.html@@ -58,11 +58,29 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#MCP</h1>- <p class="lead">1 post tagged <strong>MCP</strong>.</p>+ <p class="lead">2 posts tagged <strong>MCP</strong>.</p></header><section class="wrap"><div class="post-grid"><article class="card">+ <a class="thumb t-comparisons" href="/blog/local-first-vs-cloud-agent-sdks/" aria-hidden="true" tabindex="-1">+ <span>COMPARISONS</span>+ </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/local-first-vs-cloud-agent-sdks/">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</a></h3>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</p>+ <div class="foot">+ <span class="tag kind">Comparisons</span>+ <a class="more" href="/blog/local-first-vs-cloud-agent-sdks/" aria-label="Read: Local-First vs Cloud Agent SDKs: Which Wins in 2026?">Read →</a>+ </div>+ </div>+</article>+<article class="card"><a class="thumb t-guides" href="/blog/mcp-and-skills-in-a-hive/" aria-hidden="true" tabindex="-1"><span>GUIDES</span></a>diff --git a/docs/blog/tags/messaging/index.html b/docs/blog/tags/messaging/index.htmlindex 2ff91637..99fea699 100644--- a/docs/blog/tags/messaging/index.html+++ b/docs/blog/tags/messaging/index.html@@ -58,11 +58,29 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#Messaging</h1>- <p class="lead">1 post tagged <strong>Messaging</strong>.</p>+ <p class="lead">2 posts tagged <strong>Messaging</strong>.</p></header><section class="wrap"><div class="post-grid"><article class="card">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a>+ </div>+ </div>+</article>+<article class="card"><a class="thumb t-internals" href="/blog/atomic-file-mailboxes-for-agents/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a>diff --git a/docs/blog/tags/multi-agent/index.html b/docs/blog/tags/multi-agent/index.htmlindex 0e35e881..378698ca 100644--- a/docs/blog/tags/multi-agent/index.html+++ b/docs/blog/tags/multi-agent/index.html@@ -58,7 +58,7 @@<header class="page-head wrap"><p class="eyebrow">Tag</p><h1>#Multi-Agent</h1>- <p class="lead">43 posts tagged <strong>Multi-Agent</strong>.</p>+ <p class="lead">46 posts tagged <strong>Multi-Agent</strong>.</p></header><section class="wrap"><div class="post-grid">@@ -296,6 +296,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-concepts" href="/blog/long-running-agents-the-2026-shift/" aria-hidden="true" tabindex="-1">+ <span>CONCEPTS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/long-running-agents-the-2026-shift/">Long-Running Agents: The 2026 Shift from Minutes to Hours</a></h3>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</p>+ <div class="foot">+ <span class="tag kind">Concepts</span>+ <a class="more" href="/blog/long-running-agents-the-2026-shift/" aria-label="Read: Long-Running Agents: The 2026 Shift from Minutes to Hours">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-concepts" href="/blog/open-source-ai-tools-on-purpose/" aria-hidden="true" tabindex="-1"><span>CONCEPTS</span>@@ -350,6 +368,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-guides" href="/blog/security-for-ai-coding-agents/" aria-hidden="true" tabindex="-1"><span>GUIDES</span>@@ -386,6 +422,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-guides" href="/blog/whats-new-in-agentic-ai-june-2026/" aria-hidden="true" tabindex="-1"><span>GUIDES</span>diff --git a/docs/blog/tags/trends/index.html b/docs/blog/tags/trends/index.htmlnew file mode 100644index 00000000..387298d2--- /dev/null+++ b/docs/blog/tags/trends/index.html@@ -0,0 +1,124 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1.0" />+<title>Trends — Munder Difflin Blog</title>+<meta name="description" content="Munder Difflin blog posts tagged Trends." />+<link rel="canonical" href="https://munderdiffl.in/blog/tags/trends/" />++<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="website" />+<meta property="og:title" content="Trends — Munder Difflin Blog" />+<meta property="og:description" content="Munder Difflin blog posts tagged Trends." />+<meta property="og:url" content="https://munderdiffl.in/blog/tags/trends/" />+<meta property="og:image" content="https://munderdiffl.in/media/og.png" />+<meta property="og:locale" content="en_US" />+++<!-- Twitter -->+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:title" content="Trends — Munder Difflin Blog" />+<meta name="twitter:description" content="Munder Difflin blog posts tagged Trends." />+<meta name="twitter:image" content="https://munderdiffl.in/media/og.png" />++<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=Geist:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet" />+<link rel="stylesheet" href="/blog/assets/blog.css" />++</head>+<body>+<a class="skip-link" href="#main">Skip to content</a>+<nav id="nav">+ <a class="brand" href="/blog/" aria-label="Munder Difflin Blog home">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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">+<header class="page-head wrap">+ <p class="eyebrow">Tag</p>+ <h1>#Trends</h1>+ <p class="lead">1 post tagged <strong>Trends</strong>.</p>+</header>+<section class="wrap">+ <div class="post-grid">+ <article class="card">+ <a class="thumb t-concepts" href="/blog/long-running-agents-the-2026-shift/" aria-hidden="true" tabindex="-1">+ <span>CONCEPTS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/long-running-agents-the-2026-shift/">Long-Running Agents: The 2026 Shift from Minutes to Hours</a></h3>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</p>+ <div class="foot">+ <span class="tag kind">Concepts</span>+ <a class="more" href="/blog/long-running-agents-the-2026-shift/" aria-label="Read: Long-Running Agents: The 2026 Shift from Minutes to Hours">Read →</a>+ </div>+ </div>+</article>++ </div>+</section>+++</main>+<footer>+ <div class="wrap">+ <div class="foot-top">+ <a class="foot-brand brand" href="/blog/">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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 & 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 });+ })();+</script>++</body>+</html>diff --git a/docs/blog/the-hook-shim-pattern/index.html b/docs/blog/the-hook-shim-pattern/index.htmlnew file mode 100644index 00000000..361a1de8--- /dev/null+++ b/docs/blog/the-hook-shim-pattern/index.html@@ -0,0 +1,379 @@+<!doctype html>+<html lang="en">+<head>+<meta charset="UTF-8" />+<meta name="viewport" content="width=device-width, initial-scale=1.0" />+<title>The Hook Shim Pattern: Wiring Agent Hooks to a Live Process — Munder Difflin Blog</title>+<meta name="description" content="How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel." />+<link rel="canonical" href="https://munderdiffl.in/blog/the-hook-shim-pattern/" />++<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="The Hook Shim Pattern: Wiring Agent Hooks to a Live Process — Munder Difflin Blog" />+<meta property="og:description" content="How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel." />+<meta property="og:url" content="https://munderdiffl.in/blog/the-hook-shim-pattern/" />+<meta property="og:image" content="https://munderdiffl.in/media/og.png" />+<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="Internals" />+<meta property="article:tag" content="Claude Code" />+<meta property="article:tag" content="Hooks" />+<meta property="article:tag" content="Multi-Agent" />+++<!-- Twitter -->+<meta name="twitter:card" content="summary_large_image" />+<meta name="twitter:title" content="The Hook Shim Pattern: Wiring Agent Hooks to a Live Process — Munder Difflin Blog" />+<meta name="twitter:description" content="How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel." />+<meta name="twitter:image" content="https://munderdiffl.in/media/og.png" />++<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=Geist:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet" />+<link rel="stylesheet" href="/blog/assets/blog.css" />++<script type="application/ld+json">+{+ "@context": "https://schema.org",+ "@type": "BlogPosting",+ "headline": "The Hook Shim Pattern: Wiring Agent Hooks to a Live Process",+ "description": "How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.",+ "image": ["https://munderdiffl.in/media/og.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/the-hook-shim-pattern/" },+ "keywords": "claude code hook shim, claude code hooks architecture, agent lifecycle hooks, unix socket ipc agents",+ "articleSection": "Internals",+ "inLanguage": "en-US",+ "url": "https://munderdiffl.in/blog/the-hook-shim-pattern/"+}+</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": "The Hook Shim Pattern: Wiring Agent Hooks to a Live Process", "item": "https://munderdiffl.in/blog/the-hook-shim-pattern/" }+ ]+}+</script>++<script type="application/ld+json">+{+ "@context": "https://schema.org",+ "@type": "FAQPage",+ "mainEntity": [+ { "@type": "Question", "name": "Why not put the logic directly in the hook command?", "acceptedAnswer": { "@type": "Answer", "text": "Because a hook is a per-event shell command, and burying real logic there means editing the user's repo settings, re-installing on every code change, and duplicating state across short-lived processes. A shim forwards the event to one long-running process that holds all the logic — so you change behavior in one place, and the hook config never has to move." } },+ { "@type": "Question", "name": "What does the shim actually do?", "acceptedAnswer": { "@type": "Answer", "text": "Almost nothing, on purpose. It reads the hook payload from stdin, tags it with the agent's id, opens a Unix-domain socket to the main process, writes the payload, relays the response back to stdout, and exits. Every failure path exits 0 so it can never crash the agent's turn." } },+ { "@type": "Question", "name": "Can a hook do more than observe — can it steer the agent?", "acceptedAnswer": { "@type": "Answer", "text": "Yes. Claude Code reads the hook's JSON response, so the main process can reply with a decision — for example {\"decision\":\"block\",\"reason\":\"...\"} on a Stop event to keep the agent working. That's how an autonomous inbox-drain loop is built, guarded so it can never loop forever." } }++ ]+}+</script>+++</head>+<body>+<a class="skip-link" href="#main">Skip to content</a>+<nav id="nav">+ <a class="brand" href="/blog/" aria-label="Munder Difflin Blog home">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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>+ <header class="post-head wrap">+ <nav class="crumbs" aria-label="Breadcrumb">+ <a href="/blog/">Blog</a>+ <span>/</span>+ <a href="/blog/topics/internals/">Internals</a>+ </nav>+ <h1>The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</h1>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</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">Internals</span>+ </div>+ </header>++ <div class="post-wrap wrap">+ <div class="prose">+ <div class="callout tldr"><span class="ic">TL;DR</span><p>Claude Code fires <strong>lifecycle hooks</strong>+(Stop, PreToolUse, Notification…) as shell commands. Putting real logic in those commands is a trap —+it's per-event, lives in the user's repo, and can't share state. The <strong>hook shim pattern</strong>+fixes it: each hook runs a tiny shim that forwards its payload over a <strong>Unix-domain socket</strong>+to one long-running process holding all the logic. The shim is a dumb pipe that never crashes a turn; the+main process gets a live telemetry feed <em>and</em> a control channel back.</p></div>+<p><a href="/blog/claude-code-hooks-explained/">Claude Code hooks</a> are a great extension point: at defined moments —+a tool is about to run, the agent stopped, a notification fired — Claude Code runs a shell command you+configure, hands it a JSON payload on stdin, and reads a JSON response from stdout. Simple and powerful.</p>+<p>The trap is doing the work <em>in</em> that command. If you’re building something live — a UI that shows what+each agent is doing, an autonomous loop that re-engages an idle agent — a per-event shell script is the+wrong home for that logic. Here’s the pattern we use instead, and why it holds up.</p>+<h2 id="why-logic-in-the-hook-doesnt-scale" tabindex="-1">Why logic-in-the-hook doesn’t scale <a class="anchor" href="#why-logic-in-the-hook-doesnt-scale" aria-hidden="true">#</a></h2>+<p>A hook command has three problems as a place for real behavior:</p>+<ul>+<li><strong>It’s short-lived.</strong> Each event spawns a fresh process that dies immediately. There’s nowhere to keep+state — avatar status, a per-agent cursor, an event log — without re-reading it from disk every time.</li>+<li><strong>It lives in the user’s settings.</strong> Hook config is attached to a session via <code>--settings</code>. Bake logic+in and every code change means rewriting that config; it also can’t easily reach your app’s in-memory+state.</li>+<li><strong>It’s risky.</strong> A hook that throws or hangs can stall the agent. Logic and the agent’s turn shouldn’t+share a failure mode.</li>+</ul>+<p>You want the <em>trigger</em> to stay at the edge and the <em>logic</em> to live in one place. That’s exactly what a+shim buys you.</p>+<h2 id="the-shim-a-dumb-pipe" tabindex="-1">The shim: a dumb pipe <a class="anchor" href="#the-shim-a-dumb-pipe" aria-hidden="true">#</a></h2>+<p>The harness writes a tiny script — <code>cth-hook.cjs</code> — into the hive directory and points every hook at it.+Its entire job is to forward:</p>+<pre class="language-javascript"><code class="language-javascript"><span class="token comment">// read the hook payload on stdin, tag it, forward to the socket, relay the reply</span>+<span class="token keyword">const</span> net <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'net'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+<span class="token keyword">let</span> data <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>+process<span class="token punctuation">.</span>stdin<span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">'data'</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">d</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span> data <span class="token operator">+=</span> d<span class="token punctuation">;</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+process<span class="token punctuation">.</span>stdin<span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">'end'</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>+ <span class="token keyword">const</span> payload <span class="token operator">=</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">parse</span><span class="token punctuation">(</span>data <span class="token operator">||</span> <span class="token string">'{}'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ payload<span class="token punctuation">.</span>agent_id <span class="token operator">||=</span> process<span class="token punctuation">.</span>env<span class="token punctuation">.</span><span class="token constant">AGENT_ID</span><span class="token punctuation">;</span>+ <span class="token keyword">const</span> sock <span class="token operator">=</span> process<span class="token punctuation">.</span>env<span class="token punctuation">.</span><span class="token constant">HIVE_SOCK</span><span class="token punctuation">;</span>+ <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token operator">!</span>sock<span class="token punctuation">)</span> process<span class="token punctuation">.</span><span class="token function">exit</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token keyword">const</span> c <span class="token operator">=</span> net<span class="token punctuation">.</span><span class="token function">createConnection</span><span class="token punctuation">(</span>sock<span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> c<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span><span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span>payload<span class="token punctuation">)</span> <span class="token operator">+</span> <span class="token string">'\n'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token keyword">let</span> resp <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>+ c<span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">'data'</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">d</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span> resp <span class="token operator">+=</span> d<span class="token punctuation">;</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ c<span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">'end'</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span> <span class="token keyword">if</span> <span class="token punctuation">(</span>resp<span class="token punctuation">)</span> process<span class="token punctuation">.</span>stdout<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>resp<span class="token punctuation">)</span><span class="token punctuation">;</span> process<span class="token punctuation">.</span><span class="token function">exit</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">;</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ c<span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">'error'</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> process<span class="token punctuation">.</span><span class="token function">exit</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token function">setTimeout</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">=></span> process<span class="token punctuation">.</span><span class="token function">exit</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">,</span> <span class="token number">5000</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">unref</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>+<p>Notice what it does <em>not</em> do: no decisions, no disk, no state. It tags the payload with the agent’s id+(from an env var the agent was spawned with), opens a Unix-domain socket to the main process, writes one+line of JSON, and relays whatever comes back. And notice the guards — missing socket, connection error,+and a 5-second timeout all <code>exit(0)</code>. <strong>The shim can never crash the agent’s turn.</strong> That’s the contract.</p>+<h2 id="all-the-logic-lives-in-one-process" tabindex="-1">All the logic lives in one process <a class="anchor" href="#all-the-logic-lives-in-one-process" aria-hidden="true">#</a></h2>+<p>On the other end, the app’s main process listens on that socket and holds everything:</p>+<pre class="language-javascript"><code class="language-javascript"><span class="token keyword">const</span> server <span class="token operator">=</span> <span class="token function">createServer</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">conn</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>+ <span class="token keyword">let</span> buf <span class="token operator">=</span> <span class="token string">''</span><span class="token punctuation">;</span>+ conn<span class="token punctuation">.</span><span class="token function">on</span><span class="token punctuation">(</span><span class="token string">'data'</span><span class="token punctuation">,</span> <span class="token punctuation">(</span><span class="token parameter">d</span><span class="token punctuation">)</span> <span class="token operator">=></span> <span class="token punctuation">{</span>+ buf <span class="token operator">+=</span> d<span class="token punctuation">.</span><span class="token function">toString</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token keyword">const</span> nl <span class="token operator">=</span> buf<span class="token punctuation">.</span><span class="token function">indexOf</span><span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token keyword">if</span> <span class="token punctuation">(</span>nl <span class="token operator">===</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span> <span class="token keyword">return</span><span class="token punctuation">;</span> <span class="token comment">// wait for the full line</span>+ <span class="token keyword">const</span> payload <span class="token operator">=</span> <span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">parse</span><span class="token punctuation">(</span>buf<span class="token punctuation">.</span><span class="token function">slice</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span> nl<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ conn<span class="token punctuation">.</span><span class="token function">end</span><span class="token punctuation">(</span><span class="token constant">JSON</span><span class="token punctuation">.</span><span class="token function">stringify</span><span class="token punctuation">(</span><span class="token function">handle</span><span class="token punctuation">(</span>payload<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+ <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>+server<span class="token punctuation">.</span><span class="token function">listen</span><span class="token punctuation">(</span>sockPath<span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre>+<p><code>handle()</code> is where the real work happens — and because it’s one resident process, it can keep live state+the per-event hooks never could. PreToolUse / PostToolUse / Notification events drive each agent’s avatar+on the <a href="/blog/visualizing-ai-agents-pixijs/">office floor</a>; the same feed can append to an+<a href="/blog/append-only-event-log-agents/">event log</a>. The hooks settings route all the relevant events+(<code>Stop</code>, <code>SubagentStop</code>, <code>PreToolUse</code>, <code>PostToolUse</code>, <code>UserPromptSubmit</code>, <code>Notification</code>, <code>SessionStart</code>)+through the one shim, so the main process sees the whole lifecycle of every agent in real time.</p>+<h2 id="the-real-payoff-a-control-channel-not-just-telemetry" tabindex="-1">The real payoff: a control channel, not just telemetry <a class="anchor" href="#the-real-payoff-a-control-channel-not-just-telemetry" aria-hidden="true">#</a></h2>+<p>Because Claude Code reads the hook’s JSON <em>response</em>, the shim isn’t a one-way feed — it’s a round trip.+The main process can answer. That’s what turns observation into control.</p>+<p>The clearest example is the autonomous loop. When an agent hits <code>Stop</code>, the main process checks that+agent’s <a href="/blog/atomic-file-mailboxes-for-agents/">inbox</a>. If a message is waiting, it replies with+<code>{"decision":"block","reason":"<the message>"}</code> — and Claude Code keeps the agent working to handle it+instead of going idle. An agent that another agent (or the <a href="/blog/how-the-god-orchestrator-works/">orchestrator</a>)+just messaged picks the work up on its own.</p>+<p>The danger with any “keep going” mechanism is an infinite loop, so the payload carries a <code>stop_hook_active</code>+flag: if a previous Stop already blocked this turn, the process lets the agent stop. Re-engage once, never+forever. A genuine stop with an empty inbox falls through to a desktop “idle” notification.</p>+<h2 id="why-this-pattern-is-worth-copying" tabindex="-1">Why this pattern is worth copying <a class="anchor" href="#why-this-pattern-is-worth-copying" aria-hidden="true">#</a></h2>+<p>If you’re wiring agent lifecycle hooks into anything stateful, the shim pattern gives you four things at+once: <strong>decoupling</strong> (refresh the shim from code on startup; the session’s hook config never moves),+<strong>a single source of truth</strong> (one process, real in-memory state), <strong>safety</strong> (the edge can fail without+stalling the agent), and <strong>a control channel</strong> (reply with a decision, don’t just log). The trigger stays+tiny and dumb; the brains stay in one testable place.</p>+<h2 id="faq" tabindex="-1">FAQ <a class="anchor" href="#faq" aria-hidden="true">#</a></h2>+<p><strong>Why a Unix socket and not HTTP?</strong> It’s local-only, fast, and needs no port or auth — the shim and the+app are on the same machine. The payload is one line of newline-delimited JSON, so framing is trivial.</p>+<p><strong>What happens if the main app isn’t running?</strong> The shim finds no socket (or fails to connect) and exits+0. The agent’s turn proceeds normally; you lose telemetry for that event, not the agent.</p>+<p><strong>Does this only work for Claude Code?</strong> The pattern is general: any tool that runs a command per event+and reads a response can be bridged this way. Claude Code’s hook payloads and decision response just make+it a clean fit.</p>+<hr>+<p>Munder Difflin uses exactly this shim to drive a live office floor and an autonomous inbox-drain loop for a+whole <a href="https://munderdiffl.in/#how">hive of Claude Code agents</a> — all local, with the agent’s turn never+at the mercy of the bridge.+<a href="https://munderdiffl.in/#install">Download Munder Difflin</a> to see it run; 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 not put the logic directly in the hook command?</p>+ <p class="a">Because a hook is a per-event shell command, and burying real logic there means editing the user's repo settings, re-installing on every code change, and duplicating state across short-lived processes. A shim forwards the event to one long-running process that holds all the logic — so you change behavior in one place, and the hook config never has to move.</p>+ </div>++ <div class="qa">+ <p class="q">What does the shim actually do?</p>+ <p class="a">Almost nothing, on purpose. It reads the hook payload from stdin, tags it with the agent's id, opens a Unix-domain socket to the main process, writes the payload, relays the response back to stdout, and exits. Every failure path exits 0 so it can never crash the agent's turn.</p>+ </div>++ <div class="qa">+ <p class="q">Can a hook do more than observe — can it steer the agent?</p>+ <p class="a">Yes. Claude Code reads the hook's JSON response, so the main process can reply with a decision — for example {"decision":"block","reason":"..."} on a Stop event to keep the agent working. That's how an autonomous inbox-drain loop is built, guarded so it can never loop forever.</p>+ </div>++ </section>++++ <hr />+ <div class="share">+ <span class="lbl">Tags</span>+ <a class="tag" href="/blog/tags/internals/">Internals</a><a class="tag" href="/blog/tags/claude-code/">Claude Code</a><a class="tag" href="/blog/tags/hooks/">Hooks</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="#why-logic-in-the-hook-doesnt-scale">Why logic-in-the-hook doesn’t scale</a></li><li class="lvl-2"><a href="#the-shim-a-dumb-pipe">The shim: a dumb pipe</a></li><li class="lvl-2"><a href="#all-the-logic-lives-in-one-process">All the logic lives in one process</a></li><li class="lvl-2"><a href="#the-real-payoff-a-control-channel-not-just-telemetry">The real payoff: a control channel, not just telemetry</a></li><li class="lvl-2"><a href="#why-this-pattern-is-worth-copying">Why this pattern is worth copying</a></li><li class="lvl-2"><a href="#faq">FAQ</a></li>+ </ol>+ </aside>++ </div>++ <footer class="post-foot wrap"><div class="prevnext">+ <a class="pn prev" href="/blog/the-office-parody-behind-munder-difflin/"><span class="k">← Older</span><span class="t">The Office Parody Behind Munder Difflin (and Why It Helps)</span></a>+ <a class="pn next" href="/blog/small-team-ai-agents-playbook/"><span class="k">Newer →</span><span class="t">A Small-Team Playbook for AI Coding Agents</span></a>+ </div>+ <section class="related">+ <h2>Related in Internals</h2>+ <div class="post-grid">+ <article class="card">+ <a class="thumb t-internals" href="/blog/architecture-two-planes-one-renderer/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </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/architecture-two-planes-one-renderer/">Munder Difflin's Architecture: Two Data Planes, One Renderer</a></h3>+ <p class="dek">A walkthrough of the multi-agent harness architecture: a node-pty terminal plane and a hooks/hive event plane feeding one React + Pixi.js renderer.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/architecture-two-planes-one-renderer/" aria-label="Read: Munder Difflin's Architecture: Two Data Planes, One Renderer">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-03">Jun 3, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>8 min</span>+ </div>+ <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>+ <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ </div>+ </div>+</article>++ </div>+ </section>++ </footer>+</article>++</main>+<footer>+ <div class="wrap">+ <div class="foot-top">+ <a class="foot-brand brand" href="/blog/">+ <span class="brand-mark">MD</span>+ <span class="brand-word">MUNDER DIFFLIN<span class="sep">/</span><span class="blog">BLOG</span></span>+ </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 & 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 });+ })();+</script>++</body>+</html>diff --git a/docs/blog/the-office-parody-behind-munder-difflin/index.html b/docs/blog/the-office-parody-behind-munder-difflin/index.htmlindex d6ad92ea..6aa3ccaf 100644--- a/docs/blog/the-office-parody-behind-munder-difflin/index.html+++ b/docs/blog/the-office-parody-behind-munder-difflin/index.html@@ -263,7 +263,7 @@ Michael’s already at his desk. Free and open source.</p><footer class="post-foot wrap"><div class="prevnext"><a class="pn prev" href="/blog/trigger-ai-agents-from-slack/"><span class="k">← Older</span><span class="t">Trigger Your AI Agent Hive from Slack</span></a>- <a class="pn next" href="/blog/small-team-ai-agents-playbook/"><span class="k">Newer →</span><span class="t">A Small-Team Playbook for AI Coding Agents</span></a>+ <a class="pn next" href="/blog/the-hook-shim-pattern/"><span class="k">Newer →</span><span class="t">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</span></a></div><section class="related"><h2>Related in Story</h2>diff --git a/docs/blog/topics/comparisons/index.html b/docs/blog/topics/comparisons/index.htmlindex 60d58211..27d5d4e5 100644--- a/docs/blog/topics/comparisons/index.html+++ b/docs/blog/topics/comparisons/index.html@@ -63,18 +63,18 @@</nav><p class="eyebrow">Topic</p><h1>comparisons</h1>- <p class="lead">8 posts in this cluster.</p>+ <p class="lead">9 posts in this cluster.</p><div class="filters" role="navigation" aria-label="Topics"><a class="chip" href="/blog/">All</a><a class="chip" href="/blog/topics/guides/">guides<span class="ct">17</span></a>- <a class="chip" href="/blog/topics/internals/">internals<span class="ct">10</span></a>+ <a class="chip" href="/blog/topics/internals/">internals<span class="ct">12</span></a>- <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">9</span></a>+ <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">10</span></a>- <a class="chip" href="/blog/topics/comparisons/" aria-current="page">comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/topics/comparisons/" aria-current="page">comparisons<span class="ct">9</span></a><a class="chip" href="/blog/topics/orchestration/">orchestration<span class="ct">7</span></a>@@ -143,6 +143,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-comparisons" href="/blog/local-first-vs-cloud-agent-sdks/" aria-hidden="true" tabindex="-1">+ <span>COMPARISONS</span>+ </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/local-first-vs-cloud-agent-sdks/">Local-First vs Cloud Agent SDKs: Which Wins in 2026?</a></h3>+ <p class="dek">Local-first agent hives vs the 2026 cloud agent SDK wave (OpenAI, Google ADK, Microsoft, MCP/A2A): what each optimizes for, and when to pick which.</p>+ <div class="foot">+ <span class="tag kind">Comparisons</span>+ <a class="more" href="/blog/local-first-vs-cloud-agent-sdks/" aria-label="Read: Local-First vs Cloud Agent SDKs: Which Wins in 2026?">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-comparisons" href="/blog/claude-squad-alternative/" aria-hidden="true" tabindex="-1"><span>COMPARISONS</span>diff --git a/docs/blog/topics/concepts/index.html b/docs/blog/topics/concepts/index.htmlindex 564d104d..ccb3a807 100644--- a/docs/blog/topics/concepts/index.html+++ b/docs/blog/topics/concepts/index.html@@ -63,18 +63,18 @@</nav><p class="eyebrow">Topic</p><h1>concepts</h1>- <p class="lead">9 posts in this cluster.</p>+ <p class="lead">10 posts in this cluster.</p><div class="filters" role="navigation" aria-label="Topics"><a class="chip" href="/blog/">All</a><a class="chip" href="/blog/topics/guides/">guides<span class="ct">17</span></a>- <a class="chip" href="/blog/topics/internals/">internals<span class="ct">10</span></a>+ <a class="chip" href="/blog/topics/internals/">internals<span class="ct">12</span></a>- <a class="chip" href="/blog/topics/concepts/" aria-current="page">concepts<span class="ct">9</span></a>+ <a class="chip" href="/blog/topics/concepts/" aria-current="page">concepts<span class="ct">10</span></a>- <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">9</span></a><a class="chip" href="/blog/topics/orchestration/">orchestration<span class="ct">7</span></a>@@ -143,6 +143,24 @@</div></div></article>+<article class="card">+ <a class="thumb t-concepts" href="/blog/long-running-agents-the-2026-shift/" aria-hidden="true" tabindex="-1">+ <span>CONCEPTS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/long-running-agents-the-2026-shift/">Long-Running Agents: The 2026 Shift from Minutes to Hours</a></h3>+ <p class="dek">Agents used to answer in seconds; now they run for hours. The data behind the shift — and why a longer agent is a different problem, not just a bigger one.</p>+ <div class="foot">+ <span class="tag kind">Concepts</span>+ <a class="more" href="/blog/long-running-agents-the-2026-shift/" aria-label="Read: Long-Running Agents: The 2026 Shift from Minutes to Hours">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-concepts" href="/blog/open-source-ai-tools-on-purpose/" aria-hidden="true" tabindex="-1"><span>CONCEPTS</span>diff --git a/docs/blog/topics/guides/index.html b/docs/blog/topics/guides/index.htmlindex da3effd4..d82e7129 100644--- a/docs/blog/topics/guides/index.html+++ b/docs/blog/topics/guides/index.html@@ -70,11 +70,11 @@<a class="chip" href="/blog/topics/guides/" aria-current="page">guides<span class="ct">17</span></a>- <a class="chip" href="/blog/topics/internals/">internals<span class="ct">10</span></a>+ <a class="chip" href="/blog/topics/internals/">internals<span class="ct">12</span></a>- <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">9</span></a>+ <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">10</span></a>- <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">9</span></a><a class="chip" href="/blog/topics/orchestration/">orchestration<span class="ct">7</span></a>diff --git a/docs/blog/topics/index.html b/docs/blog/topics/index.htmlindex ebffb7ed..ce52e388 100644--- a/docs/blog/topics/index.html+++ b/docs/blog/topics/index.html@@ -79,7 +79,7 @@<span class="thumb t-internals" aria-hidden="true">INTERNALS</span><div class="body"><h3 style="color:var(--ink)">internals</h3>- <p class="dek">10 posts.</p>+ <p class="dek">12 posts.</p><div class="foot"><span class="more">View topic →</span></div></div></a>@@ -88,7 +88,7 @@<span class="thumb t-concepts" aria-hidden="true">CONCEPTS</span><div class="body"><h3 style="color:var(--ink)">concepts</h3>- <p class="dek">9 posts.</p>+ <p class="dek">10 posts.</p><div class="foot"><span class="more">View topic →</span></div></div></a>@@ -97,7 +97,7 @@<span class="thumb t-comparisons" aria-hidden="true">COMPARISONS</span><div class="body"><h3 style="color:var(--ink)">comparisons</h3>- <p class="dek">8 posts.</p>+ <p class="dek">9 posts.</p><div class="foot"><span class="more">View topic →</span></div></div></a>@@ -144,17 +144,17 @@<div class="filters" style="padding-top:36px"><span class="eyebrow" style="align-self:center">Tags</span>- <a class="chip" href="/blog/tags/multi-agent/">Multi-Agent<span class="ct">43</span></a>+ <a class="chip" href="/blog/tags/multi-agent/">Multi-Agent<span class="ct">46</span></a>- <a class="chip" href="/blog/tags/claude-code/">Claude Code<span class="ct">32</span></a>+ <a class="chip" href="/blog/tags/claude-code/">Claude Code<span class="ct">33</span></a>- <a class="chip" href="/blog/tags/internals/">Internals<span class="ct">15</span></a>+ <a class="chip" href="/blog/tags/internals/">Internals<span class="ct">17</span></a><a class="chip" href="/blog/tags/orchestration/">Orchestration<span class="ct">12</span></a><a class="chip" href="/blog/tags/guides/">Guides<span class="ct">11</span></a>- <a class="chip" href="/blog/tags/comparisons/">Comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/tags/comparisons/">Comparisons<span class="ct">9</span></a><a class="chip" href="/blog/tags/tools/">Tools<span class="ct">8</span></a>@@ -170,6 +170,8 @@<a class="chip" href="/blog/tags/use-cases/">Use Cases<span class="ct">4</span></a>+ <a class="chip" href="/blog/tags/local-first/">Local-First<span class="ct">4</span></a>+<a class="chip" href="/blog/tags/autonomous/">Autonomous<span class="ct">4</span></a><a class="chip" href="/blog/tags/workflow/">Workflow<span class="ct">3</span></a>@@ -180,8 +182,6 @@<a class="chip" href="/blog/tags/story/">Story<span class="ct">3</span></a>- <a class="chip" href="/blog/tags/local-first/">Local-First<span class="ct">3</span></a>-<a class="chip" href="/blog/tags/terminals/">Terminals<span class="ct">3</span></a><a class="chip" href="/blog/tags/electron/">Electron<span class="ct">3</span></a>@@ -190,10 +190,14 @@<a class="chip" href="/blog/tags/god/">GOD<span class="ct">2</span></a>+ <a class="chip" href="/blog/tags/messaging/">Messaging<span class="ct">2</span></a>+<a class="chip" href="/blog/tags/guardrails/">Guardrails<span class="ct">2</span></a><a class="chip" href="/blog/tags/git/">Git<span class="ct">2</span></a>+ <a class="chip" href="/blog/tags/concurrency/">Concurrency<span class="ct">2</span></a>+<a class="chip" href="/blog/tags/pixijs/">Pixi.js<span class="ct">2</span></a><a class="chip" href="/blog/tags/visualization/">Visualization<span class="ct">2</span></a>@@ -202,6 +206,10 @@<a class="chip" href="/blog/tags/xtermjs/">xterm.js<span class="ct">2</span></a>+ <a class="chip" href="/blog/tags/hooks/">Hooks<span class="ct">2</span></a>++ <a class="chip" href="/blog/tags/mcp/">MCP<span class="ct">2</span></a>+<a class="chip" href="/blog/tags/performance/">Performance<span class="ct">2</span></a><a class="chip" href="/blog/tags/security/">Security<span class="ct">2</span></a>@@ -210,30 +218,24 @@<a class="chip" href="/blog/tags/cost/">Cost<span class="ct">2</span></a>+ <a class="chip" href="/blog/tags/agentic-ai/">Agentic AI<span class="ct">2</span></a>+<a class="chip" href="/blog/tags/subagents/">Subagents<span class="ct">1</span></a><a class="chip" href="/blog/tags/markdown/">Markdown<span class="ct">1</span></a><a class="chip" href="/blog/tags/coordination/">Coordination<span class="ct">1</span></a>- <a class="chip" href="/blog/tags/messaging/">Messaging<span class="ct">1</span></a>-<a class="chip" href="/blog/tags/event-log/">Event Log<span class="ct">1</span></a><a class="chip" href="/blog/tags/glossary/">Glossary<span class="ct">1</span></a><a class="chip" href="/blog/tags/faq/">FAQ<span class="ct">1</span></a>- <a class="chip" href="/blog/tags/concurrency/">Concurrency<span class="ct">1</span></a>-<a class="chip" href="/blog/tags/privacy/">Privacy<span class="ct">1</span></a><a class="chip" href="/blog/tags/game-dev/">Game Dev<span class="ct">1</span></a>- <a class="chip" href="/blog/tags/hooks/">Hooks<span class="ct">1</span></a>-- <a class="chip" href="/blog/tags/mcp/">MCP<span class="ct">1</span></a>-<a class="chip" href="/blog/tags/skills/">Skills<span class="ct">1</span></a><a class="chip" href="/blog/tags/node-pty/">node-pty<span class="ct">1</span></a>@@ -248,6 +250,12 @@<a class="chip" href="/blog/tags/model-routing/">Model Routing<span class="ct">1</span></a>+ <a class="chip" href="/blog/tags/cloud-agents/">Cloud Agents<span class="ct">1</span></a>++ <a class="chip" href="/blog/tags/long-running-agents/">Long-Running Agents<span class="ct">1</span></a>++ <a class="chip" href="/blog/tags/trends/">Trends<span class="ct">1</span></a>+<a class="chip" href="/blog/tags/trust/">Trust<span class="ct">1</span></a><a class="chip" href="/blog/tags/prompt-caching/">Prompt Caching<span class="ct">1</span></a>@@ -266,8 +274,6 @@<a class="chip" href="/blog/tags/devrel/">DevRel<span class="ct">1</span></a>- <a class="chip" href="/blog/tags/agentic-ai/">Agentic AI<span class="ct">1</span></a>-<a class="chip" href="/blog/tags/industry/">Industry<span class="ct">1</span></a><a class="chip" href="/blog/tags/protocols/">Protocols<span class="ct">1</span></a>diff --git a/docs/blog/topics/internals/index.html b/docs/blog/topics/internals/index.htmlindex 85657acb..5defa5d0 100644--- a/docs/blog/topics/internals/index.html+++ b/docs/blog/topics/internals/index.html@@ -63,18 +63,18 @@</nav><p class="eyebrow">Topic</p><h1>internals</h1>- <p class="lead">10 posts in this cluster.</p>+ <p class="lead">12 posts in this cluster.</p><div class="filters" role="navigation" aria-label="Topics"><a class="chip" href="/blog/">All</a><a class="chip" href="/blog/topics/guides/">guides<span class="ct">17</span></a>- <a class="chip" href="/blog/topics/internals/" aria-current="page">internals<span class="ct">10</span></a>+ <a class="chip" href="/blog/topics/internals/" aria-current="page">internals<span class="ct">12</span></a>- <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">9</span></a>+ <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">10</span></a>- <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">9</span></a><a class="chip" href="/blog/topics/orchestration/">orchestration<span class="ct">7</span></a>@@ -107,6 +107,42 @@</div></div></article>+<article class="card">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a>+ </div>+ </div>+</article>+<article class="card">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1">+ <span>INTERNALS</span>+ </a>+ <div class="body">+ <div class="meta">+ <time datetime="2026-06-04">Jun 4, 2026</time>+ <span class="dot" aria-hidden="true"></span>+ <span>6 min</span>+ </div>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p>+ <div class="foot">+ <span class="tag kind">Internals</span>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a>+ </div>+ </div>+</article><article class="card"><a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span>diff --git a/docs/blog/topics/memory/index.html b/docs/blog/topics/memory/index.htmlindex 4865093d..284a5dd2 100644--- a/docs/blog/topics/memory/index.html+++ b/docs/blog/topics/memory/index.html@@ -70,11 +70,11 @@<a class="chip" href="/blog/topics/guides/">guides<span class="ct">17</span></a>- <a class="chip" href="/blog/topics/internals/">internals<span class="ct">10</span></a>+ <a class="chip" href="/blog/topics/internals/">internals<span class="ct">12</span></a>- <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">9</span></a>+ <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">10</span></a>- <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">9</span></a><a class="chip" href="/blog/topics/orchestration/">orchestration<span class="ct">7</span></a>diff --git a/docs/blog/topics/orchestration/index.html b/docs/blog/topics/orchestration/index.htmlindex b8e887e1..fc60c387 100644--- a/docs/blog/topics/orchestration/index.html+++ b/docs/blog/topics/orchestration/index.html@@ -70,11 +70,11 @@<a class="chip" href="/blog/topics/guides/">guides<span class="ct">17</span></a>- <a class="chip" href="/blog/topics/internals/">internals<span class="ct">10</span></a>+ <a class="chip" href="/blog/topics/internals/">internals<span class="ct">12</span></a>- <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">9</span></a>+ <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">10</span></a>- <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">9</span></a><a class="chip" href="/blog/topics/orchestration/" aria-current="page">orchestration<span class="ct">7</span></a>diff --git a/docs/blog/topics/story/index.html b/docs/blog/topics/story/index.htmlindex e37f771c..ae434f72 100644--- a/docs/blog/topics/story/index.html+++ b/docs/blog/topics/story/index.html@@ -70,11 +70,11 @@<a class="chip" href="/blog/topics/guides/">guides<span class="ct">17</span></a>- <a class="chip" href="/blog/topics/internals/">internals<span class="ct">10</span></a>+ <a class="chip" href="/blog/topics/internals/">internals<span class="ct">12</span></a>- <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">9</span></a>+ <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">10</span></a>- <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">9</span></a><a class="chip" href="/blog/topics/orchestration/">orchestration<span class="ct">7</span></a>diff --git a/docs/blog/topics/use-cases/index.html b/docs/blog/topics/use-cases/index.htmlindex e301f59b..a7020c51 100644--- a/docs/blog/topics/use-cases/index.html+++ b/docs/blog/topics/use-cases/index.html@@ -70,11 +70,11 @@<a class="chip" href="/blog/topics/guides/">guides<span class="ct">17</span></a>- <a class="chip" href="/blog/topics/internals/">internals<span class="ct">10</span></a>+ <a class="chip" href="/blog/topics/internals/">internals<span class="ct">12</span></a>- <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">9</span></a>+ <a class="chip" href="/blog/topics/concepts/">concepts<span class="ct">10</span></a>- <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">8</span></a>+ <a class="chip" href="/blog/topics/comparisons/">comparisons<span class="ct">9</span></a><a class="chip" href="/blog/topics/orchestration/">orchestration<span class="ct">7</span></a>diff --git a/docs/blog/visualizing-ai-agents-pixijs/index.html b/docs/blog/visualizing-ai-agents-pixijs/index.htmlindex cf53c4b6..45a4c59e 100644--- a/docs/blog/visualizing-ai-agents-pixijs/index.html+++ b/docs/blog/visualizing-ai-agents-pixijs/index.html@@ -299,38 +299,38 @@ to see your agents at work; it’s free and open source.</p></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/recovering-from-agent-failures/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span>- <span>8 min</span>+ <span>6 min</span></div>- <h3><a href="/blog/building-a-terminal-ui-xterm-node-pty/">Building a Terminal UI with xterm.js and node-pty</a></h3>- <p class="dek">Wire xterm.js to a node-pty backend: stream output, write keystrokes back, handle resize, and keep many live terminals fast with a terminal pool.</p>+ <h3><a href="/blog/recovering-from-agent-failures/">Recovering From Agent Failures: Resilience Patterns for a Hive</a></h3>+ <p class="dek">How multi-agent systems survive partial failure: retry with stale-lock recovery, poison-message quarantine, hop-cap circuit breaking, idempotent handling.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-a-terminal-ui-xterm-node-pty/" aria-label="Read: Building a Terminal UI with xterm.js and node-pty">Read →</a>+ <a class="more" href="/blog/recovering-from-agent-failures/" aria-label="Read: Recovering From Agent Failures: Resilience Patterns for a Hive">Read →</a></div></div></article><article class="card">- <a class="thumb t-internals" href="/blog/building-an-ai-office-floor/" aria-hidden="true" tabindex="-1">+ <a class="thumb t-internals" href="/blog/the-hook-shim-pattern/" aria-hidden="true" tabindex="-1"><span>INTERNALS</span></a><div class="body"><div class="meta">- <time datetime="2026-06-03">Jun 3, 2026</time>+ <time datetime="2026-06-04">Jun 4, 2026</time><span class="dot" aria-hidden="true"></span><span>6 min</span></div>- <h3><a href="/blog/building-an-ai-office-floor/">Building an AI "Office Floor": Avatars, Pathfinding, Envelopes</a></h3>- <p class="dek">The game-dev techniques behind a dev tool's office floor: Tiled maps, BFS pathfinding, sprite recoloring, and flying message envelopes in Pixi.js.</p>+ <h3><a href="/blog/the-hook-shim-pattern/">The Hook Shim Pattern: Wiring Agent Hooks to a Live Process</a></h3>+ <p class="dek">How a tiny shim bridges Claude Code's lifecycle hooks to one live process over a Unix socket, turning per-event hooks into a telemetry and control channel.</p><div class="foot"><span class="tag kind">Internals</span>- <a class="more" href="/blog/building-an-ai-office-floor/" aria-label="Read: Building an AI "Office Floor": Avatars, Pathfinding, Envelopes">Read →</a>+ <a class="more" href="/blog/the-hook-shim-pattern/" aria-label="Read: The Hook Shim Pattern: Wiring Agent Hooks to a Live Process">Read →</a></div></div></article>diff --git a/docs/sitemap.xml b/docs/sitemap.xmlindex 8b68e494..b24a5bce 100644--- a/docs/sitemap.xml+++ b/docs/sitemap.xml@@ -125,6 +125,18 @@<changefreq>monthly</changefreq><priority>0.8</priority></url>+ <url>+ <loc>https://munderdiffl.in/blog/local-first-vs-cloud-agent-sdks/</loc>+ <lastmod>2026-06-04</lastmod>+ <changefreq>monthly</changefreq>+ <priority>0.8</priority>+ </url>+ <url>+ <loc>https://munderdiffl.in/blog/long-running-agents-the-2026-shift/</loc>+ <lastmod>2026-06-04</lastmod>+ <changefreq>monthly</changefreq>+ <priority>0.8</priority>+ </url><url><loc>https://munderdiffl.in/blog/open-source-ai-tools-on-purpose/</loc><lastmod>2026-06-04</lastmod>@@ -143,6 +155,12 @@<changefreq>monthly</changefreq><priority>0.8</priority></url>+ <url>+ <loc>https://munderdiffl.in/blog/recovering-from-agent-failures/</loc>+ <lastmod>2026-06-04</lastmod>+ <changefreq>monthly</changefreq>+ <priority>0.8</priority>+ </url><url><loc>https://munderdiffl.in/blog/scheduling-autonomous-agent-missions/</loc><lastmod>2026-06-04</lastmod>@@ -161,6 +179,12 @@<changefreq>monthly</changefreq><priority>0.8</priority></url>+ <url>+ <loc>https://munderdiffl.in/blog/the-hook-shim-pattern/</loc>+ <lastmod>2026-06-04</lastmod>+ <changefreq>monthly</changefreq>+ <priority>0.8</priority>+ </url><url><loc>https://munderdiffl.in/blog/the-office-parody-behind-munder-difflin/</loc><lastmod>2026-06-04</lastmod>@@ -410,38 +434,39 @@<url><loc>https://munderdiffl.in/blog/tags/automation/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/mempalace/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/use-cases/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>+ <url><loc>https://munderdiffl.in/blog/tags/local-first/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/autonomous/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/workflow/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/observability/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/human-in-the-loop/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/story/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>- <url><loc>https://munderdiffl.in/blog/tags/local-first/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/terminals/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/electron/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/hive/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/god/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>+ <url><loc>https://munderdiffl.in/blog/tags/messaging/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/guardrails/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/git/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>+ <url><loc>https://munderdiffl.in/blog/tags/concurrency/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/pixijs/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/visualization/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/open-source/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/xtermjs/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>+ <url><loc>https://munderdiffl.in/blog/tags/hooks/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>+ <url><loc>https://munderdiffl.in/blog/tags/mcp/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/performance/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/security/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/reliability/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/cost/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>+ <url><loc>https://munderdiffl.in/blog/tags/agentic-ai/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/subagents/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/markdown/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/coordination/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>- <url><loc>https://munderdiffl.in/blog/tags/messaging/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/event-log/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/glossary/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/faq/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>- <url><loc>https://munderdiffl.in/blog/tags/concurrency/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/privacy/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/game-dev/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>- <url><loc>https://munderdiffl.in/blog/tags/hooks/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>- <url><loc>https://munderdiffl.in/blog/tags/mcp/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/skills/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/node-pty/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/architecture/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>@@ -449,6 +474,9 @@<url><loc>https://munderdiffl.in/blog/tags/context-engineering/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/debugging/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/model-routing/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>+ <url><loc>https://munderdiffl.in/blog/tags/cloud-agents/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>+ <url><loc>https://munderdiffl.in/blog/tags/long-running-agents/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>+ <url><loc>https://munderdiffl.in/blog/tags/trends/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/trust/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/prompt-caching/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/brand/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>@@ -458,7 +486,6 @@<url><loc>https://munderdiffl.in/blog/tags/aeo/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/seo/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/devrel/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>- <url><loc>https://munderdiffl.in/blog/tags/agentic-ai/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/industry/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/protocols/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url><url><loc>https://munderdiffl.in/blog/tags/tutorial/</loc><changefreq>weekly</changefreq><priority>0.3</priority></url>