<?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, 16 Aug 2026 17:24:04 -0700</lastBuildDate><atom:link href="https://nick-liu.com/tags/herdr/index.xml" rel="self" type="application/rss+xml"/><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;
 
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.

&lt;/div&gt;

&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;
 
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.

&lt;/div&gt;

&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;

&lt;h2 class="relative group"&gt;What herdr actually gives you
 &lt;div id="what-herdr-actually-gives-you" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &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;
 &lt;/span&gt;
 
&lt;/h2&gt;
&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;
&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;
&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;

&lt;h2 class="relative group"&gt;The decision process mattered more than the tool
 &lt;div id="the-decision-process-mattered-more-than-the-tool" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &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;
 &lt;/span&gt;
 
&lt;/h2&gt;
&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;
&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;
&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;

&lt;h2 class="relative group"&gt;The operations incident log
 &lt;div id="the-operations-incident-log" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-operations-incident-log" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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; \
&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;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&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; ...
&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; ...
&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; ...
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
 &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;
&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;
&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;
&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
&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;
&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;
&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
&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;
&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;
&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;
&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;
&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;
&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
&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;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;
&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;
&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;
&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;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;herdr server stop
&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;

&lt;h2 class="relative group"&gt;&lt;code&gt;--remote&lt;/code&gt; splits your config down the middle
 &lt;div id="--remote-splits-your-config-down-the-middle" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &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;
 &lt;/span&gt;
 
&lt;/h2&gt;
&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;
&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) |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| --------------------------- | ----------------------- |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| [keys] | client |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| [ui.toast] | client (once at attach) |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| [ui.sound] | client |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| [remote] | client |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| theme / terminal / session | server |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| worktrees / experimental | server |
&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;
&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;
&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;
&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;

&lt;h2 class="relative group"&gt;The keybinding contract
 &lt;div id="the-keybinding-contract" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-keybinding-contract" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&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;
&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 |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| ----------- | ---------------- | ---------------- |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a f | open project | open project |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a e | review changes | review changes |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a R | reload config | reload config |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a z | zoom pane | zoom pane |
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;| C-a C-hjkl | pane navigation | pane navigation |
&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;
&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;

&lt;h2 class="relative group"&gt;Evidence against my own thesis
 &lt;div id="evidence-against-my-own-thesis" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &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;
 &lt;/span&gt;
 
&lt;/h2&gt;
&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;

&lt;h2 class="relative group"&gt;The exit conditions
 &lt;div id="the-exit-conditions" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-exit-conditions" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Written before the trial started, deciding on August 16:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Did the sidebar actually reduce patrol?&lt;/li&gt;
&lt;li&gt;Did an upgrade actually bite a session?&lt;/li&gt;
&lt;li&gt;Did the orchestration API get real use?&lt;/li&gt;
&lt;/ol&gt;
&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;
&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;

&lt;h2 class="relative group"&gt;The verdict
 &lt;div id="the-verdict" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#the-verdict" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;(Added on the evening of August 16, verdict day.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;herdr graduates, on conditions 2 and 3.&lt;/p&gt;
&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;
&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;
&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;
&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;

&lt;h2 class="relative group"&gt;Lessons
 &lt;div id="lessons" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#lessons" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ul&gt;
&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;
&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;
&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;
&lt;li&gt;Environment flags cannot be trusted by interactivity; walk the process tree and let ancestry decide.&lt;/li&gt;
&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;
&lt;li&gt;Align keybindings across competing tools before muscle memory hardens, and the eventual migration, either direction, is free.&lt;/li&gt;
&lt;li&gt;Write exit conditions before the trial. Sunk cost is very good at writing them afterward.&lt;/li&gt;
&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;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;References
 &lt;div id="references" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#references" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ul&gt;
&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;
&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;
&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;
&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;
&lt;/ul&gt;
&lt;!--
EDIT LOG (2026-08-16):
- Added "The verdict" section: graduate on conditions 2 and 3; condition 1
 ruled unanswerable because data gathered inside the window is polluted by
 the trial itself; herdr becomes the daily driver, tmux kept deliberately
 as a standby rollback path, sesh/resurrect/continuum stay installed.
- Added one lesson bullet on in-window trial data.
--&gt;</content:encoded></item></channel></rss>