<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Herdr on Nick Liu - Software Engineer</title><link>https://nick-liu.com/tags/herdr/</link><description>Recent content in Herdr on Nick Liu - Software Engineer</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>nickboy@users.noreply.github.com (Nick Liu)</managingEditor><webMaster>nickboy@users.noreply.github.com (Nick Liu)</webMaster><copyright>2026 Nick Liu</copyright><lastBuildDate>Sun, 30 Aug 2026 00:52:14 -0700</lastBuildDate><atom:link href="https://nick-liu.com/tags/herdr/index.xml" rel="self" type="application/rss+xml"/><item><title>The installer stamped an ID it never read. It reinstalled over itself.</title><link>https://nick-liu.com/posts/state-inferred-from-derivative/</link><pubDate>Sun, 06 Sep 2026 00:00:00 +0000</pubDate><author>nickboy@users.noreply.github.com (Nick Liu)</author><guid>https://nick-liu.com/posts/state-inferred-from-derivative/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; &#10;An installer writes a script. It stamps that script with `HERDR_INTEGRATION_ID=claude`, an identifier that exists for no reason other than to say "I made this". Then, to decide whether it has already run, it ignores that stamp entirely and compares the rendered command string in a config file. Rewrite the command to an equivalent form and the installer no longer recognises its own work, so it installs a second copy alongside the first.&#10;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;I hit three bugs in three days. They looked unrelated until I wrote them down next to each other: one in someone else&amp;rsquo;s tool, two in a plugin of mine. They share a shape, and the shape is worth more than any of the three fixes.&lt;/p&gt;</description><content:encoded>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; &#10;An installer writes a script. It stamps that script with `HERDR_INTEGRATION_ID=claude`, an identifier that exists for no reason other than to say "I made this". Then, to decide whether it has already run, it ignores that stamp entirely and compares the rendered command string in a config file. Rewrite the command to an equivalent form and the installer no longer recognises its own work, so it installs a second copy alongside the first.&#10;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;I hit three bugs in three days. They looked unrelated until I wrote them down next to each other: one in someone else&amp;rsquo;s tool, two in a plugin of mine. They share a shape, and the shape is worth more than any of the three fixes.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;State inferred from a derived value rather than read from the component that owns it.&lt;/strong&gt;&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Case one: the installer that did not recognise its own work&#10; &lt;div id="case-one-the-installer-that-did-not-recognise-its-own-work" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#case-one-the-installer-that-did-not-recognise-its-own-work" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;herdr integration install claude&lt;/code&gt; wires herdr into Claude Code by adding a hook to &lt;code&gt;settings.json&lt;/code&gt;. To be re-runnable, it has to answer one question first: have I already done this?&lt;/p&gt;&#10;&lt;p&gt;It answers it by rendering the command string it would write, and checking whether that exact string is present in &lt;code&gt;settings.json&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;That works for exactly as long as nobody touches the file. Rewrite the command to an equivalent portable form, say because you want it to work on a machine where the binary lives somewhere else, and the string no longer matches. The installer concludes it has never run, and appends a duplicate hook. Now every event fires the integration twice.&lt;/p&gt;&#10;&lt;p&gt;The frustrating part is that the correct answer was already in the file. The installer generates a script and stamps it:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HERDR_INTEGRATION_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;claude&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;That is an unambiguous identity, authored by the installer, for the installer, surviving any amount of reformatting of the command that invokes it. And the check does not consult it.&lt;/p&gt;&#10;&lt;p&gt;I reproduced this first-hand in a sandboxed &lt;code&gt;CLAUDE_CONFIG_DIR&lt;/code&gt; rather than against my real config, which I recommend for anything that mutates a settings file you care about, and reported it upstream.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Case two: the rename check that could never repair anything&#10; &lt;div id="case-two-the-rename-check-that-could-never-repair-anything" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#case-two-the-rename-check-that-could-never-repair-anything" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;I wrote a herdr plugin during &lt;a href="https://nick-liu.com/posts/herdr-trial-agent-multiplexer/" &gt;my trial of it&lt;/a&gt; called &lt;code&gt;tab-smart-rename&lt;/code&gt;, which renames each tab after whatever the agent in it is currently working on.&lt;/p&gt;&#10;&lt;p&gt;To avoid renaming a tab that is already correctly named, it compared the new name against a cached session name it had stored the last time it ran.&lt;/p&gt;&#10;&lt;p&gt;Consider what happens the moment anything else changes the tab label. Another plugin, a manual rename, herdr itself. The cache still holds the last name this plugin set. The new name matches the cache. So the plugin concludes nothing has changed and does nothing, and the label stays wrong forever.&lt;/p&gt;&#10;&lt;p&gt;The check is not comparing &amp;ldquo;what the tab says&amp;rdquo; to &amp;ldquo;what the tab should say&amp;rdquo;. It is comparing &amp;ldquo;what I last decided&amp;rdquo; to &amp;ldquo;what I would decide now&amp;rdquo;, which are two views of the same opinion. From its own point of view nothing had changed, and it was right. It just was not looking at the tab.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Case three: the tab id that came from the environment&#10; &lt;div id="case-three-the-tab-id-that-came-from-the-environment" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#case-three-the-tab-id-that-came-from-the-environment" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Same plugin. To know which tab to rename, it read a tab id from an inherited environment variable.&lt;/p&gt;&#10;&lt;p&gt;Environment variables are inherited by children, which is the entire point of them, and it makes them a terrible source of truth for &amp;ldquo;where am I right now&amp;rdquo;. Launch a session from one pane while working in another and the new process carries the &lt;em&gt;launching&lt;/em&gt; pane&amp;rsquo;s id. The plugin then confidently renames a tab that has nothing to do with the agent it is watching.&lt;/p&gt;&#10;&lt;p&gt;This is a bug class I have hit before and written about, in a different costume. &lt;a href="https://nick-liu.com/posts/herdr-trial-agent-multiplexer/" &gt;The &lt;code&gt;CLAUDECODE=1&lt;/code&gt; leak&lt;/a&gt; had the same root: an environment flag treated as a statement about the current process when it is really a statement about some ancestor. The reliable answer there was to walk the process tree and let ancestry decide, and the reliable answer here is to ask the multiplexer which pane this is.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The shape&#10; &lt;div id="the-shape" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-shape" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Bug&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;It compared&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;The owner of the truth&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Result&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Integration installer&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;rendered command string&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;HERDR_INTEGRATION_ID&lt;/code&gt; it wrote itself&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;duplicate hook, fires twice&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Rename check&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;its own cached name&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;the tab&amp;rsquo;s actual label&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;can never repair a drifted label&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Tab id resolution&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;inherited env var&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;the pane the process is really in&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;renames a tab it does not own&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;In each case the derivative drifts from the thing it stands for, and nothing notices, because the code is comparing the derivative to itself.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Why this class is so quiet&#10; &lt;div id="why-this-class-is-so-quiet" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#why-this-class-is-so-quiet" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;The tell is that the failure is silent &lt;em&gt;and self-consistent&lt;/em&gt;. Every component reports success.&lt;/p&gt;&#10;&lt;p&gt;The installer succeeded. It wrote a valid hook to a valid file and exited zero. The rename check succeeded, and it was correct given its premises. The tab id resolution succeeded, and it renamed a tab that genuinely exists.&lt;/p&gt;&#10;&lt;p&gt;There is no exception, no error path, no log line, and nothing to alert on, because from the inside nothing went wrong. You find these by noticing an outcome that is wrong in the world, not by noticing a failure in the system, and that is a much slower loop. It is the same reason &lt;a href="https://nick-liu.com/posts/silent-failures-env-shadow/" &gt;a shell function that swallows commands with exit 0&lt;/a&gt; is so much worse than one that crashes.&lt;/p&gt;&#10;&lt;p&gt;There is a second-order effect that makes it worse still. A derived value that drifts tends to drift &lt;em&gt;further&lt;/em&gt; over time, because the mechanism that would correct it is the mechanism that is broken. The rename check is the clearest version: the longer the label is wrong, the more certain the plugin is that everything is fine.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;What to do instead&#10; &lt;div id="what-to-do-instead" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-to-do-instead" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;The fix in all three cases is the same sentence: ask the component that owns the state.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The installer should read its own stamp. It went to the trouble of writing an identity; identity is what identity is for.&lt;/li&gt;&#10;&lt;li&gt;The rename check should read the tab&amp;rsquo;s current label, which is one call away, rather than what it remembers setting.&lt;/li&gt;&#10;&lt;li&gt;The tab id should come from the multiplexer&amp;rsquo;s notion of the current pane, not from an environment variable that any parent may have set.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The general test is a question you can ask about any comparison in a codebase: &lt;strong&gt;if the world changed underneath this check, would it notice?&lt;/strong&gt; If both sides of the comparison come from the same place, the answer is no, and you have written a check that can only ever agree with itself.&lt;/p&gt;&#10;&lt;p&gt;A related smell, and the one that caught the installer for me: if a component authors an identifier and then does not read it, either the identifier is dead code or the reader is looking in the wrong place. It is almost never the former.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Lessons&#10; &lt;div id="lessons" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#lessons" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Read state from the component that owns it. A derived value is a copy, and copies drift.&lt;/li&gt;&#10;&lt;li&gt;If a check compares two things that both come from you, it can only agree with itself. Ask whether the check would notice a change made by anything else.&lt;/li&gt;&#10;&lt;li&gt;An identity you write and never read is a bug waiting to be filed. The installer stamped &lt;code&gt;HERDR_INTEGRATION_ID&lt;/code&gt; and then decided idempotency by string-matching a command it also wrote.&lt;/li&gt;&#10;&lt;li&gt;Idempotency means recognising your own work after someone reformats it. Matching on rendered output makes any equivalent rewrite look like a fresh install.&lt;/li&gt;&#10;&lt;li&gt;Environment variables describe an ancestor, not the current process. For &amp;ldquo;where am I now&amp;rdquo;, ask the thing that knows.&lt;/li&gt;&#10;&lt;li&gt;This class fails silently and self-consistently, so every component reports success. You will find it by noticing a wrong outcome in the world, never by noticing a failure in the system.&lt;/li&gt;&#10;&lt;li&gt;Reproduce config-mutating bugs in a sandboxed config directory. &lt;code&gt;CLAUDE_CONFIG_DIR&lt;/code&gt; cost me nothing and meant the duplicate hook landed somewhere disposable.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h2 class="relative group"&gt;References&#10; &lt;div id="references" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#references" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;herdr: &lt;a href="https://herdr.dev" target="_blank" rel="noreferrer"&gt;https://herdr.dev&lt;/a&gt; (source: &lt;a href="https://github.com/herdrdev/herdr" target="_blank" rel="noreferrer"&gt;https://github.com/herdrdev/herdr&lt;/a&gt;)&lt;/li&gt;&#10;&lt;li&gt;Claude Code settings and hooks reference: &lt;a href="https://code.claude.com/docs/en/hooks" target="_blank" rel="noreferrer"&gt;https://code.claude.com/docs/en/hooks&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;The trial the two plugin bugs came out of: &lt;a href="https://nick-liu.com/posts/herdr-trial-agent-multiplexer/" &gt;Running six agents made tab patrol my biggest time sink. So: a herdr trial.&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;The same silence, different costume: &lt;a href="https://nick-liu.com/posts/silent-failures-env-shadow/" &gt;My commands vanished with exit 0. The culprit was a file named env.&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;The project that surfaced the installer bug: &lt;a href="https://nick-liu.com/posts/herddeck-substrate-bet/" &gt;I deleted six subsystems by swapping one dependency.&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</content:encoded></item><item><title>Every context ring read 10%. Two bugs, and fixing one hid the other.</title><link>https://nick-liu.com/posts/herddeck-frozen-context-ring/</link><pubDate>Tue, 01 Sep 2026 00:00:00 +0000</pubDate><author>nickboy@users.noreply.github.com (Nick Liu)</author><guid>https://nick-liu.com/posts/herddeck-frozen-context-ring/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; &#10;Each agent key on the Stream Deck draws a ring showing how full that session's context window is. Mine sat at 10% for days. Every session, regardless of activity, regardless of how long the agent had been grinding. I found the bug, fixed it, watched agents start reporting correct percentages every single turn, and the ring still said 10%. That was the good part, because it meant there were two.&#10;&#10;&lt;/div&gt;&#10;&#10;&lt;nav class="series-progress" aria-label="Series progress"&gt;&#10; &lt;span class="series-progress-label"&gt;Deleting ClaudeDeck · Part 3 of 5&lt;/span&gt;&#10; &lt;ol class="series-progress-dots"&gt;&lt;li class="series-progress-dot is-done"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-substrate-bet/" title="I deleted six subsystems by swapping one dependency. The protocol billed me."&gt;1&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot is-done"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-backoff-wrong-question/" title="My backoff logged errors=1 492 times. It was answering the wrong question."&gt;2&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot is-current"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-frozen-context-ring/" title="Every context ring read 10%. Two bugs, and fixing one hid the other." aria-current="step"&gt;3&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-ring-read-backwards/" title="The ring was 1.00:1 against its background. The key read 35% at 65%."&gt;4&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-ssh-tunnel-lies/" title="The tunnel was up. The socket existed. Nothing was on the other end."&gt;5&lt;/a&gt;&#10; &lt;/li&gt;&lt;/ol&gt;&#10; &lt;/nav&gt;&#10;&lt;div class="tested-with" role="note"&gt;&#10; &lt;span class="tested-with-icon" aria-hidden="true"&gt;🧪&lt;/span&gt;&#10; &lt;span&gt;Tested with &lt;strong&gt;Claude Code&lt;/strong&gt; &lt;code&gt;2.1.x&lt;/code&gt; · macOS&lt;/span&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;Ten percent is a suspicious number. Not zero, which would say &amp;ldquo;nothing ever arrived&amp;rdquo;. Not a plausible-looking 37%, which would say &amp;ldquo;this works and your session is small&amp;rdquo;. Ten percent is round, and round numbers in a display that should be noisy mean the display is not reading anything.&lt;/p&gt;</description><content:encoded>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; &#10;Each agent key on the Stream Deck draws a ring showing how full that session's context window is. Mine sat at 10% for days. Every session, regardless of activity, regardless of how long the agent had been grinding. I found the bug, fixed it, watched agents start reporting correct percentages every single turn, and the ring still said 10%. That was the good part, because it meant there were two.&#10;&#10;&lt;/div&gt;&#10;&#10;&lt;nav class="series-progress" aria-label="Series progress"&gt;&#10; &lt;span class="series-progress-label"&gt;Deleting ClaudeDeck · Part 3 of 5&lt;/span&gt;&#10; &lt;ol class="series-progress-dots"&gt;&lt;li class="series-progress-dot is-done"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-substrate-bet/" title="I deleted six subsystems by swapping one dependency. The protocol billed me."&gt;1&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot is-done"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-backoff-wrong-question/" title="My backoff logged errors=1 492 times. It was answering the wrong question."&gt;2&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot is-current"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-frozen-context-ring/" title="Every context ring read 10%. Two bugs, and fixing one hid the other." aria-current="step"&gt;3&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-ring-read-backwards/" title="The ring was 1.00:1 against its background. The key read 35% at 65%."&gt;4&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-ssh-tunnel-lies/" title="The tunnel was up. The socket existed. Nothing was on the other end."&gt;5&lt;/a&gt;&#10; &lt;/li&gt;&lt;/ol&gt;&#10; &lt;/nav&gt;&#10;&lt;div class="tested-with" role="note"&gt;&#10; &lt;span class="tested-with-icon" aria-hidden="true"&gt;🧪&lt;/span&gt;&#10; &lt;span&gt;Tested with &lt;strong&gt;Claude Code&lt;/strong&gt; &lt;code&gt;2.1.x&lt;/code&gt; · macOS&lt;/span&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;Ten percent is a suspicious number. Not zero, which would say &amp;ldquo;nothing ever arrived&amp;rdquo;. Not a plausible-looking 37%, which would say &amp;ldquo;this works and your session is small&amp;rdquo;. Ten percent is round, and round numbers in a display that should be noisy mean the display is not reading anything.&lt;/p&gt;&#10;&lt;p&gt;It turned out to be an orphan. Something wrote 10% into the cache a long time ago and nothing had overwritten it since, on any session, for days.&lt;/p&gt;&#10;&lt;ol class="border-s-2 border-primary-500 dark:border-primary-300 list-none"&gt;&#10;&#10;&#10;&#10;&#10;&#10;&lt;li&gt;&#10; &lt;div class="flex"&gt;&#10; &lt;div&#10; class="bg-primary-500 dark:bg-primary-300 text-neutral-50 dark:text-neutral-700 min-w-[30px] h-8 text-2xl flex items-center justify-center rounded-full ltr:-ml-12 rtl:-mr-[79px] mt-5"&gt;&#10; &lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"&gt;&lt;path fill="currentColor" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/&gt;&lt;/svg&gt;&#10;&lt;/span&gt;&#10; &lt;/div&gt;&#10; &lt;div class="block p-6 rounded-lg shadow-2xl flex-1 ms-6 mb-10 break-words"&gt;&#10; &lt;div class="flex justify-between"&gt;&#10; &#10; &lt;h2 class="mt-0"&gt;Symptom&lt;/h2&gt;&#10; &#10; &#10; &lt;h3 class=""&gt;&#10; &lt;span class="flex cursor-pointer"&gt;&#10; &#10; &#10; &#10; &#10; &lt;span&#10; class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"&gt;&#10; &#10; day 1&#10; &lt;/span&gt;&#10;&lt;/span&gt;&#10;&#10; &lt;/h3&gt;&#10; &#10; &lt;/div&gt;&#10; &#10; &lt;div class="mb-6"&gt;&#10; Ring pinned at 10% on every agent slot. Suspiciously round.&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10;&lt;/li&gt;&#10;&#10;&#10;&#10;&#10;&#10;&lt;li&gt;&#10; &lt;div class="flex"&gt;&#10; &lt;div&#10; class="bg-primary-500 dark:bg-primary-300 text-neutral-50 dark:text-neutral-700 min-w-[30px] h-8 text-2xl flex items-center justify-center rounded-full ltr:-ml-12 rtl:-mr-[79px] mt-5"&gt;&#10; &lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"&gt;&#10;&lt;path fill="currentColor" d="M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"/&gt;&lt;/svg&gt;&lt;/span&gt;&#10; &lt;/div&gt;&#10; &lt;div class="block p-6 rounded-lg shadow-2xl flex-1 ms-6 mb-10 break-words"&gt;&#10; &lt;div class="flex justify-between"&gt;&#10; &#10; &lt;h2 class="mt-0"&gt;Bug one found&lt;/h2&gt;&#10; &#10; &#10; &lt;h3 class=""&gt;&#10; &lt;span class="flex cursor-pointer"&gt;&#10; &#10; &#10; &#10; &#10; &lt;span&#10; class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"&gt;&#10; &#10; day 1&#10; &lt;/span&gt;&#10;&lt;/span&gt;&#10;&#10; &lt;/h3&gt;&#10; &#10; &lt;/div&gt;&#10; &#10; &lt;div class="mb-6"&gt;&#10; The statusline delegate reads &lt;code&gt;.context_window.percentUsed&lt;/code&gt;. Claude Code emits &lt;code&gt;.context_window.used_percentage&lt;/code&gt;. The extraction silently yields nothing, every turn.&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10;&lt;/li&gt;&#10;&#10;&#10;&#10;&#10;&#10;&lt;li&gt;&#10; &lt;div class="flex"&gt;&#10; &lt;div&#10; class="bg-primary-500 dark:bg-primary-300 text-neutral-50 dark:text-neutral-700 min-w-[30px] h-8 text-2xl flex items-center justify-center rounded-full ltr:-ml-12 rtl:-mr-[79px] mt-5"&gt;&#10; &lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"&gt;&#10;&lt;path fill="currentColor" d="M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"/&gt;&lt;/svg&gt;&lt;/span&gt;&#10; &lt;/div&gt;&#10; &lt;div class="block p-6 rounded-lg shadow-2xl flex-1 ms-6 mb-10 break-words"&gt;&#10; &lt;div class="flex justify-between"&gt;&#10; &#10; &lt;h2 class="mt-0"&gt;Fixed, and wrong&lt;/h2&gt;&#10; &#10; &#10; &lt;h3 class=""&gt;&#10; &lt;span class="flex cursor-pointer"&gt;&#10; &#10; &#10; &#10; &#10; &lt;span&#10; class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"&gt;&#10; &#10; day 2&#10; &lt;/span&gt;&#10;&lt;/span&gt;&#10;&#10; &lt;/h3&gt;&#10; &#10; &lt;/div&gt;&#10; &#10; &lt;div class="mb-6"&gt;&#10; Agents now report a correct percentage every turn. The ring still reads 10%.&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10;&lt;/li&gt;&#10;&#10;&#10;&#10;&#10;&#10;&lt;li&gt;&#10; &lt;div class="flex"&gt;&#10; &lt;div&#10; class="bg-primary-500 dark:bg-primary-300 text-neutral-50 dark:text-neutral-700 min-w-[30px] h-8 text-2xl flex items-center justify-center rounded-full ltr:-ml-12 rtl:-mr-[79px] mt-5"&gt;&#10; &lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"&gt;&lt;path fill="currentColor" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/&gt;&lt;/svg&gt;&#10;&lt;/span&gt;&#10; &lt;/div&gt;&#10; &lt;div class="block p-6 rounded-lg shadow-2xl flex-1 ms-6 mb-10 break-words"&gt;&#10; &lt;div class="flex justify-between"&gt;&#10; &#10; &lt;h2 class="mt-0"&gt;Three live probes&lt;/h2&gt;&#10; &#10; &#10; &lt;h3 class=""&gt;&#10; &lt;span class="flex cursor-pointer"&gt;&#10; &#10; &#10; &#10; &#10; &lt;span&#10; class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"&gt;&#10; &#10; day 2&#10; &lt;/span&gt;&#10;&lt;/span&gt;&#10;&#10; &lt;/h3&gt;&#10; &#10; &lt;/div&gt;&#10; &#10; &lt;div class="mb-6"&gt;&#10; &lt;code&gt;pane.report_metadata&lt;/code&gt; emits nothing. &lt;code&gt;pane.agent_status_changed&lt;/code&gt; carries no tokens. Tokens are assigned in exactly one place.&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10;&lt;/li&gt;&#10;&#10;&#10;&#10;&#10;&#10;&lt;li&gt;&#10; &lt;div class="flex"&gt;&#10; &lt;div&#10; class="bg-primary-500 dark:bg-primary-300 text-neutral-50 dark:text-neutral-700 min-w-[30px] h-8 text-2xl flex items-center justify-center rounded-full ltr:-ml-12 rtl:-mr-[79px] mt-5"&gt;&#10; &lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"&gt;&lt;path fill="currentColor" d="M172.5 131.1C228.1 75.51 320.5 75.51 376.1 131.1C426.1 181.1 433.5 260.8 392.4 318.3L391.3 319.9C381 334.2 361 337.6 346.7 327.3C332.3 317 328.9 297 339.2 282.7L340.3 281.1C363.2 249 359.6 205.1 331.7 177.2C300.3 145.8 249.2 145.8 217.7 177.2L105.5 289.5C73.99 320.1 73.99 372 105.5 403.5C133.3 431.4 177.3 435 209.3 412.1L210.9 410.1C225.3 400.7 245.3 404 255.5 418.4C265.8 432.8 262.5 452.8 248.1 463.1L246.5 464.2C188.1 505.3 110.2 498.7 60.21 448.8C3.741 392.3 3.741 300.7 60.21 244.3L172.5 131.1zM467.5 380C411 436.5 319.5 436.5 263 380C213 330 206.5 251.2 247.6 193.7L248.7 192.1C258.1 177.8 278.1 174.4 293.3 184.7C307.7 194.1 311.1 214.1 300.8 229.3L299.7 230.9C276.8 262.1 280.4 306.9 308.3 334.8C339.7 366.2 390.8 366.2 422.3 334.8L534.5 222.5C566 191 566 139.1 534.5 108.5C506.7 80.63 462.7 76.99 430.7 99.9L429.1 101C414.7 111.3 394.7 107.1 384.5 93.58C374.2 79.2 377.5 59.21 391.9 48.94L393.5 47.82C451 6.731 529.8 13.25 579.8 63.24C636.3 119.7 636.3 211.3 579.8 267.7L467.5 380z"/&gt;&lt;/svg&gt;&#10;&lt;/span&gt;&#10; &lt;/div&gt;&#10; &lt;div class="block p-6 rounded-lg shadow-2xl flex-1 ms-6 mb-10 break-words"&gt;&#10; &lt;div class="flex justify-between"&gt;&#10; &#10; &lt;h2 class="mt-0"&gt;Root cause&lt;/h2&gt;&#10; &#10; &#10; &lt;h3 class=""&gt;&#10; &lt;span class="flex cursor-pointer"&gt;&#10; &#10; &#10; &#10; &#10; &lt;span&#10; class="rounded-md border border-primary-400 px-1 py-[1px] text-xs font-normal text-primary-700 dark:border-primary-600 dark:text-primary-400"&gt;&#10; &#10; day 2&#10; &lt;/span&gt;&#10;&lt;/span&gt;&#10;&#10; &lt;/h3&gt;&#10; &#10; &lt;/div&gt;&#10; &#10; &lt;div class="mb-6"&gt;&#10; The daemon snapshotted once on connect. Every ring froze at whatever it read at that instant.&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10; &lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;Bug one: a field name that does not exist&#10; &lt;div id="bug-one-a-field-name-that-does-not-exist" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#bug-one-a-field-name-that-does-not-exist" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;HerdDeck ships a statusline delegate. It sits in front of whatever statusline you already have, forwards the per-turn JSON payload on to herdr, and passes your original output through untouched. It read this:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;.context_window.percentUsed&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;Claude Code emits &lt;code&gt;.context_window.used_percentage&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;Getting the field name wrong is unremarkable. How it failed is the part worth keeping. A statusline script runs on every turn of every session, and a statusline script that throws takes your prompt down with it, so the whole thing is written to fall through silently on every path. Wrong field name, malformed JSON, &lt;code&gt;jq&lt;/code&gt; missing, all of it produces the same result: no error, no output, no report, forever.&lt;/p&gt;&#10;&lt;p&gt;Silent-by-design is correct for a statusline. It is also a category of bug where nothing anywhere tells you the value never arrived, and the only symptom is a number somewhere else that stops changing.&lt;/p&gt;&#10;&lt;p&gt;There is a small joke at my expense here. I wrote &lt;a href="https://nick-liu.com/posts/statusline-side-channel/" &gt;a post about this exact payload&lt;/a&gt; in May, and that post prints the schema with the correct field name in it. My own published documentation had it right. The code I shipped three months later did not.&lt;/p&gt;&#10;&lt;p&gt;The fix keeps the wrong name deliberately, which was not my first instinct:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Field name: Claude Code emits `.context_window.used_percentage`. An&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# earlier revision of this script read `.percentUsed`, which does not&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# exist — the extraction silently yielded nothing and the donut never&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# lit up. `percentUsed` is kept only as a fallback so the script also&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# works against any build that ever used it; `used_percentage` wins.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;PCT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;printf&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;%s&amp;#39;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$INPUT&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;&amp;#39;.context_window | (.used_percentage // .percentUsed // empty)&amp;#39;&lt;/span&gt; 2&amp;gt;/dev/null&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;Two tests pin the behaviour: one that the fallback works, one that &lt;code&gt;used_percentage&lt;/code&gt; wins when both are present. A silent fallback needs a test asserting the &lt;em&gt;ordering&lt;/em&gt;, or it is just a second way to be quietly wrong.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The fix worked and the ring did not move&#10; &lt;div id="the-fix-worked-and-the-ring-did-not-move" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-fix-worked-and-the-ring-did-not-move" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;This is the part of the debugging that went wrong, and it is why the post exists.&lt;/p&gt;&#10;&lt;p&gt;After the field-name fix, every agent reported a correct, changing percentage on every turn. I could watch the numbers arrive. And the ring still sat at 10%.&lt;/p&gt;&#10;&lt;p&gt;For an hour or so I was debugging the wrong thing, because the evidence pointed backwards. A fix that produces correct data and no visible change reads as &amp;ldquo;the fix did not work&amp;rdquo;. I went back over the delegate. I checked the JSON. I checked that the daemon was receiving it. All fine, all pointless, because the second bug had been there the entire time and the first one had been hiding it perfectly.&lt;/p&gt;&#10;&lt;p&gt;A cosmetic symptom with two independent causes is much harder than a symptom with one hard failure. With one cause, fixing it resolves the symptom and you are done. With two, fixing the first one changes nothing observable, and the natural inference is that you were wrong about the first one.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Three probes against a live server&#10; &lt;div id="three-probes-against-a-live-server" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#three-probes-against-a-live-server" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;So I stopped reading code and started asking the server questions. Three probes, against herdr 0.8.0, with a real agent working in a real pane.&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Probe&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Result&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Report metadata to a pane while subscribed to &lt;code&gt;pane.updated&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;strong&gt;zero events&lt;/strong&gt; for that pane. &lt;code&gt;pane.report_metadata&lt;/code&gt; emits nothing at all&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Inspect &lt;code&gt;pane.agent_status_changed&lt;/code&gt; payload&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;carries only &lt;code&gt;{pane_id, agent_status}&lt;/code&gt;. No tokens&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Grep the cache for token assignment&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;exactly one site: the &lt;code&gt;session.snapshot&lt;/code&gt; seed&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;Put those together and the answer is unavoidable. The daemon snapshotted once on connect, and every ring froze at whatever the snapshot happened to contain at that instant. Nothing in the protocol was ever going to push a token count at it.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;&lt;code&gt;pane.updated&lt;/code&gt; looked like the answer&#10; &lt;div id="paneupdated-looked-like-the-answer" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#paneupdated-looked-like-the-answer" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;There is an event called &lt;code&gt;pane.updated&lt;/code&gt; and it does carry tokens. It looked like the fix for about ten minutes.&lt;/p&gt;&#10;&lt;p&gt;It is not, for two reasons, and the second one is decisive.&lt;/p&gt;&#10;&lt;p&gt;It is chatty. It fires on scroll offsets and status flicker, and the measurement recorded in the source is roughly 25 events in 2.5 seconds from a single active pane. Subscribing to that to catch a number that changes once per turn is a poor trade.&lt;/p&gt;&#10;&lt;p&gt;And it does not fire for a metadata report at all. That is the case that matters. A pane whose context moved while it sat idle would simply never be announced, which is precisely the situation where you want the ring to be honest, because you are looking at a key rather than at the terminal.&lt;/p&gt;&#10;&lt;p&gt;Rejecting an event on measurement rather than on taste is worth doing explicitly. &lt;code&gt;pane.updated&lt;/code&gt; is the obvious answer, it is in the schema, and it would have shipped a ring that worked most of the time and lied when you were not watching.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Re-read, merge, do not re-seed&#10; &lt;div id="re-read-merge-do-not-re-seed" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#re-read-merge-do-not-re-seed" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;div class="not-prose diagram diagram-light"&gt;&lt;svg id="df72daf3532c27fe2light" width="100%" xmlns="http://www.w3.org/2000/svg" class="flowchart" style="max-width: 722.1484375px;" viewBox="0 0 722.1484375 430" role="graphics-document document" aria-roledescription="flowchart-v2"&gt;&lt;style&gt;#df72daf3532c27fe2light{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#df72daf3532c27fe2light .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#df72daf3532c27fe2light .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#df72daf3532c27fe2light .error-icon{fill:rgb(255, 255, 255);}#df72daf3532c27fe2light .error-text{fill:#000000;stroke:#000000;}#df72daf3532c27fe2light .edge-thickness-normal{stroke-width:1px;}#df72daf3532c27fe2light .edge-thickness-thick{stroke-width:3.5px;}#df72daf3532c27fe2light .edge-pattern-solid{stroke-dasharray:0;}#df72daf3532c27fe2light .edge-thickness-invisible{stroke-width:0;fill:none;}#df72daf3532c27fe2light .edge-pattern-dashed{stroke-dasharray:3;}#df72daf3532c27fe2light .edge-pattern-dotted{stroke-dasharray:2;}#df72daf3532c27fe2light .marker{fill:rgb(74, 86, 92);stroke:rgb(74, 86, 92);}#df72daf3532c27fe2light .marker.cross{stroke:rgb(74, 86, 92);}#df72daf3532c27fe2light svg{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;}#df72daf3532c27fe2light p{margin:0;}#df72daf3532c27fe2light .label{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;color:#333;}#df72daf3532c27fe2light .cluster-label text{fill:#000000;}#df72daf3532c27fe2light .cluster-label span{color:#000000;}#df72daf3532c27fe2light .cluster-label span p{background-color:transparent;}#df72daf3532c27fe2light .label text,#df72daf3532c27fe2light span{fill:#333;color:#333;}#df72daf3532c27fe2light .node rect,#df72daf3532c27fe2light .node circle,#df72daf3532c27fe2light .node ellipse,#df72daf3532c27fe2light .node polygon,#df72daf3532c27fe2light .node path{fill:rgb(255, 255, 255);stroke:rgb(204, 216, 222);stroke-width:1px;}#df72daf3532c27fe2light .rough-node .label text,#df72daf3532c27fe2light .node .label text,#df72daf3532c27fe2light .image-shape .label,#df72daf3532c27fe2light .icon-shape .label{text-anchor:middle;}#df72daf3532c27fe2light .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#df72daf3532c27fe2light .rough-node .label,#df72daf3532c27fe2light .node .label,#df72daf3532c27fe2light .image-shape .label,#df72daf3532c27fe2light .icon-shape .label{text-align:center;}#df72daf3532c27fe2light .node.clickable{cursor:pointer;}#df72daf3532c27fe2light .root .anchor path{fill:rgb(74, 86, 92)!important;stroke-width:0;stroke:rgb(74, 86, 92);}#df72daf3532c27fe2light .arrowheadPath{fill:#000000;}#df72daf3532c27fe2light .edgePath .path{stroke:rgb(74, 86, 92);stroke-width:1px;}#df72daf3532c27fe2light .flowchart-link{stroke:rgb(74, 86, 92);fill:none;}#df72daf3532c27fe2light .edgeLabel{background-color:rgb(182, 240, 255);text-align:center;}#df72daf3532c27fe2light .edgeLabel p{background-color:rgb(182, 240, 255);}#df72daf3532c27fe2light .edgeLabel rect{opacity:0.5;background-color:rgb(182, 240, 255);fill:rgb(182, 240, 255);}#df72daf3532c27fe2light .labelBkg{background-color:rgba(182, 240, 255, 0.5);}#df72daf3532c27fe2light .cluster rect{fill:rgb(255, 255, 255);stroke:rgb(129, 146, 154);stroke-width:1px;}#df72daf3532c27fe2light .cluster text{fill:#000000;}#df72daf3532c27fe2light .cluster span{color:#000000;}#df72daf3532c27fe2light div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:12px;background:rgb(255, 255, 255);border:1px solid rgb(129, 146, 154);border-radius:2px;pointer-events:none;z-index:100;}#df72daf3532c27fe2light .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#df72daf3532c27fe2light rect.text{fill:none;stroke-width:0;}#df72daf3532c27fe2light .icon-shape,#df72daf3532c27fe2light .image-shape{background-color:rgb(182, 240, 255);text-align:center;}#df72daf3532c27fe2light .icon-shape p,#df72daf3532c27fe2light .image-shape p{background-color:rgb(182, 240, 255);padding:2px;}#df72daf3532c27fe2light .icon-shape .label rect,#df72daf3532c27fe2light .image-shape .label rect{opacity:0.5;background-color:rgb(182, 240, 255);fill:rgb(182, 240, 255);}#df72daf3532c27fe2light .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#df72daf3532c27fe2light .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#df72daf3532c27fe2light .node .neo-node{stroke:rgb(204, 216, 222);}#df72daf3532c27fe2light [data-look="neo"].node rect,#df72daf3532c27fe2light [data-look="neo"].cluster rect,#df72daf3532c27fe2light [data-look="neo"].node polygon{stroke:url(#df72daf3532c27fe2light-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2light [data-look="neo"].swimlane.cluster rect{filter:none;}#df72daf3532c27fe2light [data-look="neo"].node path{stroke:url(#df72daf3532c27fe2light-gradient);stroke-width:1px;}#df72daf3532c27fe2light [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2light [data-look="neo"].node .neo-line path{stroke:rgb(204, 216, 222);filter:none;}#df72daf3532c27fe2light [data-look="neo"].node circle{stroke:url(#df72daf3532c27fe2light-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2light [data-look="neo"].node circle .state-start{fill:#000000;}#df72daf3532c27fe2light [data-look="neo"].icon-shape .icon{fill:url(#df72daf3532c27fe2light-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2light [data-look="neo"].icon-shape .icon-neo path{stroke:url(#df72daf3532c27fe2light-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2light :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}&lt;/style&gt;&lt;g&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"&gt;&lt;path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"&gt;&lt;polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/polygon&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2light_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;g class="root"&gt;&lt;g class="clusters"&gt;&lt;/g&gt;&lt;g class="edgePaths"&gt;&lt;path d="M100.984,178L100.984,186.167C100.984,194.333,100.984,210.667,100.984,224.333C100.984,238,100.984,249,100.984,254.5L100.984,260" id="df72daf3532c27fe2light-L_C_S_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_C_S_0" data-points="W3sieCI6MTAwLjk4NDM3NSwieSI6MTc4fSx7IngiOjEwMC45ODQzNzUsInkiOjIyN30seyJ4IjoxMDAuOTg0Mzc1LCJ5IjoyNjR9XQ==" data-look="classic" marker-end="url(#df72daf3532c27fe2light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M100.984,318L100.984,322.167C100.984,326.333,100.984,334.667,127.663,344.322C154.342,353.977,207.701,364.954,234.38,370.443L261.059,375.931" id="df72daf3532c27fe2light-L_S_T1_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_S_T1_0" data-points="W3sieCI6MTAwLjk4NDM3NSwieSI6MzE4fSx7IngiOjEwMC45ODQzNzUsInkiOjM0M30seyJ4IjoyNjQuOTc2NTYyNSwieSI6Mzc2LjczNzE1NzY5MzAyMDk1fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M314.547,190L314.547,196.167C314.547,202.333,314.547,214.667,317.811,226.424C321.075,238.182,327.603,249.364,330.867,254.955L334.131,260.546" id="df72daf3532c27fe2light-L_E_ST_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_E_ST_0" data-points="W3sieCI6MzE0LjU0Njg3NSwieSI6MTkwfSx7IngiOjMxNC41NDY4NzUsInkiOjIyN30seyJ4IjozMzYuMTQ3NTIxOTcyNjU2MjUsInkiOjI2NH1d" data-look="classic" marker-end="url(#df72daf3532c27fe2light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M580.121,62L580.121,66.167C580.121,70.333,580.121,78.667,580.121,88.333C580.121,98,580.121,109,580.121,114.5L580.121,120" id="df72daf3532c27fe2light-L_T_S2_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_T_S2_0" data-points="W3sieCI6NTgwLjEyMTA5Mzc1LCJ5Ijo2Mn0seyJ4Ijo1ODAuMTIxMDkzNzUsInkiOjg3fSx7IngiOjU4MC4xMjEwOTM3NSwieSI6MTI0fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M593.395,178L597.41,186.167C601.425,194.333,609.455,210.667,613.469,224.333C617.484,238,617.484,249,617.484,254.5L617.484,260" id="df72daf3532c27fe2light-L_S2_M_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_S2_M_0" data-points="W3sieCI6NTkzLjM5NDg5MTAzNjE4NDIsInkiOjE3OH0seyJ4Ijo2MTcuNDg0Mzc1LCJ5IjoyMjd9LHsieCI6NjE3LjQ4NDM3NSwieSI6MjY0fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M617.484,318L617.484,322.167C617.484,326.333,617.484,334.667,588.978,344.454C560.472,354.241,503.46,365.482,474.954,371.102L446.448,376.723" id="df72daf3532c27fe2light-L_M_T1_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_M_T1_0" data-points="W3sieCI6NjE3LjQ4NDM3NSwieSI6MzE4fSx7IngiOjYxNy40ODQzNzUsInkiOjM0M30seyJ4Ijo0NDIuNTIzNDM3NSwieSI6Mzc3LjQ5NjcxMTg5MDUxNDg2fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M541.268,178L529.517,186.167C517.765,194.333,494.261,210.667,471.645,224.684C449.029,238.701,427.3,250.402,416.435,256.253L405.571,262.103" id="df72daf3532c27fe2light-L_S2_ST_0" class="edge-thickness-normal edge-pattern-dotted edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_S2_ST_0" data-points="W3sieCI6NTQxLjI2ODM0OTA5NTM5NDgsInkiOjE3OH0seyJ4Ijo0NzAuNzU3ODEyNSwieSI6MjI3fSx7IngiOjQwMi4wNDkwMTEyMzA0Njg3NSwieSI6MjY0fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;/g&gt;&lt;g class="edgeLabels"&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_C_S_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_S_T1_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_E_ST_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_T_S2_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_S2_M_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_M_T1_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(473.97144, 224.76675)"&gt;&lt;g class="label" data-id="L_S2_ST_0" transform="translate(-54.7265625, -12)"&gt;&lt;foreignObject width="109.453125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;never re-seeds&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="nodes"&gt;&lt;g class="node default" id="df72daf3532c27fe2light-flowchart-C-0" data-look="classic" transform="translate(100.984375, 151)"&gt;&lt;rect class="basic label-container" style="" x="-59.4765625" y="-27" width="118.953125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-29.4765625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="58.953125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;connect&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2light-flowchart-S-1" data-look="classic" transform="translate(100.984375, 291)"&gt;&lt;rect class="basic label-container" style="" x="-92.984375" y="-27" width="185.96875" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-62.984375, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="125.96875" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;session.snapshot&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2light-flowchart-T1-3" data-look="classic" transform="translate(353.75, 395)"&gt;&lt;rect class="basic label-container" style="" x="-88.7734375" y="-27" width="177.546875" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-58.7734375, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="117.546875" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;tokens assigned&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2light-flowchart-E-4" data-look="classic" transform="translate(314.546875, 151)"&gt;&lt;rect class="basic label-container" style="" x="-102.6015625" y="-39" width="205.203125" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-72.6015625, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="145.203125" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;pushed events&lt;br&gt;pane_closed, status&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2light-flowchart-ST-5" data-look="classic" transform="translate(351.91015625, 291)"&gt;&lt;rect class="basic label-container" style="" x="-72.0625" y="-27" width="144.125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-42.0625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="84.125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;cache state&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2light-flowchart-T-6" data-look="classic" transform="translate(580.12109375, 35)"&gt;&lt;rect class="basic label-container" style="" x="-63.2421875" y="-27" width="126.484375" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-33.2421875, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="66.484375" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;10s timer&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2light-flowchart-S2-7" data-look="classic" transform="translate(580.12109375, 151)"&gt;&lt;rect class="basic label-container" style="" x="-85.09375" y="-27" width="170.1875" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-55.09375, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="110.1875" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;snapshot again&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2light-flowchart-M-9" data-look="classic" transform="translate(617.484375, 291)"&gt;&lt;rect class="basic label-container" style="" x="-96.6640625" y="-27" width="193.328125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-66.6640625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="133.328125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;merge tokens only&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id="df72daf3532c27fe2light-drop-shadow" height="130%" width="130%"&gt;&lt;feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;defs&gt;&lt;filter id="df72daf3532c27fe2light-drop-shadow-small" height="150%" width="150%"&gt;&lt;feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;linearGradient id="df72daf3532c27fe2light-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"&gt;&lt;stop offset="0%" stop-color="rgb(204, 216, 222)" stop-opacity="1"&gt;&lt;/stop&gt;&lt;stop offset="100%" stop-color="rgb(28, 209, 255)" stop-opacity="1"&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;/svg&gt;&lt;/div&gt;&#10; &lt;div class="not-prose diagram diagram-dark"&gt;&lt;svg id="df72daf3532c27fe2dark" width="100%" xmlns="http://www.w3.org/2000/svg" class="flowchart" style="max-width: 722.1484375px;" viewBox="0 0 722.1484375 430" role="graphics-document document" aria-roledescription="flowchart-v2"&gt;&lt;style&gt;#df72daf3532c27fe2dark{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;fill:#ccc;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#df72daf3532c27fe2dark .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#df72daf3532c27fe2dark .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#df72daf3532c27fe2dark .error-icon{fill:#a44141;}#df72daf3532c27fe2dark .error-text{fill:#ddd;stroke:#ddd;}#df72daf3532c27fe2dark .edge-thickness-normal{stroke-width:1px;}#df72daf3532c27fe2dark .edge-thickness-thick{stroke-width:3.5px;}#df72daf3532c27fe2dark .edge-pattern-solid{stroke-dasharray:0;}#df72daf3532c27fe2dark .edge-thickness-invisible{stroke-width:0;fill:none;}#df72daf3532c27fe2dark .edge-pattern-dashed{stroke-dasharray:3;}#df72daf3532c27fe2dark .edge-pattern-dotted{stroke-dasharray:2;}#df72daf3532c27fe2dark .marker{fill:lightgrey;stroke:lightgrey;}#df72daf3532c27fe2dark .marker.cross{stroke:lightgrey;}#df72daf3532c27fe2dark svg{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;}#df72daf3532c27fe2dark p{margin:0;}#df72daf3532c27fe2dark .label{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;color:#ccc;}#df72daf3532c27fe2dark .cluster-label text{fill:#F9FFFE;}#df72daf3532c27fe2dark .cluster-label span{color:#F9FFFE;}#df72daf3532c27fe2dark .cluster-label span p{background-color:transparent;}#df72daf3532c27fe2dark .label text,#df72daf3532c27fe2dark span{fill:#ccc;color:#ccc;}#df72daf3532c27fe2dark .node rect,#df72daf3532c27fe2dark .node circle,#df72daf3532c27fe2dark .node ellipse,#df72daf3532c27fe2dark .node polygon,#df72daf3532c27fe2dark .node path{fill:#1f2020;stroke:#ccc;stroke-width:1px;}#df72daf3532c27fe2dark .rough-node .label text,#df72daf3532c27fe2dark .node .label text,#df72daf3532c27fe2dark .image-shape .label,#df72daf3532c27fe2dark .icon-shape .label{text-anchor:middle;}#df72daf3532c27fe2dark .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#df72daf3532c27fe2dark .rough-node .label,#df72daf3532c27fe2dark .node .label,#df72daf3532c27fe2dark .image-shape .label,#df72daf3532c27fe2dark .icon-shape .label{text-align:center;}#df72daf3532c27fe2dark .node.clickable{cursor:pointer;}#df72daf3532c27fe2dark .root .anchor path{fill:lightgrey!important;stroke-width:0;stroke:lightgrey;}#df72daf3532c27fe2dark .arrowheadPath{fill:lightgrey;}#df72daf3532c27fe2dark .edgePath .path{stroke:lightgrey;stroke-width:1px;}#df72daf3532c27fe2dark .flowchart-link{stroke:lightgrey;fill:none;}#df72daf3532c27fe2dark .edgeLabel{background-color:hsl(0, 0%, 34.4117647059%);text-align:center;}#df72daf3532c27fe2dark .edgeLabel p{background-color:hsl(0, 0%, 34.4117647059%);}#df72daf3532c27fe2dark .edgeLabel rect{opacity:0.5;background-color:hsl(0, 0%, 34.4117647059%);fill:hsl(0, 0%, 34.4117647059%);}#df72daf3532c27fe2dark .labelBkg{background-color:rgba(87.75, 87.75, 87.75, 0.5);}#df72daf3532c27fe2dark .cluster rect{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:rgba(255, 255, 255, 0.25);stroke-width:1px;}#df72daf3532c27fe2dark .cluster text{fill:#F9FFFE;}#df72daf3532c27fe2dark .cluster span{color:#F9FFFE;}#df72daf3532c27fe2dark div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:12px;background:hsl(20, 1.5873015873%, 12.3529411765%);border:1px solid rgba(255, 255, 255, 0.25);border-radius:2px;pointer-events:none;z-index:100;}#df72daf3532c27fe2dark .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#ccc;}#df72daf3532c27fe2dark rect.text{fill:none;stroke-width:0;}#df72daf3532c27fe2dark .icon-shape,#df72daf3532c27fe2dark .image-shape{background-color:hsl(0, 0%, 34.4117647059%);text-align:center;}#df72daf3532c27fe2dark .icon-shape p,#df72daf3532c27fe2dark .image-shape p{background-color:hsl(0, 0%, 34.4117647059%);padding:2px;}#df72daf3532c27fe2dark .icon-shape .label rect,#df72daf3532c27fe2dark .image-shape .label rect{opacity:0.5;background-color:hsl(0, 0%, 34.4117647059%);fill:hsl(0, 0%, 34.4117647059%);}#df72daf3532c27fe2dark .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#df72daf3532c27fe2dark .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#df72daf3532c27fe2dark .node .neo-node{stroke:#ccc;}#df72daf3532c27fe2dark [data-look="neo"].node rect,#df72daf3532c27fe2dark [data-look="neo"].cluster rect,#df72daf3532c27fe2dark [data-look="neo"].node polygon{stroke:url(#df72daf3532c27fe2dark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2dark [data-look="neo"].swimlane.cluster rect{filter:none;}#df72daf3532c27fe2dark [data-look="neo"].node path{stroke:url(#df72daf3532c27fe2dark-gradient);stroke-width:1px;}#df72daf3532c27fe2dark [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2dark [data-look="neo"].node .neo-line path{stroke:#ccc;filter:none;}#df72daf3532c27fe2dark [data-look="neo"].node circle{stroke:url(#df72daf3532c27fe2dark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2dark [data-look="neo"].node circle .state-start{fill:#000000;}#df72daf3532c27fe2dark [data-look="neo"].icon-shape .icon{fill:url(#df72daf3532c27fe2dark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2dark [data-look="neo"].icon-shape .icon-neo path{stroke:url(#df72daf3532c27fe2dark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#df72daf3532c27fe2dark :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}&lt;/style&gt;&lt;g&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"&gt;&lt;path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"&gt;&lt;polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/polygon&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="df72daf3532c27fe2dark_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;g class="root"&gt;&lt;g class="clusters"&gt;&lt;/g&gt;&lt;g class="edgePaths"&gt;&lt;path d="M100.984,178L100.984,186.167C100.984,194.333,100.984,210.667,100.984,224.333C100.984,238,100.984,249,100.984,254.5L100.984,260" id="df72daf3532c27fe2dark-L_C_S_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_C_S_0" data-points="W3sieCI6MTAwLjk4NDM3NSwieSI6MTc4fSx7IngiOjEwMC45ODQzNzUsInkiOjIyN30seyJ4IjoxMDAuOTg0Mzc1LCJ5IjoyNjR9XQ==" data-look="classic" marker-end="url(#df72daf3532c27fe2dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M100.984,318L100.984,322.167C100.984,326.333,100.984,334.667,127.663,344.322C154.342,353.977,207.701,364.954,234.38,370.443L261.059,375.931" id="df72daf3532c27fe2dark-L_S_T1_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_S_T1_0" data-points="W3sieCI6MTAwLjk4NDM3NSwieSI6MzE4fSx7IngiOjEwMC45ODQzNzUsInkiOjM0M30seyJ4IjoyNjQuOTc2NTYyNSwieSI6Mzc2LjczNzE1NzY5MzAyMDk1fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M314.547,190L314.547,196.167C314.547,202.333,314.547,214.667,317.811,226.424C321.075,238.182,327.603,249.364,330.867,254.955L334.131,260.546" id="df72daf3532c27fe2dark-L_E_ST_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_E_ST_0" data-points="W3sieCI6MzE0LjU0Njg3NSwieSI6MTkwfSx7IngiOjMxNC41NDY4NzUsInkiOjIyN30seyJ4IjozMzYuMTQ3NTIxOTcyNjU2MjUsInkiOjI2NH1d" data-look="classic" marker-end="url(#df72daf3532c27fe2dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M580.121,62L580.121,66.167C580.121,70.333,580.121,78.667,580.121,88.333C580.121,98,580.121,109,580.121,114.5L580.121,120" id="df72daf3532c27fe2dark-L_T_S2_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_T_S2_0" data-points="W3sieCI6NTgwLjEyMTA5Mzc1LCJ5Ijo2Mn0seyJ4Ijo1ODAuMTIxMDkzNzUsInkiOjg3fSx7IngiOjU4MC4xMjEwOTM3NSwieSI6MTI0fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M593.395,178L597.41,186.167C601.425,194.333,609.455,210.667,613.469,224.333C617.484,238,617.484,249,617.484,254.5L617.484,260" id="df72daf3532c27fe2dark-L_S2_M_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_S2_M_0" data-points="W3sieCI6NTkzLjM5NDg5MTAzNjE4NDIsInkiOjE3OH0seyJ4Ijo2MTcuNDg0Mzc1LCJ5IjoyMjd9LHsieCI6NjE3LjQ4NDM3NSwieSI6MjY0fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M617.484,318L617.484,322.167C617.484,326.333,617.484,334.667,588.978,344.454C560.472,354.241,503.46,365.482,474.954,371.102L446.448,376.723" id="df72daf3532c27fe2dark-L_M_T1_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_M_T1_0" data-points="W3sieCI6NjE3LjQ4NDM3NSwieSI6MzE4fSx7IngiOjYxNy40ODQzNzUsInkiOjM0M30seyJ4Ijo0NDIuNTIzNDM3NSwieSI6Mzc3LjQ5NjcxMTg5MDUxNDg2fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M541.268,178L529.517,186.167C517.765,194.333,494.261,210.667,471.645,224.684C449.029,238.701,427.3,250.402,416.435,256.253L405.571,262.103" id="df72daf3532c27fe2dark-L_S2_ST_0" class="edge-thickness-normal edge-pattern-dotted edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_S2_ST_0" data-points="W3sieCI6NTQxLjI2ODM0OTA5NTM5NDgsInkiOjE3OH0seyJ4Ijo0NzAuNzU3ODEyNSwieSI6MjI3fSx7IngiOjQwMi4wNDkwMTEyMzA0Njg3NSwieSI6MjY0fV0=" data-look="classic" marker-end="url(#df72daf3532c27fe2dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;/g&gt;&lt;g class="edgeLabels"&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_C_S_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_S_T1_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_E_ST_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_T_S2_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_S2_M_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_M_T1_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(473.97144, 224.76675)"&gt;&lt;g class="label" data-id="L_S2_ST_0" transform="translate(-54.7265625, -12)"&gt;&lt;foreignObject width="109.453125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;never re-seeds&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="nodes"&gt;&lt;g class="node default" id="df72daf3532c27fe2dark-flowchart-C-0" data-look="classic" transform="translate(100.984375, 151)"&gt;&lt;rect class="basic label-container" style="" x="-59.4765625" y="-27" width="118.953125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-29.4765625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="58.953125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;connect&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2dark-flowchart-S-1" data-look="classic" transform="translate(100.984375, 291)"&gt;&lt;rect class="basic label-container" style="" x="-92.984375" y="-27" width="185.96875" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-62.984375, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="125.96875" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;session.snapshot&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2dark-flowchart-T1-3" data-look="classic" transform="translate(353.75, 395)"&gt;&lt;rect class="basic label-container" style="" x="-88.7734375" y="-27" width="177.546875" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-58.7734375, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="117.546875" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;tokens assigned&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2dark-flowchart-E-4" data-look="classic" transform="translate(314.546875, 151)"&gt;&lt;rect class="basic label-container" style="" x="-102.6015625" y="-39" width="205.203125" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-72.6015625, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="145.203125" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;pushed events&lt;br&gt;pane_closed, status&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2dark-flowchart-ST-5" data-look="classic" transform="translate(351.91015625, 291)"&gt;&lt;rect class="basic label-container" style="" x="-72.0625" y="-27" width="144.125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-42.0625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="84.125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;cache state&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2dark-flowchart-T-6" data-look="classic" transform="translate(580.12109375, 35)"&gt;&lt;rect class="basic label-container" style="" x="-63.2421875" y="-27" width="126.484375" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-33.2421875, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="66.484375" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;10s timer&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2dark-flowchart-S2-7" data-look="classic" transform="translate(580.12109375, 151)"&gt;&lt;rect class="basic label-container" style="" x="-85.09375" y="-27" width="170.1875" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-55.09375, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="110.1875" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;snapshot again&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="df72daf3532c27fe2dark-flowchart-M-9" data-look="classic" transform="translate(617.484375, 291)"&gt;&lt;rect class="basic label-container" style="" x="-96.6640625" y="-27" width="193.328125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-66.6640625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="133.328125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;merge tokens only&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id="df72daf3532c27fe2dark-drop-shadow" height="130%" width="130%"&gt;&lt;feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#FFFFFF"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;defs&gt;&lt;filter id="df72daf3532c27fe2dark-drop-shadow-small" height="150%" width="150%"&gt;&lt;feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#FFFFFF"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;linearGradient id="df72daf3532c27fe2dark-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"&gt;&lt;stop offset="0%" stop-color="#cccccc" stop-opacity="1"&gt;&lt;/stop&gt;&lt;stop offset="100%" stop-color="hsl(180, 0%, 18.3529411765%)" stop-opacity="1"&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;/svg&gt;&lt;/div&gt;&#10;&lt;p&gt;The fix is a periodic snapshot on a 10-second default, and the merge is the load-bearing part:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ts" data-lang="ts"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cm"&gt;/** Token re-read period; 0 disables it. Default 10s — roughly&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cm"&gt; * twice Claude Code&amp;#39;s default statusline refresh, so the donut&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cm"&gt; * trails the real percentage by at most one report. */&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nx"&gt;tokensRefreshMs?&lt;/span&gt;: &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;// ...&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tokensRefreshMs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;opts&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tokensRefreshMs&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="nx"&gt;_000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;The timer&amp;rsquo;s snapshot can be &lt;em&gt;older&lt;/em&gt; than pushed events the cache has already applied. Re-seeding from it would let a stale read undo a pane close that a newer event had already processed, resurrecting a pane that is gone. There is a test pinning exactly that, and its comment says why:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ts" data-lang="ts"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;// The refresh re-reads a full snapshot but must merge tokens ONLY:&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;// re-seeding would let a stale snapshot undo a close that a newer&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;// pushed event already applied.&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;One correction to my own framing, because I described this as &amp;ldquo;tokens only&amp;rdquo; for a while and it stopped being true. The merge now also carries the &lt;code&gt;focused&lt;/code&gt; flag, deliberately and with its own justification comment. If you go looking at that function expecting the name to be the specification, it will not be.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Lessons&#10; &lt;div id="lessons" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#lessons" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;A suspiciously round number in a noisy display means the display is not reading anything. Zero says &amp;ldquo;nothing arrived&amp;rdquo;, and a plausible number says &amp;ldquo;this works&amp;rdquo;. Round says &amp;ldquo;orphan&amp;rdquo;.&lt;/li&gt;&#10;&lt;li&gt;Silent-by-design is right for a statusline and it removes your only failure signal. A wrong field name in a script built never to break a prompt produces no error, no output, and no report, on every turn, indefinitely.&lt;/li&gt;&#10;&lt;li&gt;When a correct fix produces no visible change, consider that you fixed one of two bugs before concluding you fixed none. Two independent causes of one cosmetic symptom is the case where evidence points backwards.&lt;/li&gt;&#10;&lt;li&gt;Probe the live server instead of reading its schema. &amp;ldquo;Does this call emit an event at all&amp;rdquo; is a question a schema cannot answer and a five-minute experiment can.&lt;/li&gt;&#10;&lt;li&gt;Reject the obvious event on measurement, not taste, and write down the measurement. &lt;code&gt;pane.updated&lt;/code&gt; carried the field I wanted and did not fire for the case I needed.&lt;/li&gt;&#10;&lt;li&gt;A periodic re-read must merge, never re-seed. A refresh that is older than the events you have already applied will happily undo them.&lt;/li&gt;&#10;&lt;li&gt;If a fallback exists, test the ordering, not just the fallback. Otherwise it is a second way to be quietly wrong.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h2 class="relative group"&gt;References&#10; &lt;div id="references" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#references" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Claude Code statusline docs, source of truth for the payload schema: &lt;a href="https://code.claude.com/docs/en/statusline" target="_blank" rel="noreferrer"&gt;https://code.claude.com/docs/en/statusline&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;The post that printed the correct field name three months before I got it wrong: &lt;a href="https://nick-liu.com/posts/statusline-side-channel/" &gt;The Claude Code statusline is a per-turn telemetry side channel&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;The rebuild this ring belongs to: &lt;a href="https://nick-liu.com/posts/herddeck-substrate-bet/" &gt;I deleted six subsystems by swapping one dependency.&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;HerdDeck statusline delegate: &lt;a href="https://github.com/nickboy/herddeck/blob/main/scripts/herddeck-statusline.sh" target="_blank" rel="noreferrer"&gt;&lt;code&gt;scripts/herddeck-statusline.sh&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;HerdDeck state cache, including &lt;code&gt;mergeTokensFromSnapshot&lt;/code&gt;: &lt;a href="https://github.com/nickboy/herddeck/blob/main/packages/daemon/src/stateCache.ts" target="_blank" rel="noreferrer"&gt;&lt;code&gt;packages/daemon/src/stateCache.ts&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;HerdDeck target monitor, the refresh timer: &lt;a href="https://github.com/nickboy/herddeck/blob/main/packages/daemon/src/herdr/monitor.ts" target="_blank" rel="noreferrer"&gt;&lt;code&gt;packages/daemon/src/herdr/monitor.ts&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</content:encoded></item><item><title>I deleted six subsystems by swapping one dependency. The protocol billed me.</title><link>https://nick-liu.com/posts/herddeck-substrate-bet/</link><pubDate>Sun, 30 Aug 2026 00:00:00 +0000</pubDate><author>nickboy@users.noreply.github.com (Nick Liu)</author><guid>https://nick-liu.com/posts/herddeck-substrate-bet/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; &#10;Six of the ten posts in my "Building ClaudeDeck" series document code that no longer exists. Over four days in August I rebuilt the plugin on herdr's socket API, and the hook dispatcher, the PTY runner, the statusline auto-patcher, the AppleScript focus path, the Claude project watcher and the shell-PID resolver all went in the bin, taking the `.app` bundle, the codesigning step and every TCC prompt with them. Then the substrate sent its invoice.&#10;&#10;&lt;/div&gt;&#10;&#10;&lt;nav class="series-progress" aria-label="Series progress"&gt;&#10; &lt;span class="series-progress-label"&gt;Deleting ClaudeDeck · Part 1 of 5&lt;/span&gt;&#10; &lt;ol class="series-progress-dots"&gt;&lt;li class="series-progress-dot is-current"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-substrate-bet/" title="I deleted six subsystems by swapping one dependency. The protocol billed me." aria-current="step"&gt;1&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-backoff-wrong-question/" title="My backoff logged errors=1 492 times. It was answering the wrong question."&gt;2&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-frozen-context-ring/" title="Every context ring read 10%. Two bugs, and fixing one hid the other."&gt;3&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-ring-read-backwards/" title="The ring was 1.00:1 against its background. The key read 35% at 65%."&gt;4&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-ssh-tunnel-lies/" title="The tunnel was up. The socket existed. Nothing was on the other end."&gt;5&lt;/a&gt;&#10; &lt;/li&gt;&lt;/ol&gt;&#10; &lt;/nav&gt;&#10;&lt;div class="tested-with" role="note"&gt;&#10; &lt;span class="tested-with-icon" aria-hidden="true"&gt;🧪&lt;/span&gt;&#10; &lt;span&gt;Tested with &lt;strong&gt;herdr&lt;/strong&gt; &lt;code&gt;0.8.0&lt;/code&gt; · macOS&lt;/span&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;ClaudeDeck was complicated for exactly one reason. Claude Code has no control API, so every fact the plugin needed had to be stolen from somewhere it was not offered.&lt;/p&gt;</description><content:encoded>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; &#10;Six of the ten posts in my "Building ClaudeDeck" series document code that no longer exists. Over four days in August I rebuilt the plugin on herdr's socket API, and the hook dispatcher, the PTY runner, the statusline auto-patcher, the AppleScript focus path, the Claude project watcher and the shell-PID resolver all went in the bin, taking the `.app` bundle, the codesigning step and every TCC prompt with them. Then the substrate sent its invoice.&#10;&#10;&lt;/div&gt;&#10;&#10;&lt;nav class="series-progress" aria-label="Series progress"&gt;&#10; &lt;span class="series-progress-label"&gt;Deleting ClaudeDeck · Part 1 of 5&lt;/span&gt;&#10; &lt;ol class="series-progress-dots"&gt;&lt;li class="series-progress-dot is-current"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-substrate-bet/" title="I deleted six subsystems by swapping one dependency. The protocol billed me." aria-current="step"&gt;1&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-backoff-wrong-question/" title="My backoff logged errors=1 492 times. It was answering the wrong question."&gt;2&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-frozen-context-ring/" title="Every context ring read 10%. Two bugs, and fixing one hid the other."&gt;3&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-ring-read-backwards/" title="The ring was 1.00:1 against its background. The key read 35% at 65%."&gt;4&lt;/a&gt;&#10; &lt;/li&gt;&lt;li class="series-progress-dot"&gt;&#10; &lt;a href="https://nick-liu.com/posts/herddeck-ssh-tunnel-lies/" title="The tunnel was up. The socket existed. Nothing was on the other end."&gt;5&lt;/a&gt;&#10; &lt;/li&gt;&lt;/ol&gt;&#10; &lt;/nav&gt;&#10;&lt;div class="tested-with" role="note"&gt;&#10; &lt;span class="tested-with-icon" aria-hidden="true"&gt;🧪&lt;/span&gt;&#10; &lt;span&gt;Tested with &lt;strong&gt;herdr&lt;/strong&gt; &lt;code&gt;0.8.0&lt;/code&gt; · macOS&lt;/span&gt;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;ClaudeDeck was complicated for exactly one reason. Claude Code has no control API, so every fact the plugin needed had to be stolen from somewhere it was not offered.&lt;/p&gt;&#10;&lt;p&gt;To know an agent was blocked, it installed hooks and dispatched them. To know how full the context window was, it patched the statusline. To read what a pane was showing, it ran a PTY and kept a ring buffer. To jump to the right terminal tab it drove AppleScript, which meant Accessibility, which meant TCC, which meant codesigning. To know which project a shell belonged to, it resolved shell PIDs and watched the projects directory.&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="https://herdr.dev" target="_blank" rel="noreferrer"&gt;herdr&lt;/a&gt; is a terminal multiplexer built for coding agents. It already tracks all of that, and it exposes it on a Unix socket speaking NDJSON. Agent lifecycle, &lt;code&gt;idle&lt;/code&gt; and &lt;code&gt;working&lt;/code&gt; and &lt;code&gt;blocked&lt;/code&gt; and &lt;code&gt;done&lt;/code&gt;, is a first-class concept in the protocol rather than something you infer.&lt;/p&gt;&#10;&lt;p&gt;So the interesting artifact of this rebuild is not what I wrote. It is what came out.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;What all that code was for&#10; &lt;div id="what-all-that-code-was-for" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-all-that-code-was-for" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;ClaudeDeck subsystem&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;It existed because&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;HerdDeck instead&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Hook dispatch (&lt;a href="https://nick-liu.com/posts/claude-code-hooks-reality/" &gt;post&lt;/a&gt;)&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;nothing tells you an agent is blocked&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&lt;code&gt;agent_status&lt;/code&gt; is a field in the protocol&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Permission round-trip (&lt;a href="https://nick-liu.com/posts/permission-round-trip/" &gt;post&lt;/a&gt;)&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;approval meant parking an HTTP response on a Promise&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;herdr already knows a pane is waiting&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Statusline auto-patcher (&lt;a href="https://nick-liu.com/posts/statusline-side-channel/" &gt;post&lt;/a&gt;)&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;context fullness had to be smuggled out per turn&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;a statusline delegate you install yourself, never patched in behind your back&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;PTY runner and ring buffer (&lt;a href="https://nick-liu.com/posts/pty-wrap-migration/" &gt;post&lt;/a&gt;)&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;reading a pane meant owning the terminal&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;herdr owns the terminal&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;AppleScript, codesigning, TCC (&lt;a href="https://nick-liu.com/posts/tcc-cdhash-trap/" &gt;post&lt;/a&gt;)&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;focusing a tab needed Accessibility&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;one socket call&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Shell-PID resolver, project watcher&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;mapping a shell to a project&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;herdr tracks it&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;Two things fell out of that beyond the line count, and only one of them was planned.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;It works for every agent herdr recognises.&lt;/strong&gt; Claude Code, Codex, OpenCode. The old design was Claude-shaped because hooks are Claude-shaped. The new one asks herdr what is running and gets an answer that was never Claude-specific in the first place.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Remote came close to free.&lt;/strong&gt; herdr splits client from server, so the server holds the state and a remote server speaks the identical protocol. Forward the socket over SSH and the same daemon code drives agents on another machine.&lt;/p&gt;&#10;&lt;div class="not-prose diagram diagram-light"&gt;&lt;svg id="d21793c5c62197893light" width="100%" xmlns="http://www.w3.org/2000/svg" class="flowchart" style="max-width: 1228.5px;" viewBox="0 0 1228.5 94" role="graphics-document document" aria-roledescription="flowchart-v2"&gt;&lt;style&gt;#d21793c5c62197893light{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#d21793c5c62197893light .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#d21793c5c62197893light .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#d21793c5c62197893light .error-icon{fill:rgb(255, 255, 255);}#d21793c5c62197893light .error-text{fill:#000000;stroke:#000000;}#d21793c5c62197893light .edge-thickness-normal{stroke-width:1px;}#d21793c5c62197893light .edge-thickness-thick{stroke-width:3.5px;}#d21793c5c62197893light .edge-pattern-solid{stroke-dasharray:0;}#d21793c5c62197893light .edge-thickness-invisible{stroke-width:0;fill:none;}#d21793c5c62197893light .edge-pattern-dashed{stroke-dasharray:3;}#d21793c5c62197893light .edge-pattern-dotted{stroke-dasharray:2;}#d21793c5c62197893light .marker{fill:rgb(74, 86, 92);stroke:rgb(74, 86, 92);}#d21793c5c62197893light .marker.cross{stroke:rgb(74, 86, 92);}#d21793c5c62197893light svg{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;}#d21793c5c62197893light p{margin:0;}#d21793c5c62197893light .label{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;color:#333;}#d21793c5c62197893light .cluster-label text{fill:#000000;}#d21793c5c62197893light .cluster-label span{color:#000000;}#d21793c5c62197893light .cluster-label span p{background-color:transparent;}#d21793c5c62197893light .label text,#d21793c5c62197893light span{fill:#333;color:#333;}#d21793c5c62197893light .node rect,#d21793c5c62197893light .node circle,#d21793c5c62197893light .node ellipse,#d21793c5c62197893light .node polygon,#d21793c5c62197893light .node path{fill:rgb(255, 255, 255);stroke:rgb(204, 216, 222);stroke-width:1px;}#d21793c5c62197893light .rough-node .label text,#d21793c5c62197893light .node .label text,#d21793c5c62197893light .image-shape .label,#d21793c5c62197893light .icon-shape .label{text-anchor:middle;}#d21793c5c62197893light .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#d21793c5c62197893light .rough-node .label,#d21793c5c62197893light .node .label,#d21793c5c62197893light .image-shape .label,#d21793c5c62197893light .icon-shape .label{text-align:center;}#d21793c5c62197893light .node.clickable{cursor:pointer;}#d21793c5c62197893light .root .anchor path{fill:rgb(74, 86, 92)!important;stroke-width:0;stroke:rgb(74, 86, 92);}#d21793c5c62197893light .arrowheadPath{fill:#000000;}#d21793c5c62197893light .edgePath .path{stroke:rgb(74, 86, 92);stroke-width:1px;}#d21793c5c62197893light .flowchart-link{stroke:rgb(74, 86, 92);fill:none;}#d21793c5c62197893light .edgeLabel{background-color:rgb(182, 240, 255);text-align:center;}#d21793c5c62197893light .edgeLabel p{background-color:rgb(182, 240, 255);}#d21793c5c62197893light .edgeLabel rect{opacity:0.5;background-color:rgb(182, 240, 255);fill:rgb(182, 240, 255);}#d21793c5c62197893light .labelBkg{background-color:rgba(182, 240, 255, 0.5);}#d21793c5c62197893light .cluster rect{fill:rgb(255, 255, 255);stroke:rgb(129, 146, 154);stroke-width:1px;}#d21793c5c62197893light .cluster text{fill:#000000;}#d21793c5c62197893light .cluster span{color:#000000;}#d21793c5c62197893light div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:12px;background:rgb(255, 255, 255);border:1px solid rgb(129, 146, 154);border-radius:2px;pointer-events:none;z-index:100;}#d21793c5c62197893light .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#d21793c5c62197893light rect.text{fill:none;stroke-width:0;}#d21793c5c62197893light .icon-shape,#d21793c5c62197893light .image-shape{background-color:rgb(182, 240, 255);text-align:center;}#d21793c5c62197893light .icon-shape p,#d21793c5c62197893light .image-shape p{background-color:rgb(182, 240, 255);padding:2px;}#d21793c5c62197893light .icon-shape .label rect,#d21793c5c62197893light .image-shape .label rect{opacity:0.5;background-color:rgb(182, 240, 255);fill:rgb(182, 240, 255);}#d21793c5c62197893light .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#d21793c5c62197893light .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#d21793c5c62197893light .node .neo-node{stroke:rgb(204, 216, 222);}#d21793c5c62197893light [data-look="neo"].node rect,#d21793c5c62197893light [data-look="neo"].cluster rect,#d21793c5c62197893light [data-look="neo"].node polygon{stroke:url(#d21793c5c62197893light-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893light [data-look="neo"].swimlane.cluster rect{filter:none;}#d21793c5c62197893light [data-look="neo"].node path{stroke:url(#d21793c5c62197893light-gradient);stroke-width:1px;}#d21793c5c62197893light [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893light [data-look="neo"].node .neo-line path{stroke:rgb(204, 216, 222);filter:none;}#d21793c5c62197893light [data-look="neo"].node circle{stroke:url(#d21793c5c62197893light-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893light [data-look="neo"].node circle .state-start{fill:#000000;}#d21793c5c62197893light [data-look="neo"].icon-shape .icon{fill:url(#d21793c5c62197893light-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893light [data-look="neo"].icon-shape .icon-neo path{stroke:url(#d21793c5c62197893light-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893light :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}&lt;/style&gt;&lt;g&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"&gt;&lt;path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"&gt;&lt;polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/polygon&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893light_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;g class="root"&gt;&lt;g class="clusters"&gt;&lt;/g&gt;&lt;g class="edgePaths"&gt;&lt;path d="M202.781,47L206.948,47C211.115,47,219.448,47,227.115,47C234.781,47,241.781,47,245.281,47L248.781,47" id="d21793c5c62197893light-L_SD_P_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_SD_P_0" data-points="W3sieCI6MjAyLjc4MTI1LCJ5Ijo0N30seyJ4IjoyMjcuNzgxMjUsInkiOjQ3fSx7IngiOjI1Mi43ODEyNSwieSI6NDd9XQ==" data-look="classic" marker-end="url(#d21793c5c62197893light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M357.094,47L368.154,47C379.214,47,401.333,47,422.786,47C444.24,47,465.026,47,475.419,47L485.813,47" id="d21793c5c62197893light-L_P_D_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_P_D_0" data-points="W3sieCI6MzU3LjA5Mzc1LCJ5Ijo0N30seyJ4Ijo0MjMuNDUzMTI1LCJ5Ijo0N30seyJ4Ijo0ODkuODEyNSwieSI6NDd9XQ==" data-look="classic" marker-end="url(#d21793c5c62197893light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M680.984,47L696.965,47C712.945,47,744.906,47,776.201,47C807.495,47,838.122,47,853.436,47L868.75,47" id="d21793c5c62197893light-L_D_H_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_D_H_0" data-points="W3sieCI6NjgwLjk4NDM3NSwieSI6NDd9LHsieCI6Nzc2Ljg2NzE4NzUsInkiOjQ3fSx7IngiOjg3Mi43NSwieSI6NDd9XQ==" data-look="classic" marker-end="url(#d21793c5c62197893light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M1021.125,47L1025.292,47C1029.458,47,1037.792,47,1045.458,47C1053.125,47,1060.125,47,1063.625,47L1067.125,47" id="d21793c5c62197893light-L_H_A1_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_H_A1_0" data-points="W3sieCI6MTAyMS4xMjUsInkiOjQ3fSx7IngiOjEwNDYuMTI1LCJ5Ijo0N30seyJ4IjoxMDcxLjEyNSwieSI6NDd9XQ==" data-look="classic" marker-end="url(#d21793c5c62197893light_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;/g&gt;&lt;g class="edgeLabels"&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_SD_P_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(423.453125, 47)"&gt;&lt;g class="label" data-id="L_P_D_0" transform="translate(-41.359375, -12)"&gt;&lt;foreignObject width="82.71875" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;WebSocket&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(776.8671875, 47)"&gt;&lt;g class="label" data-id="L_D_H_0" transform="translate(-70.8828125, -24)"&gt;&lt;foreignObject width="141.765625" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;ssh -N -L&lt;br&gt;unix socket forward&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_H_A1_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="nodes"&gt;&lt;g class="node default" id="d21793c5c62197893light-flowchart-SD-0" data-look="classic" transform="translate(105.390625, 47)"&gt;&lt;rect class="basic label-container" style="" x="-97.390625" y="-27" width="194.78125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-67.390625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="134.78125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;Stream Deck MK.2&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="d21793c5c62197893light-flowchart-P-1" data-look="classic" transform="translate(304.9375, 47)"&gt;&lt;rect class="basic label-container" style="" x="-52.15625" y="-27" width="104.3125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-22.15625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="44.3125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;plugin&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="d21793c5c62197893light-flowchart-D-3" data-look="classic" transform="translate(585.3984375, 47)"&gt;&lt;rect class="basic label-container" style="" x="-95.5859375" y="-39" width="191.171875" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-65.5859375, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="131.171875" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;herddeck daemon&lt;br&gt;(laptop, launchd)&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="d21793c5c62197893light-flowchart-H-5" data-look="classic" transform="translate(946.9375, 47)"&gt;&lt;rect class="basic label-container" style="" x="-74.1875" y="-39" width="148.375" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-44.1875, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="88.375" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;herdr server&lt;br&gt;(desktop)&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="d21793c5c62197893light-flowchart-A1-7" data-look="classic" transform="translate(1145.8125, 47)"&gt;&lt;rect class="basic label-container" style="" x="-74.6875" y="-27" width="149.375" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-44.6875, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="89.375" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;agent panes&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id="d21793c5c62197893light-drop-shadow" height="130%" width="130%"&gt;&lt;feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;defs&gt;&lt;filter id="d21793c5c62197893light-drop-shadow-small" height="150%" width="150%"&gt;&lt;feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;linearGradient id="d21793c5c62197893light-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"&gt;&lt;stop offset="0%" stop-color="rgb(204, 216, 222)" stop-opacity="1"&gt;&lt;/stop&gt;&lt;stop offset="100%" stop-color="rgb(28, 209, 255)" stop-opacity="1"&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;/svg&gt;&lt;/div&gt;&#10; &lt;div class="not-prose diagram diagram-dark"&gt;&lt;svg id="d21793c5c62197893dark" width="100%" xmlns="http://www.w3.org/2000/svg" class="flowchart" style="max-width: 1228.5px;" viewBox="0 0 1228.5 94" role="graphics-document document" aria-roledescription="flowchart-v2"&gt;&lt;style&gt;#d21793c5c62197893dark{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;fill:#ccc;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#d21793c5c62197893dark .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#d21793c5c62197893dark .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#d21793c5c62197893dark .error-icon{fill:#a44141;}#d21793c5c62197893dark .error-text{fill:#ddd;stroke:#ddd;}#d21793c5c62197893dark .edge-thickness-normal{stroke-width:1px;}#d21793c5c62197893dark .edge-thickness-thick{stroke-width:3.5px;}#d21793c5c62197893dark .edge-pattern-solid{stroke-dasharray:0;}#d21793c5c62197893dark .edge-thickness-invisible{stroke-width:0;fill:none;}#d21793c5c62197893dark .edge-pattern-dashed{stroke-dasharray:3;}#d21793c5c62197893dark .edge-pattern-dotted{stroke-dasharray:2;}#d21793c5c62197893dark .marker{fill:lightgrey;stroke:lightgrey;}#d21793c5c62197893dark .marker.cross{stroke:lightgrey;}#d21793c5c62197893dark svg{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;}#d21793c5c62197893dark p{margin:0;}#d21793c5c62197893dark .label{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;color:#ccc;}#d21793c5c62197893dark .cluster-label text{fill:#F9FFFE;}#d21793c5c62197893dark .cluster-label span{color:#F9FFFE;}#d21793c5c62197893dark .cluster-label span p{background-color:transparent;}#d21793c5c62197893dark .label text,#d21793c5c62197893dark span{fill:#ccc;color:#ccc;}#d21793c5c62197893dark .node rect,#d21793c5c62197893dark .node circle,#d21793c5c62197893dark .node ellipse,#d21793c5c62197893dark .node polygon,#d21793c5c62197893dark .node path{fill:#1f2020;stroke:#ccc;stroke-width:1px;}#d21793c5c62197893dark .rough-node .label text,#d21793c5c62197893dark .node .label text,#d21793c5c62197893dark .image-shape .label,#d21793c5c62197893dark .icon-shape .label{text-anchor:middle;}#d21793c5c62197893dark .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#d21793c5c62197893dark .rough-node .label,#d21793c5c62197893dark .node .label,#d21793c5c62197893dark .image-shape .label,#d21793c5c62197893dark .icon-shape .label{text-align:center;}#d21793c5c62197893dark .node.clickable{cursor:pointer;}#d21793c5c62197893dark .root .anchor path{fill:lightgrey!important;stroke-width:0;stroke:lightgrey;}#d21793c5c62197893dark .arrowheadPath{fill:lightgrey;}#d21793c5c62197893dark .edgePath .path{stroke:lightgrey;stroke-width:1px;}#d21793c5c62197893dark .flowchart-link{stroke:lightgrey;fill:none;}#d21793c5c62197893dark .edgeLabel{background-color:hsl(0, 0%, 34.4117647059%);text-align:center;}#d21793c5c62197893dark .edgeLabel p{background-color:hsl(0, 0%, 34.4117647059%);}#d21793c5c62197893dark .edgeLabel rect{opacity:0.5;background-color:hsl(0, 0%, 34.4117647059%);fill:hsl(0, 0%, 34.4117647059%);}#d21793c5c62197893dark .labelBkg{background-color:rgba(87.75, 87.75, 87.75, 0.5);}#d21793c5c62197893dark .cluster rect{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:rgba(255, 255, 255, 0.25);stroke-width:1px;}#d21793c5c62197893dark .cluster text{fill:#F9FFFE;}#d21793c5c62197893dark .cluster span{color:#F9FFFE;}#d21793c5c62197893dark div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:12px;background:hsl(20, 1.5873015873%, 12.3529411765%);border:1px solid rgba(255, 255, 255, 0.25);border-radius:2px;pointer-events:none;z-index:100;}#d21793c5c62197893dark .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#ccc;}#d21793c5c62197893dark rect.text{fill:none;stroke-width:0;}#d21793c5c62197893dark .icon-shape,#d21793c5c62197893dark .image-shape{background-color:hsl(0, 0%, 34.4117647059%);text-align:center;}#d21793c5c62197893dark .icon-shape p,#d21793c5c62197893dark .image-shape p{background-color:hsl(0, 0%, 34.4117647059%);padding:2px;}#d21793c5c62197893dark .icon-shape .label rect,#d21793c5c62197893dark .image-shape .label rect{opacity:0.5;background-color:hsl(0, 0%, 34.4117647059%);fill:hsl(0, 0%, 34.4117647059%);}#d21793c5c62197893dark .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#d21793c5c62197893dark .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#d21793c5c62197893dark .node .neo-node{stroke:#ccc;}#d21793c5c62197893dark [data-look="neo"].node rect,#d21793c5c62197893dark [data-look="neo"].cluster rect,#d21793c5c62197893dark [data-look="neo"].node polygon{stroke:url(#d21793c5c62197893dark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893dark [data-look="neo"].swimlane.cluster rect{filter:none;}#d21793c5c62197893dark [data-look="neo"].node path{stroke:url(#d21793c5c62197893dark-gradient);stroke-width:1px;}#d21793c5c62197893dark [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893dark [data-look="neo"].node .neo-line path{stroke:#ccc;filter:none;}#d21793c5c62197893dark [data-look="neo"].node circle{stroke:url(#d21793c5c62197893dark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893dark [data-look="neo"].node circle .state-start{fill:#000000;}#d21793c5c62197893dark [data-look="neo"].icon-shape .icon{fill:url(#d21793c5c62197893dark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893dark [data-look="neo"].icon-shape .icon-neo path{stroke:url(#d21793c5c62197893dark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#d21793c5c62197893dark :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}&lt;/style&gt;&lt;g&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"&gt;&lt;path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"&gt;&lt;polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/polygon&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="d21793c5c62197893dark_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;g class="root"&gt;&lt;g class="clusters"&gt;&lt;/g&gt;&lt;g class="edgePaths"&gt;&lt;path d="M202.781,47L206.948,47C211.115,47,219.448,47,227.115,47C234.781,47,241.781,47,245.281,47L248.781,47" id="d21793c5c62197893dark-L_SD_P_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_SD_P_0" data-points="W3sieCI6MjAyLjc4MTI1LCJ5Ijo0N30seyJ4IjoyMjcuNzgxMjUsInkiOjQ3fSx7IngiOjI1Mi43ODEyNSwieSI6NDd9XQ==" data-look="classic" marker-end="url(#d21793c5c62197893dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M357.094,47L368.154,47C379.214,47,401.333,47,422.786,47C444.24,47,465.026,47,475.419,47L485.813,47" id="d21793c5c62197893dark-L_P_D_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_P_D_0" data-points="W3sieCI6MzU3LjA5Mzc1LCJ5Ijo0N30seyJ4Ijo0MjMuNDUzMTI1LCJ5Ijo0N30seyJ4Ijo0ODkuODEyNSwieSI6NDd9XQ==" data-look="classic" marker-end="url(#d21793c5c62197893dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M680.984,47L696.965,47C712.945,47,744.906,47,776.201,47C807.495,47,838.122,47,853.436,47L868.75,47" id="d21793c5c62197893dark-L_D_H_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_D_H_0" data-points="W3sieCI6NjgwLjk4NDM3NSwieSI6NDd9LHsieCI6Nzc2Ljg2NzE4NzUsInkiOjQ3fSx7IngiOjg3Mi43NSwieSI6NDd9XQ==" data-look="classic" marker-end="url(#d21793c5c62197893dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M1021.125,47L1025.292,47C1029.458,47,1037.792,47,1045.458,47C1053.125,47,1060.125,47,1063.625,47L1067.125,47" id="d21793c5c62197893dark-L_H_A1_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_H_A1_0" data-points="W3sieCI6MTAyMS4xMjUsInkiOjQ3fSx7IngiOjEwNDYuMTI1LCJ5Ijo0N30seyJ4IjoxMDcxLjEyNSwieSI6NDd9XQ==" data-look="classic" marker-end="url(#d21793c5c62197893dark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;/g&gt;&lt;g class="edgeLabels"&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_SD_P_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(423.453125, 47)"&gt;&lt;g class="label" data-id="L_P_D_0" transform="translate(-41.359375, -12)"&gt;&lt;foreignObject width="82.71875" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;WebSocket&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(776.8671875, 47)"&gt;&lt;g class="label" data-id="L_D_H_0" transform="translate(-70.8828125, -24)"&gt;&lt;foreignObject width="141.765625" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;ssh -N -L&lt;br&gt;unix socket forward&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_H_A1_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="nodes"&gt;&lt;g class="node default" id="d21793c5c62197893dark-flowchart-SD-0" data-look="classic" transform="translate(105.390625, 47)"&gt;&lt;rect class="basic label-container" style="" x="-97.390625" y="-27" width="194.78125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-67.390625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="134.78125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;Stream Deck MK.2&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="d21793c5c62197893dark-flowchart-P-1" data-look="classic" transform="translate(304.9375, 47)"&gt;&lt;rect class="basic label-container" style="" x="-52.15625" y="-27" width="104.3125" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-22.15625, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="44.3125" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;plugin&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="d21793c5c62197893dark-flowchart-D-3" data-look="classic" transform="translate(585.3984375, 47)"&gt;&lt;rect class="basic label-container" style="" x="-95.5859375" y="-39" width="191.171875" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-65.5859375, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="131.171875" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;herddeck daemon&lt;br&gt;(laptop, launchd)&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="d21793c5c62197893dark-flowchart-H-5" data-look="classic" transform="translate(946.9375, 47)"&gt;&lt;rect class="basic label-container" style="" x="-74.1875" y="-39" width="148.375" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-44.1875, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="88.375" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;herdr server&lt;br&gt;(desktop)&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="d21793c5c62197893dark-flowchart-A1-7" data-look="classic" transform="translate(1145.8125, 47)"&gt;&lt;rect class="basic label-container" style="" x="-74.6875" y="-27" width="149.375" height="54"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-44.6875, -12)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="89.375" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;agent panes&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id="d21793c5c62197893dark-drop-shadow" height="130%" width="130%"&gt;&lt;feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#FFFFFF"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;defs&gt;&lt;filter id="d21793c5c62197893dark-drop-shadow-small" height="150%" width="150%"&gt;&lt;feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#FFFFFF"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;linearGradient id="d21793c5c62197893dark-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"&gt;&lt;stop offset="0%" stop-color="#cccccc" stop-opacity="1"&gt;&lt;/stop&gt;&lt;stop offset="100%" stop-color="hsl(180, 0%, 18.3529411765%)" stop-opacity="1"&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;/svg&gt;&lt;/div&gt;&#10;&lt;p&gt;I want to be careful about the word &amp;ldquo;free&amp;rdquo;, because there is a caveat and the obvious guess about it is wrong. &lt;code&gt;herdr --remote&lt;/code&gt; makes the human terminal experience a thin client, but it does not expose a local API socket proxying the remote server. The local &lt;code&gt;herdr-client.sock&lt;/code&gt; is a TUI attach endpoint and nothing more. The daemon needs its own forward. And the auto-sync that keeps herdr versions matched only fires on a human &lt;code&gt;--remote&lt;/code&gt; attach, never on the daemon&amp;rsquo;s forward, so a box you rarely attach to can quietly drift to an older protocol. Every target therefore gets pinged and version-checked on connect and drops to a warning state on mismatch, rather than being assumed compatible.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The bet, and it was a bet&#10; &lt;div id="the-bet-and-it-was-a-bet" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-bet-and-it-was-a-bet" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;I would rather leave this part out.&lt;/p&gt;&#10;&lt;p&gt;I have &lt;a href="https://nick-liu.com/posts/herdr-trial-agent-multiplexer/" &gt;a post on this blog about trialling herdr&lt;/a&gt;, with exit conditions written down before the trial started and a verdict due on August 16.&lt;/p&gt;&#10;&lt;p&gt;HerdDeck was built between August 6 and August 9.&lt;/p&gt;&#10;&lt;p&gt;So I deleted a working codebase and rebuilt my hardware controller on a substrate that was still on probation, a week before the trial I had written exit conditions for was due to conclude. If the verdict had gone the other way, the sunk cost would have been the whole rebuild plus the ClaudeDeck code I had already thrown away.&lt;/p&gt;&#10;&lt;p&gt;The verdict has since landed and it went my way. herdr graduated, which is the least interesting thing about it. It graduated on two of its three conditions, because the third turned out to be unanswerable from inside the window: a month of deliberately using one tool makes that tool look load-bearing whichever way the comparison would actually have gone. The trial is the data.&lt;/p&gt;&#10;&lt;p&gt;That is the same problem I had already created, one layer down and worse. Building HerdDeck did not merely make herdr look useful. It made herdr useful, to me, on hardware I reach for every day. A trial gets harder to fail once you have built something on the thing being trialled, and I built four days of work on it before the verdict was in.&lt;/p&gt;&#10;&lt;p&gt;A favourable answer does not make the sequence defensible and I am not going to dress it up as one. What makes it survivable rather than reckless is narrow: the deletion is reversible in the only sense that matters, because ClaudeDeck is still a repository and still works. What it cost is a real option, the ability to evaluate herdr without also evaluating four days of my own work sitting on top of it.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;What the protocol charged&#10; &lt;div id="what-the-protocol-charged" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-the-protocol-charged" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;These are the things you cannot learn by reading a schema, and they are the actual price of the substrate.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;One request per connection.&lt;/strong&gt; herdr answers the first NDJSON line on a connection and closes it. &lt;code&gt;events.subscribe&lt;/code&gt; is the exception: it converts its connection into a long-lived stream with a fixed subscription set. A client that wants to change what it is subscribed to has to open a new stream, which turns every subscription change into a make-before-break problem rather than a mutation.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Event names are inconsistent.&lt;/strong&gt; Lifecycle pushes use underscores, like &lt;code&gt;pane_created&lt;/code&gt;, with &lt;code&gt;data.type&lt;/code&gt; repeating the name. Status pushes use dots, like &lt;code&gt;pane.agent_status_changed&lt;/code&gt;. The cache accepts both spellings so no caller has to normalise first, which is a workaround rather than a fix.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Container closes do not cascade into pane events.&lt;/strong&gt; Closing a workspace or a tab emits &lt;code&gt;workspace_closed&lt;/code&gt; or &lt;code&gt;tab_closed&lt;/code&gt; and nothing else. No &lt;code&gt;pane_closed&lt;/code&gt; for the panes inside. A cache that only listens for pane events keeps zombie entries forever, which is exactly what mine did until I noticed.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;&lt;code&gt;workspace.close&lt;/code&gt; is asynchronous.&lt;/strong&gt; The &lt;code&gt;ok&lt;/code&gt; response returns immediately. The pane processes take one to two seconds to wind down before &lt;code&gt;workspace_closed&lt;/code&gt; fires.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;New subscribers get synthetic replay.&lt;/strong&gt; A fresh &lt;code&gt;events.subscribe&lt;/code&gt; stream receives &lt;code&gt;pane_created&lt;/code&gt; for panes that already existed. This is harmless under the ordering below, and it looks exactly like corruption if you are not expecting it.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;Per-pane subscriptions are all-or-nothing.&lt;/strong&gt; &lt;code&gt;pane.agent_status_changed&lt;/code&gt; requires a &lt;code&gt;pane_id&lt;/code&gt; and there is no wildcard. One stale id fails the entire batch. That one produced the most instructive bug in the project, and it is the rest of this post.&lt;/p&gt;&#10;&lt;p&gt;None of the above is a criticism of herdr, which is a good substrate and the reason the rebuild was worth attempting. It is the answer to the question &amp;ldquo;what did it cost&amp;rdquo;, which is the question a post like this usually skips.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The ordering that took three tries&#10; &lt;div id="the-ordering-that-took-three-tries" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-ordering-that-took-three-tries" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;The naive connect sequence is: snapshot the state, then subscribe to changes. That loses every transition landing in the gap between the two. The reverse, subscribe then snapshot, double-counts.&lt;/p&gt;&#10;&lt;p&gt;What actually works has five steps, and step four is the load-bearing one.&lt;/p&gt;&#10;&lt;div class="not-prose diagram diagram-light"&gt;&lt;svg id="dcd14d06924d1858alight" width="100%" xmlns="http://www.w3.org/2000/svg" style="max-width: 542.5px;" viewBox="-81.5 -10 542.5 579" role="graphics-document document" aria-roledescription="sequence"&gt;&lt;g&gt;&lt;rect x="261" y="493" fill="#eaeaea" stroke="#666" width="150" height="65" name="H" rx="3" ry="3" class="actor actor-bottom"&gt;&lt;/rect&gt;&lt;text x="336" y="525.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="336" dy="0"&gt;herdr&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;g&gt;&lt;rect x="0" y="493" fill="#eaeaea" stroke="#666" width="150" height="65" name="D" rx="3" ry="3" class="actor actor-bottom"&gt;&lt;/rect&gt;&lt;text x="75" y="525.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75" dy="0"&gt;daemon&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;g&gt;&lt;line id="actor7" x1="336" y1="65" x2="336" y2="493" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="H" data-et="life-line" data-id="H"&gt;&lt;/line&gt;&lt;g id="root-7" data-et="participant" data-type="participant" data-id="H"&gt;&lt;rect x="261" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" name="H" rx="3" ry="3" class="actor actor-top"&gt;&lt;/rect&gt;&lt;text x="336" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="336" dy="0"&gt;herdr&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;/g&gt;&lt;g&gt;&lt;line id="actor6" x1="75" y1="65" x2="75" y2="493" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="D" data-et="life-line" data-id="D"&gt;&lt;/line&gt;&lt;g id="root-6" data-et="participant" data-type="participant" data-id="D"&gt;&lt;rect x="0" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" name="D" rx="3" ry="3" class="actor actor-top"&gt;&lt;/rect&gt;&lt;text x="75" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75" dy="0"&gt;daemon&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;/g&gt;&lt;style&gt;#dcd14d06924d1858alight{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#dcd14d06924d1858alight .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#dcd14d06924d1858alight .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#dcd14d06924d1858alight .error-icon{fill:rgb(255, 255, 255);}#dcd14d06924d1858alight .error-text{fill:#000000;stroke:#000000;}#dcd14d06924d1858alight .edge-thickness-normal{stroke-width:1px;}#dcd14d06924d1858alight .edge-thickness-thick{stroke-width:3.5px;}#dcd14d06924d1858alight .edge-pattern-solid{stroke-dasharray:0;}#dcd14d06924d1858alight .edge-thickness-invisible{stroke-width:0;fill:none;}#dcd14d06924d1858alight .edge-pattern-dashed{stroke-dasharray:3;}#dcd14d06924d1858alight .edge-pattern-dotted{stroke-dasharray:2;}#dcd14d06924d1858alight .marker{fill:rgb(74, 86, 92);stroke:rgb(74, 86, 92);}#dcd14d06924d1858alight .marker.cross{stroke:rgb(74, 86, 92);}#dcd14d06924d1858alight svg{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;}#dcd14d06924d1858alight p{margin:0;}#dcd14d06924d1858alight .actor{stroke:rgb(204, 216, 222);fill:rgb(255, 255, 255);stroke-width:1;}#dcd14d06924d1858alight rect.actor.outer-path[data-look="neo"]{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858alight rect.note[data-look="neo"]{stroke:hsl(52.6829268293, 60%, 73.9215686275%);fill:#fff5ad;filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858alight text.actor&amp;gt;tspan{fill:#333;stroke:none;}#dcd14d06924d1858alight .actor-line{stroke:rgb(204, 216, 222);}#dcd14d06924d1858alight .innerArc{stroke-width:1.5;stroke-dasharray:none;}#dcd14d06924d1858alight .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#dcd14d06924d1858alight .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#dcd14d06924d1858alight [id$="-arrowhead"] path{fill:#333;stroke:#333;}#dcd14d06924d1858alight .sequenceNumber{fill:#b5a9a3;}#dcd14d06924d1858alight [id$="-sequencenumber"]{fill:#333;}#dcd14d06924d1858alight [id$="-crosshead"] path{fill:#333;stroke:#333;}#dcd14d06924d1858alight .messageText{fill:#333;stroke:none;}#dcd14d06924d1858alight .labelBox{stroke:rgb(204, 216, 222);fill:rgb(255, 255, 255);filter:none;}#dcd14d06924d1858alight .labelText,#dcd14d06924d1858alight .labelText&amp;gt;tspan{fill:#333;stroke:none;}#dcd14d06924d1858alight .loopText,#dcd14d06924d1858alight .loopText&amp;gt;tspan{fill:#333;stroke:none;}#dcd14d06924d1858alight .sectionTitle,#dcd14d06924d1858alight .sectionTitle&amp;gt;tspan{fill:#333;stroke:none;}#dcd14d06924d1858alight .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:rgb(204, 216, 222);fill:rgb(204, 216, 222);}#dcd14d06924d1858alight .note{stroke:hsl(52.6829268293, 60%, 73.9215686275%);fill:#fff5ad;}#dcd14d06924d1858alight .noteText,#dcd14d06924d1858alight .noteText&amp;gt;tspan{fill:#333;stroke:none;font-weight:normal;}#dcd14d06924d1858alight .activation0{fill:rgb(182, 240, 255);stroke:hsl(192.3287671233, 100%, 75.6862745098%);}#dcd14d06924d1858alight .activation1{fill:rgb(182, 240, 255);stroke:hsl(192.3287671233, 100%, 75.6862745098%);}#dcd14d06924d1858alight .activation2{fill:rgb(182, 240, 255);stroke:hsl(192.3287671233, 100%, 75.6862745098%);}#dcd14d06924d1858alight .actorPopupMenu{position:absolute;}#dcd14d06924d1858alight .actorPopupMenuPanel{position:absolute;fill:rgb(255, 255, 255);box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#dcd14d06924d1858alight .actor-man circle,#dcd14d06924d1858alight line{fill:rgb(255, 255, 255);stroke-width:2px;}#dcd14d06924d1858alight g rect.rect{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));stroke:rgb(204, 216, 222);}#dcd14d06924d1858alight .node .neo-node{stroke:rgb(204, 216, 222);}#dcd14d06924d1858alight [data-look="neo"].node rect,#dcd14d06924d1858alight [data-look="neo"].cluster rect,#dcd14d06924d1858alight [data-look="neo"].node polygon{stroke:url(#dcd14d06924d1858alight-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858alight [data-look="neo"].swimlane.cluster rect{filter:none;}#dcd14d06924d1858alight [data-look="neo"].node path{stroke:url(#dcd14d06924d1858alight-gradient);stroke-width:1px;}#dcd14d06924d1858alight [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858alight [data-look="neo"].node .neo-line path{stroke:rgb(204, 216, 222);filter:none;}#dcd14d06924d1858alight [data-look="neo"].node circle{stroke:url(#dcd14d06924d1858alight-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858alight [data-look="neo"].node circle .state-start{fill:#000000;}#dcd14d06924d1858alight [data-look="neo"].icon-shape .icon{fill:url(#dcd14d06924d1858alight-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858alight [data-look="neo"].icon-shape .icon-neo path{stroke:url(#dcd14d06924d1858alight-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858alight :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}&lt;/style&gt;&lt;g&gt;&lt;/g&gt;&lt;defs&gt;&lt;symbol id="dcd14d06924d1858alight-computer" width="24" height="24"&gt;&lt;path transform="scale(.5)" d="M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"&gt;&lt;/path&gt;&lt;/symbol&gt;&lt;/defs&gt;&lt;defs&gt;&lt;symbol id="dcd14d06924d1858alight-database" fill-rule="evenodd" clip-rule="evenodd"&gt;&lt;path transform="scale(.5)" d="M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"&gt;&lt;/path&gt;&lt;/symbol&gt;&lt;/defs&gt;&lt;defs&gt;&lt;symbol id="dcd14d06924d1858alight-clock" width="24" height="24"&gt;&lt;path transform="scale(.5)" d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"&gt;&lt;/path&gt;&lt;/symbol&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858alight-arrowhead" refX="7.9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M -1 0 L 10 5 L 0 10 z"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858alight-crosshead" markerWidth="15" markerHeight="8" orient="auto" refX="4" refY="4.5"&gt;&lt;path fill="none" stroke="#000000" stroke-width="1pt" d="M 1,2 L 6,7 M 6,2 L 1,7" style="stroke-dasharray: 0, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858alight-filled-head" refX="15.5" refY="7" markerWidth="20" markerHeight="28" orient="auto"&gt;&lt;path d="M 18,7 L9,13 L14,7 L9,1 Z"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858alight-sequencenumber" refX="15" refY="15" markerWidth="60" markerHeight="40" orient="auto"&gt;&lt;circle cx="15" cy="15" r="6"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858alight-solidTopArrowHead" refX="7.9" refY="7.25" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M 0 0 L 10 8 L 0 8 z"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858alight-solidBottomArrowHead" refX="7.9" refY="0.75" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M 0 0 L 10 0 L 0 8 z"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858alight-stickTopArrowHead" refX="7.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M 0 0 L 7 7" stroke="black" stroke-width="1.5" fill="none"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858alight-stickBottomArrowHead" refX="7.5" refY="0" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M 0 7 L 7 0" stroke="black" stroke-width="1.5" fill="none"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;g data-et="note" data-id="i3"&gt;&lt;rect x="0" y="213" fill="#EDF2AE" stroke="#666" width="150" height="56" class="note"&gt;&lt;/rect&gt;&lt;text x="75" y="218" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75"&gt;buffer everything&lt;/tspan&gt;&lt;/text&gt;&lt;text x="75" y="236" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75"&gt;it delivers&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;g data-et="note" data-id="i6"&gt;&lt;rect x="-31.5" y="371" fill="#EDF2AE" stroke="#666" width="213" height="56" class="note"&gt;&lt;/rect&gt;&lt;text x="75" y="376" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75"&gt;replay buffer, drop&lt;/tspan&gt;&lt;/text&gt;&lt;text x="75" y="394" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75"&gt;what snapshot already has&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;text x="204" y="80" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;ping&lt;/text&gt;&lt;line x1="76" y1="111" x2="332" y2="111" class="messageLine0" data-et="message" data-id="i0" data-from="D" data-to="H" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858alight-arrowhead)" style="fill: none;"&gt;&lt;/line&gt;&lt;text x="207" y="126" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;protocol 19&lt;/text&gt;&lt;line x1="335" y1="157" x2="79" y2="157" class="messageLine1" data-et="message" data-id="i1" data-from="H" data-to="D" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858alight-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"&gt;&lt;/line&gt;&lt;text x="204" y="172" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;events.subscribe&lt;/text&gt;&lt;line x1="76" y1="203" x2="332" y2="203" class="messageLine0" data-et="message" data-id="i2" data-from="D" data-to="H" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858alight-arrowhead)" style="fill: none;"&gt;&lt;/line&gt;&lt;text x="204" y="284" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;session.snapshot&lt;/text&gt;&lt;line x1="76" y1="315" x2="332" y2="315" class="messageLine0" data-et="message" data-id="i4" data-from="D" data-to="H" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858alight-arrowhead)" style="fill: none;"&gt;&lt;/line&gt;&lt;text x="207" y="330" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;panes + seq numbers&lt;/text&gt;&lt;line x1="335" y1="361" x2="79" y2="361" class="messageLine1" data-et="message" data-id="i5" data-from="H" data-to="D" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858alight-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"&gt;&lt;/line&gt;&lt;text x="204" y="442" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;subscribe per-pane status&lt;/text&gt;&lt;line x1="76" y1="473" x2="332" y2="473" class="messageLine0" data-et="message" data-id="i7" data-from="D" data-to="H" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858alight-arrowhead)" style="fill: none;"&gt;&lt;/line&gt;&lt;/svg&gt;&lt;/div&gt;&#10; &lt;div class="not-prose diagram diagram-dark"&gt;&lt;svg id="dcd14d06924d1858adark" width="100%" xmlns="http://www.w3.org/2000/svg" style="max-width: 542.5px;" viewBox="-81.5 -10 542.5 579" role="graphics-document document" aria-roledescription="sequence"&gt;&lt;g&gt;&lt;rect x="261" y="493" fill="#eaeaea" stroke="#666" width="150" height="65" name="H" rx="3" ry="3" class="actor actor-bottom"&gt;&lt;/rect&gt;&lt;text x="336" y="525.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="336" dy="0"&gt;herdr&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;g&gt;&lt;rect x="0" y="493" fill="#eaeaea" stroke="#666" width="150" height="65" name="D" rx="3" ry="3" class="actor actor-bottom"&gt;&lt;/rect&gt;&lt;text x="75" y="525.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75" dy="0"&gt;daemon&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;g&gt;&lt;line id="actor9" x1="336" y1="65" x2="336" y2="493" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="H" data-et="life-line" data-id="H"&gt;&lt;/line&gt;&lt;g id="root-9" data-et="participant" data-type="participant" data-id="H"&gt;&lt;rect x="261" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" name="H" rx="3" ry="3" class="actor actor-top"&gt;&lt;/rect&gt;&lt;text x="336" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="336" dy="0"&gt;herdr&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;/g&gt;&lt;g&gt;&lt;line id="actor8" x1="75" y1="65" x2="75" y2="493" class="actor-line 200" stroke-width="0.5px" stroke="#999" name="D" data-et="life-line" data-id="D"&gt;&lt;/line&gt;&lt;g id="root-8" data-et="participant" data-type="participant" data-id="D"&gt;&lt;rect x="0" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" name="D" rx="3" ry="3" class="actor actor-top"&gt;&lt;/rect&gt;&lt;text x="75" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor actor-box" style="text-anchor: middle; font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75" dy="0"&gt;daemon&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;/g&gt;&lt;style&gt;#dcd14d06924d1858adark{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;fill:#ccc;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#dcd14d06924d1858adark .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#dcd14d06924d1858adark .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#dcd14d06924d1858adark .error-icon{fill:#a44141;}#dcd14d06924d1858adark .error-text{fill:#ddd;stroke:#ddd;}#dcd14d06924d1858adark .edge-thickness-normal{stroke-width:1px;}#dcd14d06924d1858adark .edge-thickness-thick{stroke-width:3.5px;}#dcd14d06924d1858adark .edge-pattern-solid{stroke-dasharray:0;}#dcd14d06924d1858adark .edge-thickness-invisible{stroke-width:0;fill:none;}#dcd14d06924d1858adark .edge-pattern-dashed{stroke-dasharray:3;}#dcd14d06924d1858adark .edge-pattern-dotted{stroke-dasharray:2;}#dcd14d06924d1858adark .marker{fill:lightgrey;stroke:lightgrey;}#dcd14d06924d1858adark .marker.cross{stroke:lightgrey;}#dcd14d06924d1858adark svg{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;}#dcd14d06924d1858adark p{margin:0;}#dcd14d06924d1858adark .actor{stroke:#ccc;fill:#1f2020;stroke-width:1;}#dcd14d06924d1858adark rect.actor.outer-path[data-look="neo"]{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858adark rect.note[data-look="neo"]{stroke:hsl(180, 0%, 18.3529411765%);fill:hsl(180, 1.5873015873%, 28.3529411765%);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858adark text.actor&amp;gt;tspan{fill:lightgrey;stroke:none;}#dcd14d06924d1858adark .actor-line{stroke:#ccc;}#dcd14d06924d1858adark .innerArc{stroke-width:1.5;stroke-dasharray:none;}#dcd14d06924d1858adark .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:lightgrey;}#dcd14d06924d1858adark .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:lightgrey;}#dcd14d06924d1858adark [id$="-arrowhead"] path{fill:lightgrey;stroke:lightgrey;}#dcd14d06924d1858adark .sequenceNumber{fill:black;}#dcd14d06924d1858adark [id$="-sequencenumber"]{fill:lightgrey;}#dcd14d06924d1858adark [id$="-crosshead"] path{fill:lightgrey;stroke:lightgrey;}#dcd14d06924d1858adark .messageText{fill:lightgrey;stroke:none;}#dcd14d06924d1858adark .labelBox{stroke:#ccc;fill:#1f2020;filter:none;}#dcd14d06924d1858adark .labelText,#dcd14d06924d1858adark .labelText&amp;gt;tspan{fill:lightgrey;stroke:none;}#dcd14d06924d1858adark .loopText,#dcd14d06924d1858adark .loopText&amp;gt;tspan{fill:lightgrey;stroke:none;}#dcd14d06924d1858adark .sectionTitle,#dcd14d06924d1858adark .sectionTitle&amp;gt;tspan{fill:lightgrey;stroke:none;}#dcd14d06924d1858adark .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:#ccc;fill:#ccc;}#dcd14d06924d1858adark .note{stroke:hsl(180, 0%, 18.3529411765%);fill:hsl(180, 1.5873015873%, 28.3529411765%);}#dcd14d06924d1858adark .noteText,#dcd14d06924d1858adark .noteText&amp;gt;tspan{fill:rgb(183.8476190475, 181.5523809523, 181.5523809523);stroke:none;font-weight:normal;}#dcd14d06924d1858adark .activation0{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:#ccc;}#dcd14d06924d1858adark .activation1{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:#ccc;}#dcd14d06924d1858adark .activation2{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:#ccc;}#dcd14d06924d1858adark .actorPopupMenu{position:absolute;}#dcd14d06924d1858adark .actorPopupMenuPanel{position:absolute;fill:#1f2020;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#dcd14d06924d1858adark .actor-man circle,#dcd14d06924d1858adark line{fill:#1f2020;stroke-width:2px;}#dcd14d06924d1858adark g rect.rect{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));stroke:#ccc;}#dcd14d06924d1858adark .node .neo-node{stroke:#ccc;}#dcd14d06924d1858adark [data-look="neo"].node rect,#dcd14d06924d1858adark [data-look="neo"].cluster rect,#dcd14d06924d1858adark [data-look="neo"].node polygon{stroke:url(#dcd14d06924d1858adark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858adark [data-look="neo"].swimlane.cluster rect{filter:none;}#dcd14d06924d1858adark [data-look="neo"].node path{stroke:url(#dcd14d06924d1858adark-gradient);stroke-width:1px;}#dcd14d06924d1858adark [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858adark [data-look="neo"].node .neo-line path{stroke:#ccc;filter:none;}#dcd14d06924d1858adark [data-look="neo"].node circle{stroke:url(#dcd14d06924d1858adark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858adark [data-look="neo"].node circle .state-start{fill:#000000;}#dcd14d06924d1858adark [data-look="neo"].icon-shape .icon{fill:url(#dcd14d06924d1858adark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858adark [data-look="neo"].icon-shape .icon-neo path{stroke:url(#dcd14d06924d1858adark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dcd14d06924d1858adark :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}&lt;/style&gt;&lt;g&gt;&lt;/g&gt;&lt;defs&gt;&lt;symbol id="dcd14d06924d1858adark-computer" width="24" height="24"&gt;&lt;path transform="scale(.5)" d="M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"&gt;&lt;/path&gt;&lt;/symbol&gt;&lt;/defs&gt;&lt;defs&gt;&lt;symbol id="dcd14d06924d1858adark-database" fill-rule="evenodd" clip-rule="evenodd"&gt;&lt;path transform="scale(.5)" d="M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"&gt;&lt;/path&gt;&lt;/symbol&gt;&lt;/defs&gt;&lt;defs&gt;&lt;symbol id="dcd14d06924d1858adark-clock" width="24" height="24"&gt;&lt;path transform="scale(.5)" d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"&gt;&lt;/path&gt;&lt;/symbol&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858adark-arrowhead" refX="7.9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M -1 0 L 10 5 L 0 10 z"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858adark-crosshead" markerWidth="15" markerHeight="8" orient="auto" refX="4" refY="4.5"&gt;&lt;path fill="none" stroke="#000000" stroke-width="1pt" d="M 1,2 L 6,7 M 6,2 L 1,7" style="stroke-dasharray: 0, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858adark-filled-head" refX="15.5" refY="7" markerWidth="20" markerHeight="28" orient="auto"&gt;&lt;path d="M 18,7 L9,13 L14,7 L9,1 Z"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858adark-sequencenumber" refX="15" refY="15" markerWidth="60" markerHeight="40" orient="auto"&gt;&lt;circle cx="15" cy="15" r="6"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858adark-solidTopArrowHead" refX="7.9" refY="7.25" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M 0 0 L 10 8 L 0 8 z"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858adark-solidBottomArrowHead" refX="7.9" refY="0.75" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M 0 0 L 10 0 L 0 8 z"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858adark-stickTopArrowHead" refX="7.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M 0 0 L 7 7" stroke="black" stroke-width="1.5" fill="none"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;defs&gt;&lt;marker id="dcd14d06924d1858adark-stickBottomArrowHead" refX="7.5" refY="0" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto-start-reverse"&gt;&lt;path d="M 0 7 L 7 0" stroke="black" stroke-width="1.5" fill="none"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;g data-et="note" data-id="i3"&gt;&lt;rect x="0" y="213" fill="#EDF2AE" stroke="#666" width="150" height="56" class="note"&gt;&lt;/rect&gt;&lt;text x="75" y="218" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75"&gt;buffer everything&lt;/tspan&gt;&lt;/text&gt;&lt;text x="75" y="236" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75"&gt;it delivers&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;g data-et="note" data-id="i6"&gt;&lt;rect x="-31.5" y="371" fill="#EDF2AE" stroke="#666" width="213" height="56" class="note"&gt;&lt;/rect&gt;&lt;text x="75" y="376" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75"&gt;replay buffer, drop&lt;/tspan&gt;&lt;/text&gt;&lt;text x="75" y="394" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="noteText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;&lt;tspan x="75"&gt;what snapshot already has&lt;/tspan&gt;&lt;/text&gt;&lt;/g&gt;&lt;text x="204" y="80" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;ping&lt;/text&gt;&lt;line x1="76" y1="111" x2="332" y2="111" class="messageLine0" data-et="message" data-id="i0" data-from="D" data-to="H" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858adark-arrowhead)" style="fill: none;"&gt;&lt;/line&gt;&lt;text x="207" y="126" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;protocol 19&lt;/text&gt;&lt;line x1="335" y1="157" x2="79" y2="157" class="messageLine1" data-et="message" data-id="i1" data-from="H" data-to="D" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858adark-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"&gt;&lt;/line&gt;&lt;text x="204" y="172" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;events.subscribe&lt;/text&gt;&lt;line x1="76" y1="203" x2="332" y2="203" class="messageLine0" data-et="message" data-id="i2" data-from="D" data-to="H" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858adark-arrowhead)" style="fill: none;"&gt;&lt;/line&gt;&lt;text x="204" y="284" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;session.snapshot&lt;/text&gt;&lt;line x1="76" y1="315" x2="332" y2="315" class="messageLine0" data-et="message" data-id="i4" data-from="D" data-to="H" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858adark-arrowhead)" style="fill: none;"&gt;&lt;/line&gt;&lt;text x="207" y="330" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;panes + seq numbers&lt;/text&gt;&lt;line x1="335" y1="361" x2="79" y2="361" class="messageLine1" data-et="message" data-id="i5" data-from="H" data-to="D" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858adark-arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"&gt;&lt;/line&gt;&lt;text x="204" y="442" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-size: 16px; font-weight: 400;"&gt;subscribe per-pane status&lt;/text&gt;&lt;line x1="76" y1="473" x2="332" y2="473" class="messageLine0" data-et="message" data-id="i7" data-from="D" data-to="H" stroke-width="2" stroke="none" marker-end="url(#dcd14d06924d1858adark-arrowhead)" style="fill: none;"&gt;&lt;/line&gt;&lt;/svg&gt;&lt;/div&gt;&#10;&lt;p&gt;Buffered events are either already reflected in the snapshot or strictly newer than it, and &lt;code&gt;state_change_seq&lt;/code&gt; tells you which. Replayed events carrying no sequence number get dropped whenever the pane is already cached, and applied only when they describe something the snapshot missed, such as a pane created after it was taken.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;When the recovery mechanism prevents recovery&#10; &lt;div id="when-the-recovery-mechanism-prevents-recovery" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#when-the-recovery-mechanism-prevents-recovery" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;On a busy session the daemon reconnected 24 times in 12 seconds.&lt;/p&gt;&#10;&lt;p&gt;The cause is the all-or-nothing subscription rule meeting reality. Short-lived panes, popups and plugin panes, routinely vanish between their &lt;code&gt;pane_created&lt;/code&gt; event and the resubscribe that event triggers. herdr fails the entire subscribe batch when one &lt;code&gt;pane_id&lt;/code&gt; in it is stale. Tearing down the connection on that failure and reconnecting rebuilds the identical doomed batch, which fails identically, which tears down the connection.&lt;/p&gt;&#10;&lt;p&gt;An endless &lt;code&gt;online&lt;/code&gt; to &lt;code&gt;connecting&lt;/code&gt; flap, in which the recovery mechanism was the only thing preventing recovery.&lt;/p&gt;&#10;&lt;p&gt;The fix prunes the vanished pane out of the cache and retries, bounded:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ts" data-lang="ts"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cm"&gt;/** Bound on per-open prune retries, so a pathological server can&amp;#39;t spin&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cm"&gt; * this loop forever. */&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MAX_STALE_PANE_PRUNES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;stalePaneId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;: &lt;span class="kt"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;HerdrApiError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;pane_not_found&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sr"&gt;/pane (\S+) not found/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;Reconnects went from 24 in 12 seconds to one.&lt;/p&gt;&#10;&lt;p&gt;The bound matters more than the prune. Retry-until-it-works against a server that will never agree is the same flap with extra steps, so the loop gives up after eight prunes and throws with a message naming the count. A recovery path that cannot fail is not a recovery path.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;What it came to&#10; &lt;div id="what-it-came-to" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-it-came-to" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Four days, 36 commits on &lt;code&gt;main&lt;/code&gt;, 35 of them merged through pull requests behind seven required checks. Four packages, 504 tests across 32 files, and close to one line of test for every line of source, which was not a target so much as a description of where the difficulty lived.&lt;/p&gt;&#10;&lt;p&gt;The difficulty did not live in the Stream Deck. It lived in the seam.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Lessons&#10; &lt;div id="lessons" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#lessons" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Changing the substrate is a deletion strategy. If a dependency already tracks the thing you are inferring, the win is measured in subsystems removed, not features added.&lt;/li&gt;&#10;&lt;li&gt;Ask what a protocol costs before you claim it saved you something. Event naming, connection lifetime and subscription granularity are the parts no schema documents and the parts you will actually pay for.&lt;/li&gt;&#10;&lt;li&gt;Subscribe first and buffer, then snapshot, then replay against the sequence numbers. Snapshot-then-subscribe drops transitions and subscribe-then-snapshot double counts.&lt;/li&gt;&#10;&lt;li&gt;If one bad id fails a whole batch, reconnecting rebuilds the same bad batch. Prune the offending item and retry, bounded, or the recovery path becomes the outage.&lt;/li&gt;&#10;&lt;li&gt;Building on a tool you are still evaluating makes the evaluation harder to fail. Write down that you did it, because sunk cost will not remind you later.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h2 class="relative group"&gt;References&#10; &lt;div id="references" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#references" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;herdr: &lt;a href="https://herdr.dev" target="_blank" rel="noreferrer"&gt;https://herdr.dev&lt;/a&gt; (source: &lt;a href="https://github.com/herdrdev/herdr" target="_blank" rel="noreferrer"&gt;https://github.com/herdrdev/herdr&lt;/a&gt;)&lt;/li&gt;&#10;&lt;li&gt;HerdDeck: &lt;a href="https://github.com/nickboy/herddeck" target="_blank" rel="noreferrer"&gt;https://github.com/nickboy/herddeck&lt;/a&gt;. Engineering notes, including the protocol behaviour above, in &lt;a href="https://github.com/nickboy/herddeck/blob/main/docs/engineering-notes.md" target="_blank" rel="noreferrer"&gt;&lt;code&gt;docs/engineering-notes.md&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;ClaudeDeck, the predecessor: &lt;a href="https://github.com/nickboy/claudedeck" target="_blank" rel="noreferrer"&gt;https://github.com/nickboy/claudedeck&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;The herdr trial this rebuild jumped ahead of: &lt;a href="https://nick-liu.com/posts/herdr-trial-agent-multiplexer/" &gt;Running six agents made tab patrol my biggest time sink. So: a herdr trial.&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;The hook layer HerdDeck deleted: &lt;a href="https://nick-liu.com/posts/claude-code-hooks-reality/" &gt;The Claude Code hooks docs are wrong. Here&amp;rsquo;s what&amp;rsquo;s actually on the wire.&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;The PTY runner HerdDeck deleted: &lt;a href="https://nick-liu.com/posts/pty-wrap-migration/" &gt;I split my daemon in two so a Node subprocess could own the PTY&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;The codesigning and TCC path HerdDeck deleted: &lt;a href="https://nick-liu.com/posts/tcc-cdhash-trap/" &gt;TCC pins your Accessibility grant to a cdhash. Every rebuild breaks it.&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</content:encoded></item><item><title>Running six agents made tab patrol my biggest time sink. So: a herdr trial.</title><link>https://nick-liu.com/posts/herdr-trial-agent-multiplexer/</link><pubDate>Sun, 16 Aug 2026 00:00:00 +0000</pubDate><author>nickboy@users.noreply.github.com (Nick Liu)</author><guid>https://nick-liu.com/posts/herdr-trial-agent-multiplexer/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; &#10;Once I had six Claude Code sessions open at once, the most expensive part of my workflow was not writing code. It was patrol: cycling through tabs to see which agent was still running and which one had been sitting on a question for ten minutes. tmux has no concept of any of this. To tmux, every pane is a rectangle of terminal, equally interesting, equally mute.&#10;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;herdr&amp;rsquo;s pitch lands exactly on that pain: panes are still real terminals, but a sidebar shows each agent&amp;rsquo;s live state. So it got a one-month trial, with exit conditions written down before it started. The verdict lands on August 16, and this post is honest about still being inside the window.&lt;/p&gt;</description><content:encoded>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; &#10;Once I had six Claude Code sessions open at once, the most expensive part of my workflow was not writing code. It was patrol: cycling through tabs to see which agent was still running and which one had been sitting on a question for ten minutes. tmux has no concept of any of this. To tmux, every pane is a rectangle of terminal, equally interesting, equally mute.&#10;&#10;&lt;/div&gt;&#10;&#10;&lt;p&gt;herdr&amp;rsquo;s pitch lands exactly on that pain: panes are still real terminals, but a sidebar shows each agent&amp;rsquo;s live state. So it got a one-month trial, with exit conditions written down before it started. The verdict lands on August 16, and this post is honest about still being inside the window.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;What herdr actually gives you&#10; &lt;div id="what-herdr-actually-gives-you" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#what-herdr-actually-gives-you" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;The panes are real terminals, not a chat UI wearing a terminal costume. The sidebar shows live agent state, which is the anti-patrol feature. And session restore is exact per pane: an integration hook reports each pane&amp;rsquo;s session ref, so restore runs &lt;code&gt;claude --resume &amp;lt;session-id&amp;gt;&lt;/code&gt; for precisely the conversation that pane held.&lt;/p&gt;&#10;&lt;p&gt;The tmux comparison on that last point is what sold the trial. With resurrect plus a &lt;code&gt;~claude-&amp;gt;claude --continue&lt;/code&gt; rule, tmux restore is an approximation: the moment two panes share a working directory, &lt;code&gt;--continue&lt;/code&gt; cannot tell them apart and per-pane precision is gone.&lt;/p&gt;&#10;&lt;p&gt;Two plugins grew out of the trial along the way: &lt;code&gt;reviewr&lt;/code&gt;, which binds &lt;code&gt;prefix+e&lt;/code&gt; to open the agent&amp;rsquo;s diff in a side pane for inline comments, and &lt;code&gt;tab-smart-rename&lt;/code&gt;, which names tabs after whatever topic the agent is currently working on. The patrol problem, attacked from two more angles.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The decision process mattered more than the tool&#10; &lt;div id="the-decision-process-mattered-more-than-the-tool" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-decision-process-mattered-more-than-the-tool" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;The first research pass on herdr concluded &amp;ldquo;wait for 1.0&amp;rdquo;. Safe advice. Almost nobody ever checks it.&lt;/p&gt;&#10;&lt;p&gt;The second pass did source-level verification instead: cloned the AGPL source, actually read &lt;code&gt;keybinds.rs&lt;/code&gt; and &lt;code&gt;xtgettcap.rs&lt;/code&gt;, ran headless server tests, and swept the plugin ecosystem. The conclusion flipped. Undercurl survives (through libghostty-vt), the kitty keyboard protocol is actively tracked, vim-navigation and sessionizer plugins exist, and the plugin manager pins by commit SHA via &lt;code&gt;--ref&lt;/code&gt;. The ecosystem is around 500 plugins, and the top ten had all seen a commit within the past week. At that velocity, and with plugin repos sitting at 30 to 66 stars, pinning to a SHA is a survival requirement.&lt;/p&gt;&#10;&lt;p&gt;&amp;ldquo;Wait for it to mature&amp;rdquo; flipped to &amp;ldquo;trial it, with exits defined&amp;rdquo; only because someone read the source. That is a repeating theme this month.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The operations incident log&#10; &lt;div id="the-operations-incident-log" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-operations-incident-log" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;The wire protocol refuses any version skew.&lt;/strong&gt; The moment an upgrade lands, a running server becomes unreachable to the new client. No negotiation, no grace. My first countermeasure was pinning the version. I later unpinned it deliberately, because the release velocity is part of what I am trialing, and moved the protection into daily maintenance: detect that an upgrade landed while a server is alive, and notify, instead of killing anything.&lt;/p&gt;&#10;&lt;p&gt;That guard is a pure function so it can be unit tested, and the tests bind a real unix socket and exercise all four polarities:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dm_herdr_strand_detected&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;local&lt;/span&gt; &lt;span class="nv"&gt;before&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="nv"&gt;after&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;local&lt;/span&gt; &lt;span class="nv"&gt;sock&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;3&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="p"&gt;/.config/herdr/herdr.sock&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="o"&gt;[&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$before&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$before&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; !&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$after&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; -S &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$sock&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python3 -c &lt;span class="s2"&gt;&amp;#34;import socket; \&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; socket.socket(socket.AF_UNIX).bind(&amp;#39;&lt;/span&gt;&lt;span class="nv"&gt;$HERDR_UT_DIR&lt;/span&gt;&lt;span class="s2"&gt;/live.sock&amp;#39;)&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;run_test &lt;span class="s2"&gt;&amp;#34;herdr strand: mismatch + live socket -&amp;gt; detected&amp;#34;&lt;/span&gt; ...&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;run_test &lt;span class="s2"&gt;&amp;#34;herdr strand: same version -&amp;gt; silent&amp;#34;&lt;/span&gt; ...&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;run_test &lt;span class="s2"&gt;&amp;#34;herdr strand: no socket -&amp;gt; silent&amp;#34;&lt;/span&gt; ...&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;run_test &lt;span class="s2"&gt;&amp;#34;herdr strand: herdr absent (empty before) -&amp;gt; silent&amp;#34;&lt;/span&gt; ...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;&lt;strong&gt;The guard may only ever call &lt;code&gt;herdr --version&lt;/code&gt;.&lt;/strong&gt; Any other subcommand can auto-start a server, and a server started from the maintenance job inherits the launchd environment. That is exactly the bug class behind a &lt;code&gt;CLAUDECODE=1&lt;/code&gt; leak that once broke zoxide in every pane. The rule is enforced by a tripwire test, because rules that live in comments decay:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Tripwire: the maintenance run must never call the herdr CLI beyond&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# --version, because any other subcommand can auto-start a server that&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# inherits the launchd environment (the CLAUDECODE-leak bug class).&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;run_test &lt;span class="s2"&gt;&amp;#34;Maintenance calls herdr CLI only with --version&amp;#34;&lt;/span&gt; ...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;&lt;strong&gt;The &lt;code&gt;CLAUDECODE&lt;/code&gt; leak itself has an interesting fix.&lt;/strong&gt; You cannot decide &amp;ldquo;is this a real agent shell&amp;rdquo; by checking interactivity, because Claude&amp;rsquo;s Bash tool replays a snapshot of the environment. The reliable signal is process ancestry: walk up the parent chain, and whichever you meet first decides.&lt;/p&gt;&#10;&lt;div class="not-prose diagram diagram-light"&gt;&lt;svg id="dd6f5be61d27082eflight" width="100%" xmlns="http://www.w3.org/2000/svg" class="flowchart" style="max-width: 506.046875px;" viewBox="0 0 506.046875 636.046875" role="graphics-document document" aria-roledescription="flowchart-v2"&gt;&lt;style&gt;#dd6f5be61d27082eflight{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#dd6f5be61d27082eflight .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#dd6f5be61d27082eflight .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#dd6f5be61d27082eflight .error-icon{fill:rgb(255, 255, 255);}#dd6f5be61d27082eflight .error-text{fill:#000000;stroke:#000000;}#dd6f5be61d27082eflight .edge-thickness-normal{stroke-width:1px;}#dd6f5be61d27082eflight .edge-thickness-thick{stroke-width:3.5px;}#dd6f5be61d27082eflight .edge-pattern-solid{stroke-dasharray:0;}#dd6f5be61d27082eflight .edge-thickness-invisible{stroke-width:0;fill:none;}#dd6f5be61d27082eflight .edge-pattern-dashed{stroke-dasharray:3;}#dd6f5be61d27082eflight .edge-pattern-dotted{stroke-dasharray:2;}#dd6f5be61d27082eflight .marker{fill:rgb(74, 86, 92);stroke:rgb(74, 86, 92);}#dd6f5be61d27082eflight .marker.cross{stroke:rgb(74, 86, 92);}#dd6f5be61d27082eflight svg{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;}#dd6f5be61d27082eflight p{margin:0;}#dd6f5be61d27082eflight .label{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;color:#333;}#dd6f5be61d27082eflight .cluster-label text{fill:#000000;}#dd6f5be61d27082eflight .cluster-label span{color:#000000;}#dd6f5be61d27082eflight .cluster-label span p{background-color:transparent;}#dd6f5be61d27082eflight .label text,#dd6f5be61d27082eflight span{fill:#333;color:#333;}#dd6f5be61d27082eflight .node rect,#dd6f5be61d27082eflight .node circle,#dd6f5be61d27082eflight .node ellipse,#dd6f5be61d27082eflight .node polygon,#dd6f5be61d27082eflight .node path{fill:rgb(255, 255, 255);stroke:rgb(204, 216, 222);stroke-width:1px;}#dd6f5be61d27082eflight .rough-node .label text,#dd6f5be61d27082eflight .node .label text,#dd6f5be61d27082eflight .image-shape .label,#dd6f5be61d27082eflight .icon-shape .label{text-anchor:middle;}#dd6f5be61d27082eflight .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#dd6f5be61d27082eflight .rough-node .label,#dd6f5be61d27082eflight .node .label,#dd6f5be61d27082eflight .image-shape .label,#dd6f5be61d27082eflight .icon-shape .label{text-align:center;}#dd6f5be61d27082eflight .node.clickable{cursor:pointer;}#dd6f5be61d27082eflight .root .anchor path{fill:rgb(74, 86, 92)!important;stroke-width:0;stroke:rgb(74, 86, 92);}#dd6f5be61d27082eflight .arrowheadPath{fill:#000000;}#dd6f5be61d27082eflight .edgePath .path{stroke:rgb(74, 86, 92);stroke-width:1px;}#dd6f5be61d27082eflight .flowchart-link{stroke:rgb(74, 86, 92);fill:none;}#dd6f5be61d27082eflight .edgeLabel{background-color:rgb(182, 240, 255);text-align:center;}#dd6f5be61d27082eflight .edgeLabel p{background-color:rgb(182, 240, 255);}#dd6f5be61d27082eflight .edgeLabel rect{opacity:0.5;background-color:rgb(182, 240, 255);fill:rgb(182, 240, 255);}#dd6f5be61d27082eflight .labelBkg{background-color:rgba(182, 240, 255, 0.5);}#dd6f5be61d27082eflight .cluster rect{fill:rgb(255, 255, 255);stroke:rgb(129, 146, 154);stroke-width:1px;}#dd6f5be61d27082eflight .cluster text{fill:#000000;}#dd6f5be61d27082eflight .cluster span{color:#000000;}#dd6f5be61d27082eflight div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:12px;background:rgb(255, 255, 255);border:1px solid rgb(129, 146, 154);border-radius:2px;pointer-events:none;z-index:100;}#dd6f5be61d27082eflight .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#dd6f5be61d27082eflight rect.text{fill:none;stroke-width:0;}#dd6f5be61d27082eflight .icon-shape,#dd6f5be61d27082eflight .image-shape{background-color:rgb(182, 240, 255);text-align:center;}#dd6f5be61d27082eflight .icon-shape p,#dd6f5be61d27082eflight .image-shape p{background-color:rgb(182, 240, 255);padding:2px;}#dd6f5be61d27082eflight .icon-shape .label rect,#dd6f5be61d27082eflight .image-shape .label rect{opacity:0.5;background-color:rgb(182, 240, 255);fill:rgb(182, 240, 255);}#dd6f5be61d27082eflight .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#dd6f5be61d27082eflight .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#dd6f5be61d27082eflight .node .neo-node{stroke:rgb(204, 216, 222);}#dd6f5be61d27082eflight [data-look="neo"].node rect,#dd6f5be61d27082eflight [data-look="neo"].cluster rect,#dd6f5be61d27082eflight [data-look="neo"].node polygon{stroke:url(#dd6f5be61d27082eflight-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082eflight [data-look="neo"].swimlane.cluster rect{filter:none;}#dd6f5be61d27082eflight [data-look="neo"].node path{stroke:url(#dd6f5be61d27082eflight-gradient);stroke-width:1px;}#dd6f5be61d27082eflight [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082eflight [data-look="neo"].node .neo-line path{stroke:rgb(204, 216, 222);filter:none;}#dd6f5be61d27082eflight [data-look="neo"].node circle{stroke:url(#dd6f5be61d27082eflight-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082eflight [data-look="neo"].node circle .state-start{fill:#000000;}#dd6f5be61d27082eflight [data-look="neo"].icon-shape .icon{fill:url(#dd6f5be61d27082eflight-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082eflight [data-look="neo"].icon-shape .icon-neo path{stroke:url(#dd6f5be61d27082eflight-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082eflight :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}&lt;/style&gt;&lt;g&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"&gt;&lt;path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"&gt;&lt;polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/polygon&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082eflight_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;g class="root"&gt;&lt;g class="clusters"&gt;&lt;/g&gt;&lt;g class="edgePaths"&gt;&lt;path d="M236.465,86L236.465,90.167C236.465,94.333,236.465,102.667,236.465,110.333C236.465,118,236.465,125,236.465,128.5L236.465,132" id="dd6f5be61d27082eflight-L_A_B_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_A_B_0" data-points="W3sieCI6MjM2LjQ2NDg0Mzc1LCJ5Ijo4Nn0seyJ4IjoyMzYuNDY0ODQzNzUsInkiOjExMX0seyJ4IjoyMzYuNDY0ODQzNzUsInkiOjEzNn1d" data-look="classic" marker-end="url(#dd6f5be61d27082eflight_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M236.465,214L236.465,218.167C236.465,222.333,236.465,230.667,236.465,238.333C236.465,246,236.465,253,236.465,256.5L236.465,260" id="dd6f5be61d27082eflight-L_B_C_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_B_C_0" data-points="W3sieCI6MjM2LjQ2NDg0Mzc1LCJ5IjoyMTR9LHsieCI6MjM2LjQ2NDg0Mzc1LCJ5IjoyMzl9LHsieCI6MjM2LjQ2NDg0Mzc1LCJ5IjoyNjR9XQ==" data-look="classic" marker-end="url(#dd6f5be61d27082eflight_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M188.748,404.33L174.199,418.45C159.65,432.569,130.552,460.808,116.002,482.427C101.453,504.047,101.453,519.047,101.453,526.547L101.453,534.047" id="dd6f5be61d27082eflight-L_C_D_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_C_D_0" data-points="W3sieCI6MTg4Ljc0ODM0NjEzMTQzMzEsInkiOjQwNC4zMzAzNzczODE0MzMxfSx7IngiOjEwMS40NTMxMjUsInkiOjQ4OS4wNDY4NzV9LHsieCI6MTAxLjQ1MzEyNSwieSI6NTM4LjA0Njg3NX1d" data-look="classic" marker-end="url(#dd6f5be61d27082eflight_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M284.181,404.33L298.731,418.45C313.28,432.569,342.378,460.808,356.927,480.427C371.477,500.047,371.477,511.047,371.477,516.547L371.477,522.047" id="dd6f5be61d27082eflight-L_C_E_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_C_E_0" data-points="W3sieCI6Mjg0LjE4MTM0MTM2ODU2NjksInkiOjQwNC4zMzAzNzczODE0MzMxfSx7IngiOjM3MS40NzY1NjI1LCJ5Ijo0ODkuMDQ2ODc1fSx7IngiOjM3MS40NzY1NjI1LCJ5Ijo1MjYuMDQ2ODc1fV0=" data-look="classic" marker-end="url(#dd6f5be61d27082eflight_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;/g&gt;&lt;g class="edgeLabels"&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_A_B_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_B_C_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(101.453125, 489.046875)"&gt;&lt;g class="label" data-id="L_C_D_0" transform="translate(-27.75, -12)"&gt;&lt;foreignObject width="55.5" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;claude*&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(371.4765625, 489.046875)"&gt;&lt;g class="label" data-id="L_C_E_0" transform="translate(-23.0078125, -12)"&gt;&lt;foreignObject width="46.015625" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;herdr*&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="nodes"&gt;&lt;g class="node default" id="dd6f5be61d27082eflight-flowchart-A-0" data-look="classic" transform="translate(236.46484375, 47)"&gt;&lt;rect class="basic label-container" style="" x="-120.0546875" y="-39" width="240.109375" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-90.0546875, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="180.109375" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;new shell in a herdr pane&lt;br&gt;sees CLAUDECODE=1&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="dd6f5be61d27082eflight-flowchart-B-1" data-look="classic" transform="translate(236.46484375, 175)"&gt;&lt;rect class="basic label-container" style="" x="-96.90625" y="-39" width="193.8125" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-66.90625, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="133.8125" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;walk up the parent&lt;br&gt;process chain&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="dd6f5be61d27082eflight-flowchart-C-3" data-look="classic" transform="translate(236.46484375, 358.0234375)"&gt;&lt;polygon points="94.0234375,0 188.046875,-94.0234375 94.0234375,-188.046875 0,-94.0234375" class="label-container" transform="translate(-93.5234375, 94.0234375)"&gt;&lt;/polygon&gt;&lt;g class="label" style="" transform="translate(-55.0234375, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="110.046875" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;which ancestor&lt;br&gt;appears first?&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="dd6f5be61d27082eflight-flowchart-D-5" data-look="classic" transform="translate(101.453125, 577.046875)"&gt;&lt;rect class="basic label-container" style="" x="-93.453125" y="-39" width="186.90625" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-63.453125, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="126.90625" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;a real agent shell:&lt;br&gt;keep the flag&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="dd6f5be61d27082eflight-flowchart-E-7" data-look="classic" transform="translate(371.4765625, 577.046875)"&gt;&lt;rect class="basic label-container" style="" x="-126.5703125" y="-51" width="253.140625" height="102"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-96.5703125, -36)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="193.140625" height="72"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;reached the pane's server:&lt;br&gt;the flag is leaked residue,&lt;br&gt;unset it&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id="dd6f5be61d27082eflight-drop-shadow" height="130%" width="130%"&gt;&lt;feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;defs&gt;&lt;filter id="dd6f5be61d27082eflight-drop-shadow-small" height="150%" width="150%"&gt;&lt;feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;linearGradient id="dd6f5be61d27082eflight-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"&gt;&lt;stop offset="0%" stop-color="rgb(204, 216, 222)" stop-opacity="1"&gt;&lt;/stop&gt;&lt;stop offset="100%" stop-color="rgb(28, 209, 255)" stop-opacity="1"&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;/svg&gt;&lt;/div&gt;&#10; &lt;div class="not-prose diagram diagram-dark"&gt;&lt;svg id="dd6f5be61d27082efdark" width="100%" xmlns="http://www.w3.org/2000/svg" class="flowchart" style="max-width: 506.046875px;" viewBox="0 0 506.046875 636.046875" role="graphics-document document" aria-roledescription="flowchart-v2"&gt;&lt;style&gt;#dd6f5be61d27082efdark{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;fill:#ccc;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#dd6f5be61d27082efdark .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#dd6f5be61d27082efdark .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#dd6f5be61d27082efdark .error-icon{fill:#a44141;}#dd6f5be61d27082efdark .error-text{fill:#ddd;stroke:#ddd;}#dd6f5be61d27082efdark .edge-thickness-normal{stroke-width:1px;}#dd6f5be61d27082efdark .edge-thickness-thick{stroke-width:3.5px;}#dd6f5be61d27082efdark .edge-pattern-solid{stroke-dasharray:0;}#dd6f5be61d27082efdark .edge-thickness-invisible{stroke-width:0;fill:none;}#dd6f5be61d27082efdark .edge-pattern-dashed{stroke-dasharray:3;}#dd6f5be61d27082efdark .edge-pattern-dotted{stroke-dasharray:2;}#dd6f5be61d27082efdark .marker{fill:lightgrey;stroke:lightgrey;}#dd6f5be61d27082efdark .marker.cross{stroke:lightgrey;}#dd6f5be61d27082efdark svg{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:16px;}#dd6f5be61d27082efdark p{margin:0;}#dd6f5be61d27082efdark .label{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;color:#ccc;}#dd6f5be61d27082efdark .cluster-label text{fill:#F9FFFE;}#dd6f5be61d27082efdark .cluster-label span{color:#F9FFFE;}#dd6f5be61d27082efdark .cluster-label span p{background-color:transparent;}#dd6f5be61d27082efdark .label text,#dd6f5be61d27082efdark span{fill:#ccc;color:#ccc;}#dd6f5be61d27082efdark .node rect,#dd6f5be61d27082efdark .node circle,#dd6f5be61d27082efdark .node ellipse,#dd6f5be61d27082efdark .node polygon,#dd6f5be61d27082efdark .node path{fill:#1f2020;stroke:#ccc;stroke-width:1px;}#dd6f5be61d27082efdark .rough-node .label text,#dd6f5be61d27082efdark .node .label text,#dd6f5be61d27082efdark .image-shape .label,#dd6f5be61d27082efdark .icon-shape .label{text-anchor:middle;}#dd6f5be61d27082efdark .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#dd6f5be61d27082efdark .rough-node .label,#dd6f5be61d27082efdark .node .label,#dd6f5be61d27082efdark .image-shape .label,#dd6f5be61d27082efdark .icon-shape .label{text-align:center;}#dd6f5be61d27082efdark .node.clickable{cursor:pointer;}#dd6f5be61d27082efdark .root .anchor path{fill:lightgrey!important;stroke-width:0;stroke:lightgrey;}#dd6f5be61d27082efdark .arrowheadPath{fill:lightgrey;}#dd6f5be61d27082efdark .edgePath .path{stroke:lightgrey;stroke-width:1px;}#dd6f5be61d27082efdark .flowchart-link{stroke:lightgrey;fill:none;}#dd6f5be61d27082efdark .edgeLabel{background-color:hsl(0, 0%, 34.4117647059%);text-align:center;}#dd6f5be61d27082efdark .edgeLabel p{background-color:hsl(0, 0%, 34.4117647059%);}#dd6f5be61d27082efdark .edgeLabel rect{opacity:0.5;background-color:hsl(0, 0%, 34.4117647059%);fill:hsl(0, 0%, 34.4117647059%);}#dd6f5be61d27082efdark .labelBkg{background-color:rgba(87.75, 87.75, 87.75, 0.5);}#dd6f5be61d27082efdark .cluster rect{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:rgba(255, 255, 255, 0.25);stroke-width:1px;}#dd6f5be61d27082efdark .cluster text{fill:#F9FFFE;}#dd6f5be61d27082efdark .cluster span{color:#F9FFFE;}#dd6f5be61d27082efdark div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,segoe ui,Roboto,helvetica neue,Arial,noto sans,sans-serif;font-size:12px;background:hsl(20, 1.5873015873%, 12.3529411765%);border:1px solid rgba(255, 255, 255, 0.25);border-radius:2px;pointer-events:none;z-index:100;}#dd6f5be61d27082efdark .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#ccc;}#dd6f5be61d27082efdark rect.text{fill:none;stroke-width:0;}#dd6f5be61d27082efdark .icon-shape,#dd6f5be61d27082efdark .image-shape{background-color:hsl(0, 0%, 34.4117647059%);text-align:center;}#dd6f5be61d27082efdark .icon-shape p,#dd6f5be61d27082efdark .image-shape p{background-color:hsl(0, 0%, 34.4117647059%);padding:2px;}#dd6f5be61d27082efdark .icon-shape .label rect,#dd6f5be61d27082efdark .image-shape .label rect{opacity:0.5;background-color:hsl(0, 0%, 34.4117647059%);fill:hsl(0, 0%, 34.4117647059%);}#dd6f5be61d27082efdark .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#dd6f5be61d27082efdark .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#dd6f5be61d27082efdark .node .neo-node{stroke:#ccc;}#dd6f5be61d27082efdark [data-look="neo"].node rect,#dd6f5be61d27082efdark [data-look="neo"].cluster rect,#dd6f5be61d27082efdark [data-look="neo"].node polygon{stroke:url(#dd6f5be61d27082efdark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082efdark [data-look="neo"].swimlane.cluster rect{filter:none;}#dd6f5be61d27082efdark [data-look="neo"].node path{stroke:url(#dd6f5be61d27082efdark-gradient);stroke-width:1px;}#dd6f5be61d27082efdark [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082efdark [data-look="neo"].node .neo-line path{stroke:#ccc;filter:none;}#dd6f5be61d27082efdark [data-look="neo"].node circle{stroke:url(#dd6f5be61d27082efdark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082efdark [data-look="neo"].node circle .state-start{fill:#000000;}#dd6f5be61d27082efdark [data-look="neo"].icon-shape .icon{fill:url(#dd6f5be61d27082efdark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082efdark [data-look="neo"].icon-shape .icon-neo path{stroke:url(#dd6f5be61d27082efdark-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#dd6f5be61d27082efdark :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}&lt;/style&gt;&lt;g&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"&gt;&lt;path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"&gt;&lt;path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"&gt;&lt;polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/polygon&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"&gt;&lt;circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"&gt;&lt;/circle&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"&gt;&lt;path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;marker id="dd6f5be61d27082efdark_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"&gt;&lt;path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"&gt;&lt;/path&gt;&lt;/marker&gt;&lt;g class="root"&gt;&lt;g class="clusters"&gt;&lt;/g&gt;&lt;g class="edgePaths"&gt;&lt;path d="M236.465,86L236.465,90.167C236.465,94.333,236.465,102.667,236.465,110.333C236.465,118,236.465,125,236.465,128.5L236.465,132" id="dd6f5be61d27082efdark-L_A_B_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_A_B_0" data-points="W3sieCI6MjM2LjQ2NDg0Mzc1LCJ5Ijo4Nn0seyJ4IjoyMzYuNDY0ODQzNzUsInkiOjExMX0seyJ4IjoyMzYuNDY0ODQzNzUsInkiOjEzNn1d" data-look="classic" marker-end="url(#dd6f5be61d27082efdark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M236.465,214L236.465,218.167C236.465,222.333,236.465,230.667,236.465,238.333C236.465,246,236.465,253,236.465,256.5L236.465,260" id="dd6f5be61d27082efdark-L_B_C_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_B_C_0" data-points="W3sieCI6MjM2LjQ2NDg0Mzc1LCJ5IjoyMTR9LHsieCI6MjM2LjQ2NDg0Mzc1LCJ5IjoyMzl9LHsieCI6MjM2LjQ2NDg0Mzc1LCJ5IjoyNjR9XQ==" data-look="classic" marker-end="url(#dd6f5be61d27082efdark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M188.748,404.33L174.199,418.45C159.65,432.569,130.552,460.808,116.002,482.427C101.453,504.047,101.453,519.047,101.453,526.547L101.453,534.047" id="dd6f5be61d27082efdark-L_C_D_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_C_D_0" data-points="W3sieCI6MTg4Ljc0ODM0NjEzMTQzMzEsInkiOjQwNC4zMzAzNzczODE0MzMxfSx7IngiOjEwMS40NTMxMjUsInkiOjQ4OS4wNDY4NzV9LHsieCI6MTAxLjQ1MzEyNSwieSI6NTM4LjA0Njg3NX1d" data-look="classic" marker-end="url(#dd6f5be61d27082efdark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;path d="M284.181,404.33L298.731,418.45C313.28,432.569,342.378,460.808,356.927,480.427C371.477,500.047,371.477,511.047,371.477,516.547L371.477,522.047" id="dd6f5be61d27082efdark-L_C_E_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_C_E_0" data-points="W3sieCI6Mjg0LjE4MTM0MTM2ODU2NjksInkiOjQwNC4zMzAzNzczODE0MzMxfSx7IngiOjM3MS40NzY1NjI1LCJ5Ijo0ODkuMDQ2ODc1fSx7IngiOjM3MS40NzY1NjI1LCJ5Ijo1MjYuMDQ2ODc1fV0=" data-look="classic" marker-end="url(#dd6f5be61d27082efdark_flowchart-v2-pointEnd)"&gt;&lt;/path&gt;&lt;/g&gt;&lt;g class="edgeLabels"&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_A_B_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel"&gt;&lt;g class="label" data-id="L_B_C_0" transform="translate(0, 0)"&gt;&lt;foreignObject width="0" height="0"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(101.453125, 489.046875)"&gt;&lt;g class="label" data-id="L_C_D_0" transform="translate(-27.75, -12)"&gt;&lt;foreignObject width="55.5" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;claude*&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="edgeLabel" transform="translate(371.4765625, 489.046875)"&gt;&lt;g class="label" data-id="L_C_E_0" transform="translate(-23.0078125, -12)"&gt;&lt;foreignObject width="46.015625" height="24"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="edgeLabel"&gt;&lt;p&gt;herdr*&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="nodes"&gt;&lt;g class="node default" id="dd6f5be61d27082efdark-flowchart-A-0" data-look="classic" transform="translate(236.46484375, 47)"&gt;&lt;rect class="basic label-container" style="" x="-120.0546875" y="-39" width="240.109375" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-90.0546875, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="180.109375" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;new shell in a herdr pane&lt;br&gt;sees CLAUDECODE=1&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="dd6f5be61d27082efdark-flowchart-B-1" data-look="classic" transform="translate(236.46484375, 175)"&gt;&lt;rect class="basic label-container" style="" x="-96.90625" y="-39" width="193.8125" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-66.90625, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="133.8125" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;walk up the parent&lt;br&gt;process chain&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="dd6f5be61d27082efdark-flowchart-C-3" data-look="classic" transform="translate(236.46484375, 358.0234375)"&gt;&lt;polygon points="94.0234375,0 188.046875,-94.0234375 94.0234375,-188.046875 0,-94.0234375" class="label-container" transform="translate(-93.5234375, 94.0234375)"&gt;&lt;/polygon&gt;&lt;g class="label" style="" transform="translate(-55.0234375, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="110.046875" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;which ancestor&lt;br&gt;appears first?&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="dd6f5be61d27082efdark-flowchart-D-5" data-look="classic" transform="translate(101.453125, 577.046875)"&gt;&lt;rect class="basic label-container" style="" x="-93.453125" y="-39" width="186.90625" height="78"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-63.453125, -24)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="126.90625" height="48"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;a real agent shell:&lt;br&gt;keep the flag&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class="node default" id="dd6f5be61d27082efdark-flowchart-E-7" data-look="classic" transform="translate(371.4765625, 577.046875)"&gt;&lt;rect class="basic label-container" style="" x="-126.5703125" y="-51" width="253.140625" height="102"&gt;&lt;/rect&gt;&lt;g class="label" style="" transform="translate(-96.5703125, -36)"&gt;&lt;rect&gt;&lt;/rect&gt;&lt;foreignObject width="193.140625" height="72"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"&gt;&lt;span class="nodeLabel"&gt;&lt;p&gt;reached the pane's server:&lt;br&gt;the flag is leaked residue,&lt;br&gt;unset it&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;defs&gt;&lt;filter id="dd6f5be61d27082efdark-drop-shadow" height="130%" width="130%"&gt;&lt;feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#FFFFFF"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;defs&gt;&lt;filter id="dd6f5be61d27082efdark-drop-shadow-small" height="150%" width="150%"&gt;&lt;feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#FFFFFF"&gt;&lt;/feDropShadow&gt;&lt;/filter&gt;&lt;/defs&gt;&lt;linearGradient id="dd6f5be61d27082efdark-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"&gt;&lt;stop offset="0%" stop-color="#cccccc" stop-opacity="1"&gt;&lt;/stop&gt;&lt;stop offset="100%" stop-color="hsl(180, 0%, 18.3529411765%)" stop-opacity="1"&gt;&lt;/stop&gt;&lt;/linearGradient&gt;&lt;/svg&gt;&lt;/div&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$HERDR_PANE_ID&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$CLAUDECODE&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;local&lt;/span&gt; &lt;span class="nv"&gt;pid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PPID&lt;/span&gt; comm&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; -n &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$pid&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$pid&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; !&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$pid&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; !&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;comm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;command&lt;/span&gt; ps -o &lt;span class="nv"&gt;comm&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; -p &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$pid&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; 2&amp;gt;/dev/null&lt;span class="k"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;break&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;comm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;t&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; in&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; claude*&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;;;&lt;/span&gt; &lt;span class="c1"&gt;# real agent shell: keep the flag&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; herdr*&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;break&lt;/span&gt; &lt;span class="p"&gt;;;&lt;/span&gt; &lt;span class="c1"&gt;# hit the server first: flag is residue&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;esac&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nv"&gt;pid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;command&lt;/span&gt; ps -o &lt;span class="nv"&gt;ppid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; -p &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$pid&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt; 2&amp;gt;/dev/null &lt;span class="p"&gt;|&lt;/span&gt; tr -d &lt;span class="s1"&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;done&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;unset&lt;/span&gt; CLAUDECODE&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="o"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;fi&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;&lt;strong&gt;When versions do skew, there is exactly one move&lt;/strong&gt;, now written in the troubleshooting doc:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# cannot attach means cannot wind down gracefully; stop the server and&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# let resume_agents_on_restore rebuild layout and Claude panes natively&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;herdr server stop&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;herdr&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&#10;&lt;h2 class="relative group"&gt;&lt;code&gt;--remote&lt;/code&gt; splits your config down the middle&#10; &lt;div id="--remote-splits-your-config-down-the-middle" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#--remote-splits-your-config-down-the-middle" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;This came out of reading the source, not the docs, and a month of local usage never hinted at it. Under &lt;code&gt;--remote&lt;/code&gt;, client and server each read their own slice of the config:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| Config section | Read by (--remote) |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| --------------------------- | ----------------------- |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| [keys] | client |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| [ui.toast] | client (once at attach) |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| [ui.sound] | client |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| [remote] | client |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| theme / terminal / session | server |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| worktrees / experimental | server |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| plugins (ALL of them) | server |&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;Three consequences hide in that table. &lt;code&gt;--remote-keybindings&lt;/code&gt; defaults to local, so editing keybindings on the remote host changes nothing, silently. &lt;code&gt;[ui.toast]&lt;/code&gt; is read once at attach, so &lt;code&gt;reload-config&lt;/code&gt; cannot touch a running client. And the real landmine: plugins run on the server, so every plugin must be installed on both machines, pinned to the same SHA. Miss one side and a key you bound locally just does nothing when you press it. Not an error. Nothing.&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# run on BOTH machines, and --ref must match exactly&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;herdr plugin install &amp;lt;repo&amp;gt; --ref &amp;lt;sha&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The keybinding contract&#10; &lt;div id="the-keybinding-contract" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-keybinding-contract" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Instead of choosing between two multiplexers, I made them identical to my hands. tmux and herdr now share the &lt;code&gt;ctrl+a&lt;/code&gt; prefix and the layer under it:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| Key | tmux | herdr |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| ----------- | ---------------- | ---------------- |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a f | open project | open project |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a e | review changes | review changes |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a R | reload config | reload config |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a z | zoom pane | zoom pane |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a C-hjkl | pane navigation | pane navigation |&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a C-a | passthrough | passthrough |&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#10;&lt;p&gt;The contract is a table in &lt;code&gt;docs/keybindings.md&lt;/code&gt;, and any change on either side must update the table. The timing was deliberate: align during the trial, before muscle memory hardens, when the cost is a tenth of what it will be later. It also makes the verdict cheap. Whichever tool survives, my fingers already work.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Evidence against my own thesis&#10; &lt;div id="evidence-against-my-own-thesis" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#evidence-against-my-own-thesis" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Recorded because a trial that only collects confirming evidence is a purchase, not a trial: tmux&amp;rsquo;s development branch (not yet in a brew release) has grown OSC 133 command hooks, including a &lt;code&gt;pane-command-started&lt;/code&gt; event, plus substantial floating-pane support. The premise &amp;ldquo;tmux has zero awareness of what runs inside a pane&amp;rdquo; is weakening in real time, and that goes into the verdict with everything else.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The exit conditions&#10; &lt;div id="the-exit-conditions" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-exit-conditions" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Written before the trial started, deciding on August 16:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Did the sidebar actually reduce patrol?&lt;/li&gt;&#10;&lt;li&gt;Did an upgrade actually bite a session?&lt;/li&gt;&#10;&lt;li&gt;Did the orchestration API get real use?&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Two of three in favor and herdr graduates, retiring sesh, resurrect, and continuum with it. Otherwise it gets removed, and &amp;ldquo;wait for 1.0&amp;rdquo; gets its win after all.&lt;/p&gt;&#10;&lt;p&gt;A trial without pre-written exit conditions is not a trial. It is a sunk cost waiting for enough weight to make the decision for you.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;The verdict&#10; &lt;div id="the-verdict" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-verdict" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;em&gt;(Added on the evening of August 16, verdict day.)&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;herdr graduates, on conditions 2 and 3.&lt;/p&gt;&#10;&lt;p&gt;No upgrade killed a session inside the window, so condition 2 holds. It was not free, though: the moving target cost integration work instead. PR #80 exists because herdr reads keybindings once, at client attach, so a config change does nothing until you re-attach. I count that as a paper cut, not a bite.&lt;/p&gt;&#10;&lt;p&gt;Condition 3 passed easily, and the proof arrived on decision day itself. The eza benchmark in the next post of this series produced a fake number inside a sandbox, and the true numbers came through &lt;code&gt;herdr pane run&lt;/code&gt; driving a real terminal pane (PR #95). The orchestration API stopped being a nice extra that day. It was the only route to a correct measurement.&lt;/p&gt;&#10;&lt;p&gt;Condition 1 is the honest part of this verdict: I could not answer it. I tried to judge tmux usage from resurrect&amp;rsquo;s autosave timestamps and found the last save twelve days old. That gap was not tmux dying. The gap was the trial, because a month of deliberately using herdr makes herdr look load-bearing and tmux look dead, whichever way the tools actually compare. Data collected inside the window cannot answer &amp;ldquo;did the sidebar reduce patrol&amp;rdquo;. The trial is the data. So the verdict rests on two conditions, not three, and I am saying so instead of pretending it was three.&lt;/p&gt;&#10;&lt;p&gt;The retirement half of the rule did not fire. It changed shape. Graduation was supposed to retire sesh, resurrect, and continuum. Instead, herdr becomes the daily driver and tmux goes on standby, kept on purpose as the rollback path in case I need to switch back. Keeping the rollback path is a decision with a name, and it fits a trial built on written exit conditions better than a clean break would. It has a cost worth writing down, and the cost has the same shape as condition 1: daily use never exercises a standby path, so it can rot silently until the day I need it. The exit conditions decided the tool. The original retirement rule was written with more confidence than I actually had.&lt;/p&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Lessons&#10; &lt;div id="lessons" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#lessons" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The cost of running many agents is observation, not execution. Whatever tooling you pick should attack the patrol problem.&lt;/li&gt;&#10;&lt;li&gt;&amp;ldquo;Wait for it to mature&amp;rdquo; is the safest advice and the least verified. Reading the source flipped this decision once already.&lt;/li&gt;&#10;&lt;li&gt;Automation guards around a CLI must know which subcommands have side effects. A version check that can boot a server is not a check.&lt;/li&gt;&#10;&lt;li&gt;Environment flags cannot be trusted by interactivity; walk the process tree and let ancestry decide.&lt;/li&gt;&#10;&lt;li&gt;In split client/server systems, know which side reads which config. The failure mode of getting it wrong is silence, not errors.&lt;/li&gt;&#10;&lt;li&gt;Align keybindings across competing tools before muscle memory hardens, and the eventual migration, either direction, is free.&lt;/li&gt;&#10;&lt;li&gt;Write exit conditions before the trial. Sunk cost is very good at writing them afterward.&lt;/li&gt;&#10;&lt;li&gt;Data collected inside a trial window cannot judge the trial, because the trial is the data. Answer exit conditions with judgement, and say which ones you could not answer.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&#10;&lt;h2 class="relative group"&gt;References&#10; &lt;div id="references" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#references" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://herdr.dev" target="_blank" rel="noreferrer"&gt;herdr&lt;/a&gt; (&lt;a href="https://github.com/herdrdev/herdr" target="_blank" rel="noreferrer"&gt;source&lt;/a&gt;; config-split and keybinding behavior verified against the source during the trial)&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://raw.githubusercontent.com/tmux/tmux/master/CHANGES" target="_blank" rel="noreferrer"&gt;tmux CHANGES&lt;/a&gt; (OSC 133 command events and floating-pane work on the development branch)&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/tmux-plugins/tmux-resurrect" target="_blank" rel="noreferrer"&gt;tmux-resurrect&lt;/a&gt; (the approximation baseline for session restore)&lt;/li&gt;&#10;&lt;li&gt;The guard, tests, and keybinding contract: &lt;a href="https://github.com/nickboy/dotfiles" target="_blank" rel="noreferrer"&gt;nickboy/dotfiles&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;!--&#10;EDIT LOG (2026-08-16):&#10;- Added "The verdict" section: graduate on conditions 2 and 3; condition 1&#10; ruled unanswerable because data gathered inside the window is polluted by&#10; the trial itself; herdr becomes the daily driver, tmux kept deliberately&#10; as a standby rollback path, sesh/resurrect/continuum stay installed.&#10;- Added one lesson bullet on in-window trial data.&#10;--&gt;&#10;</content:encoded></item></channel></rss>