<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Paneflow Blog</title>
    <link>https://paneflow.dev/blog</link>
    <description>Engineering notes from building Paneflow: the technical choices, the dead ends, and how each part of a native terminal multiplexer for coding agents works.</description>
    <language>en-US</language>
    <lastBuildDate>Wed, 18 Nov 2026 00:00:00 GMT</lastBuildDate>
    <atom:link href="https://paneflow.dev/feed.xml" rel="self" type="application/rss+xml"/>
    <item>
      <title>Agent status in Paneflow: from screen rules to OSC 7501</title>
      <link>https://paneflow.dev/blog/agent-status-osc-7501</link>
      <guid isPermaLink="true">https://paneflow.dev/blog/agent-status-osc-7501</guid>
      <pubDate>Tue, 03 Nov 2026 00:00:00 GMT</pubDate>
      <dc:creator>Arthur Jean</dc:creator>
      <category>paneflow</category>
      <category>agents</category>
      <category>terminal</category>
      <category>ghostty</category>
      <description>Since 0.17.7, Paneflow reads each agent&apos;s turn state from the OSC 7501 status the agent writes itself. The path to the sidebar, and six approaches I deleted.</description>
      <content:encoded><![CDATA[<p>Since <a href="https://github.com/arthjean/paneflow/releases/tag/v0.17.7" rel="noopener noreferrer nofollow ugc" target="_blank">Paneflow 0.17.7</a>, the sidebar takes an agent's turn state from exactly one place: a status the agent writes into its own terminal. An agent that stops for a permission writes a sequence of this shape (the example comes from the spec):</p>
<pre><code class="language-text">ESC ] 7501 ; state=blocked:kind=permission:app=terraform:msg=QXBwbHkgMyB0byBhZGQs... ESC \
</code></pre>
<p>The usual assumption is that a tool running agents has to watch them from the outside: match the spinner, spot the permission prompt, notice the input box came back. I built that, several times, and deleted it. My position now is that the turn state belongs to the agent, the only process that actually knows it, and that the terminal's job is to carry the declaration without guessing.</p>
<p>This is what ships in Paneflow 0.19.0. It covers the agents that emit OSC 7501: Claude Code from v2.1.295, and Codex, which merged support in <a href="https://github.com/openai/codex/pull/52725" rel="noopener noreferrer nofollow ugc" target="_blank">openai/codex#52725</a> and <a href="https://github.com/openai/codex/pull/54114" rel="noopener noreferrer nofollow ugc" target="_blank">#54114</a> in October. An agent that declares nothing gets no turn state, on purpose.</p>
<p>The post follows one Claude Code turn from the agent to the sidebar, then the general shape, the six approaches that came before, what it costs, and the strongest objection.</p>
<h2>What OSC 7501 is</h2>
<p>If you have read Mitchell's post on the protocol, skip this section.</p>
<p>Mitchell Hashimoto published the <a href="https://www.superlogical.com/rex/docs/build/program-status" rel="noopener noreferrer nofollow ugc" target="_blank">Program Status Protocol</a> on October 6, 2026, as "a completely generic, terminal-native specification" that came out of his work on Superlogical and Ghostty (<a href="https://mitchellh.com/writing/program-status-osc7501" rel="noopener noreferrer nofollow ugc" target="_blank">his post</a>). A program writes <code>OSC 7501</code> with <code>key=value</code> pairs separated by colons:</p>
<ul>
<li><code>state</code>: <code>idle</code>, <code>working</code>, <code>blocked</code>, <code>done</code> or <code>error</code>, plus <code>clear</code> as an action.</li>
<li><code>kind</code>, with <code>blocked</code> only: <code>permission</code>, <code>question</code> or <code>auth</code>.</li>
<li><code>progress</code>, <code>app</code>, <code>title</code>, and <code>msg</code> (base64, up to 2,048 bytes).</li>
</ul>
<p>A program asks for support with <code>OSC 7501 ; ?</code>. There is no heartbeat. When the shell prompt returns (<code>OSC 133 A</code>) or the program exits, the terminal drops <code>working</code> and <code>blocked</code>; <code>done</code> and <code>error</code> survive until the terminal decides to hide them, for example on the next keystroke.</p>
<p>Two properties matter for Paneflow. The state comes from the one process that knows it. And the lifetime rules mean the terminal never has to time a state out.</p>
<h2>One Claude Code turn, from the agent to the sidebar</h2>
<p>Let's follow a single turn through the three processes involved: the session host that owns the PTYs, the worker that reduces state, and the desktop window.</p>
<p><strong>Paneflow answers like Ghostty.</strong> The host starts every shell with <code>TERM_PROGRAM=ghostty</code> (<a href="https://github.com/arthjean/paneflow/blob/v0.19.0/crates/paneflow-host/src/host/spawn_env.rs" rel="noopener noreferrer nofollow ugc" target="_blank"><code>spawn_env.rs</code></a>), and its terminal engine is <code>libghostty-vt</code>. When Claude Code asks whether the terminal supports the protocol, the engine replies:</p>
<pre><code class="language-text">ESC ] 7501 ; ? : states=idle,working,done,blocked,error : kinds=permission,question,auth ESC \
</code></pre>
<p>The host sees that reply leave for the PTY and marks the session <code>program_status_capable</code>. Only the host answers. The desktop also embeds libghostty for drawing, but installs no OSC 7501 callback, so the agent never gets two replies; a test named <code>desktop_terminals_neither_answer_nor_report_program_status</code> keeps it that way.</p>
<p><strong>You submit a prompt, Claude Code writes <code>state=working</code>.</strong> Those bytes go through the same libghostty parser that already maintains the grid, so Paneflow never scans them a second time. libghostty hands the parsed status to a callback, and the host's event loop turns it into a record:</p>
<pre><code class="language-rust">ghostty::BackendEvent::ProgramStatus(report) =&gt; {
    self.program_status.apply(report);
    self.program_status_capable = true;
}
</code></pre>
<p>A host thread passes over the sessions every 500 ms, skips those with nothing new, and writes the current declaration to the session's manifest only when it changed. The worker follows the host over a push stream.</p>
<p><strong>The worker reduces.</strong> <code>paneflow-serve</code> sits between the host and every client: the desktop, the <code>paneflow</code> CLI, the MCP bridge. It first checks that the session runs a known agent, then maps the declaration. This is the whole state machine (<a href="https://github.com/arthjean/paneflow/blob/v0.19.0/crates/paneflow-serve/src/state.rs" rel="noopener noreferrer nofollow ugc" target="_blank"><code>state.rs</code></a>):</p>
<pre><code class="language-rust">fn declared_verdict(&amp;self) -&gt; (Status, ActivitySource) {
    let Some(declared) = self.agent_declaration() else {
        return (Status::Idle, ActivitySource::None);
    };
    let running = self.lifecycle.is_running();
    let status = match declared.state.as_str() {
        DECLARED_ERROR =&gt; Status::Errored,
        DECLARED_WORKING if running =&gt; Status::Busy,
        DECLARED_BLOCKED if running =&gt; Status::Attention,
        _ =&gt; Status::Idle,
    };
    (status, ActivitySource::Declared)
}
</code></pre>
<p>No timer, hook, or bell feeds it. An exited process is never busy or waiting, while an <code>error</code> survives the exit. Each change of the reduced state bumps a <code>state_seq</code> counter, which is what <code>paneflow wait --idle</code> and <code>paneflow send --submit</code> follow.</p>
<p><strong>Claude Code asks for a permission.</strong> It writes <code>state=blocked:kind=permission</code> with the question in <code>msg</code>. The worker moves the session to Attention and, because it is a transition into Attention, decides a "Needs input" notification carrying that message. The desktop only decides whether you already have the pane in front of you. The row shows <code>Need you</code> and moves to the top of the sidebar's Agents section.</p>
<p><strong>The turn ends with <code>state=done</code>.</strong> The worker publishes a "Finished" notification and marks the session unread. The row shows <code>Done</code> until you open the tab. The host keeps the <code>done</code> record until you type in the pane, and text sent by <code>paneflow send</code> or the MCP <code>write_pane</code> tool does not count as typing.</p>
<h2>The general shape</h2>
<p>Each process has one job. The host parses and keeps records, with bounds: 256 records per session, and past a 256 KiB burst of pending status events it clears everything instead of keeping a partial state. The worker reduces and decides notifications, and on restart it rebuilds every session from the manifests. The desktop renders what it receives over a push stream, with wakeups coalesced.</p>
<p>What the agent declares, and what you see:</p>
<table>
<thead>
<tr>
<th>Declared</th>
<th>Sidebar</th>
</tr>
</thead>
<tbody><tr>
<td><code>working</code></td>
<td>Spinner</td>
</tr>
<tr>
<td><code>blocked</code></td>
<td><code>Need you</code>, plus a notification with the agent's message</td>
</tr>
<tr>
<td><code>error</code></td>
<td><code>Error</code>, plus a notification</td>
</tr>
<tr>
<td><code>done</code></td>
<td><code>Done</code> until you have seen it, plus a notification</td>
</tr>
<tr>
<td><code>idle</code></td>
<td>Nothing</td>
</tr>
<tr>
<td>Nothing after 3 s</td>
<td><code>No status</code></td>
</tr>
</tbody></table>
<h2>What the hooks still do</h2>
<p>Claude Code and Codex still get Paneflow's hooks, nine events each. They carry what OSC 7501 does not: the provider session id and transcript path that make a conversation resumable, the prompt that names the tab, the last result that fills the notification, subagent starts and stops. They never move the state, and a test pins it: <code>a_hook_event_carries_metadata_but_never_moves_the_declared_state</code>.</p>
<p>One gotcha: Claude Code runs these hooks synchronously (<code>"async": false</code>, <code>timeout: 5</code>). The reporter gives itself 350 ms to connect and 350 ms for the request, then exits 0 with nothing on stdout. At worst, a missing Paneflow costs about 700 ms per event.</p>
<h2>Six approaches before this one</h2>
<p>Every earlier version of this feature inferred the state. In order:</p>
<ol>
<li><strong>Window titles.</strong> At first, a detector watched OSC titles for braille spinners. I removed it on April 7 for hooks from a wrapper script (<a href="https://github.com/arthjean/paneflow/commit/107098da1" rel="noopener noreferrer nofollow ugc" target="_blank"><code>107098da1</code></a>).</li>
<li><strong>PTY activity.</strong> In June, agents without hooks got a heuristic: an output burst promoted the agent to working, 3 s of quiet demoted it, keystroke echo was filtered out. A week later I removed it because it "produced false spinners (a dev server streaming under a bare-shell thread, TUI redraws)" (<a href="https://github.com/arthjean/paneflow/commit/4200e8d49" rel="noopener noreferrer nofollow ugc" target="_blank"><code>4200e8d49</code></a>). Failure.</li>
<li><strong>An inactivity timer.</strong> A <code>Stalled</code> state fired after 300 s of silence. It went in September: "A long turn is a long turn, not a fault."</li>
<li><strong>Sources without hooks.</strong> An organization can turn off Claude Code hooks with <code>disableAllHooks</code> or <code>allowManagedHooksOnly</code>. In August I added OSC 9;4 progress, OSC 777 notifications and Claude's session registry file, ranked against hooks with a 20 s takeover (<a href="https://github.com/arthjean/paneflow/commit/0f3da66ea" rel="noopener noreferrer nofollow ugc" target="_blank"><code>0f3da66ea</code></a>).</li>
<li><strong>A durable reducer.</strong> In September, hooks became the authority once a session latched, a five-minute lease re-armed by screen changes bounded a lost <code>Stop</code>, and a viewport scan looked for menus. In October the terminal bell joined as an attention signal.</li>
<li><strong>Declarative screen rules.</strong> On October 2, each agent got a <code>screen.toml</code> of prioritized regex rules, with a signed remote catalog and a corpus of captured screens (<a href="https://github.com/arthjean/paneflow/commit/c1d48e580" rel="noopener noreferrer nofollow ugc" target="_blank"><code>c1d48e580</code></a>). It shipped in 0.17.6.</li>
</ol>
<p>The design notes from approach 5 list the symptoms I kept patching: a lost <code>Stop</code> left a pane thinking forever, and Claude Code documents that <code>Stop</code> does not fire on a user interrupt, so an Escape mid-turn kept the spinner going. Its numbered menus fire no hook at all, so a session waiting for a choice showed as busy. Each layer existed to correct the one below it.</p>
<p>On October 7, I re-pinned libghostty to get its OSC 7501 API. Three days later, <a href="https://github.com/arthjean/paneflow/commit/328a8fe12" rel="noopener noreferrer nofollow ugc" target="_blank"><code>328a8fe12</code></a> made the declaration the only source of turn state: 119 files, 1,020 lines added, 12,417 removed. Screen rules, the remote catalog, the capture commands, the bell attention and the Escape handling all went.</p>
<p>Three things decided it. Claude Code and Codex now declared their state themselves, and a declaration from the agent beats any inference I can make from outside. The inferred states were wrong in ways I kept patching. And the rules had a maintenance cost per agent release: the corpus, the catalog signing, the fixtures.</p>
<p>The rules were not wrong on their fixtures, though. The deleted corpus baseline scored an accuracy of 1.0 for every agent, on 4 to 7 captures each. That number measured the captures I had, not the next agent release.</p>
<p>The alternative was to keep the rules as a fallback for agents that declare nothing. 0.17.7 ships no fallback: "Paneflow offers no replacement: the status comes back once the agent itself emits OSC 7501."</p>
<h2>Identity is matched, state is not</h2>
<p>Paneflow is agent-specific in one place: knowing which agent runs in a pane. The <a href="https://github.com/arthjean/paneflow/tree/v0.19.0/runtimes" rel="noopener noreferrer nofollow ugc" target="_blank"><code>runtimes/</code></a> catalog describes 13 agents, and the host matches the pane's foreground job against it.</p>
<p>On Linux it walks <code>/proc/&lt;pid&gt;/task/&lt;tid&gt;/children</code> and reads <code>cmdline</code>. On macOS it uses <code>proc_listpids(PROC_PGRP_ONLY)</code> and <code>KERN_PROCARGS2</code>. On Windows, with no process groups, it walks up to 64 descendants of the session leader and reads each command line from the process's PEB. A <code>node</code>, <code>bun</code> or <code>python</code> wrapper resolves through the script path, so an npm-installed Claude Code running under <code>node.exe</code> is still recognized, while <code>-e</code>, <code>-c</code> and <code>-m</code> never name an agent. The kernel start time is read before and after the arguments, so a recycled pid is never attributed to the wrong agent.</p>
<p><strong>Tip:</strong> the <code>fx</code> alias is also the name of a JSON viewer. Paneflow counts <code>fx</code> as the agent only while the pane title starts with <code>fx v</code>.</p>
<p>A wrong match can mislabel which agent runs in a pane. It cannot invent what that agent is doing.</p>
<h2>What it costs</h2>
<p>On Windows 11 Pro, Ryzen 7 7800X3D, RTX 4070 Ti SUPER, release build of 0.18.0 (<code>b57da648</code>), one pane ran a fixture program declaring <code>working</code> through OSC 7501 for 62 s (<a href="https://github.com/arthjean/paneflow/blob/main/bench/results/hardware-summary-2026-10-27-windows.md" rel="noopener noreferrer nofollow ugc" target="_blank">bench summary</a>):</p>
<table>
<thead>
<tr>
<th>Process</th>
<th>CPU (one core)</th>
</tr>
</thead>
<tbody><tr>
<td>Host</td>
<td>0.00 %</td>
</tr>
<tr>
<td>Worker</td>
<td>0.05 %</td>
</tr>
<tr>
<td>Desktop</td>
<td>4.80 %, of which main thread 3.66 %</td>
</tr>
</tbody></table>
<p>The desktop drew 11.13 root renders per second, and those are the spinner. One shared 90 ms animation clock drives every spinner in the sidebar, tests pin 10 to 12 sidebar wakeups per second for 1 or 8 working agents, and <code>reduce_motion</code> draws a static spinner with no clock at all.</p>
<p>Latency got a fix of its own. The host already reads <code>OSC 133 A</code> from shell integration, and since October 31 a prompt start wakes the scan instead of waiting for the next 500 ms pass. Agent exit to release went from 434 to 491 ms to 6 to 9 ms over five cycles (<a href="https://github.com/arthjean/paneflow/commit/96c525144" rel="noopener noreferrer nofollow ugc" target="_blank"><code>96c525144</code></a>).</p>
<p><strong>Important:</strong> the CPU case against screen rules is weaker than it sounds. Mine ran at "20 rules on 200x60 evaluate in 24 us p95". What I removed was the maintenance and the wrong states, not a hot loop. No benchmark isolates the cost of OSC 7501 itself, since it rides on a parse the terminal does anyway.</p>
<h2>What about agents that say nothing?</h2>
<p>That is the strongest objection, and it is fair. Claude Code and Codex declare. Any other agent in the catalog gets a turn state only once it emits OSC 7501 too; until then it gets none. After 3 s without a support query or a declaration, the row shows a muted <code>No status</code> badge instead of pretending to be idle, with a tooltip naming the first version that reports, when Paneflow knows it (Claude Code 2.1.295).</p>
<p>For such an agent, <code>paneflow send --submit</code> reports <code>no_signal</code>, and <code>paneflow wait --idle</code> waits for the output to go quiet instead of returning at the end of the turn.</p>
<p>A few gotchas from Claude Code's <a href="https://code.claude.com/docs/en/terminal-config" rel="noopener noreferrer nofollow ugc" target="_blank">terminal docs</a>: inside tmux, Claude Code checks tmux for support instead of your terminal; a background session does not report its status; and <code>CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1</code> turns reporting off. For Codex, I don't know yet which release first ships the two PRs.</p>
<p><a href="https://github.com/ogulcancelik/herdr" rel="noopener noreferrer nofollow ugc" target="_blank">Herdr</a> takes the other side of this trade and shows a state for more agents today. For Claude Code and Codex, its <a href="https://herdr.dev/docs/integrations/" rel="noopener noreferrer nofollow ugc" target="_blank">integration docs</a> say the state "comes from Herdr's screen manifest detection", with the hooks reporting session identity; for Pi, OpenCode and a few others, it uses the state their hooks report. Its <a href="https://raw.githubusercontent.com/ogulcancelik/herdr/HEAD/distribution/agent-detection/claude.toml" rel="noopener noreferrer nofollow ugc" target="_blank">Claude manifest</a> is careful work: prioritized rules over screen regions, with comments tracking Claude Code's spinner glyphs version by version. Mitchell noted that the file's history "shows ten changes in three months for just Claude Code", and added that this isn't a criticism of Herdr. I agree. That is the cost I chose not to pay, and <code>No status</code> is the price.</p>
<p>Thanks to Mitchell Hashimoto for writing the spec, to the Ghostty project for the <code>libghostty-vt</code> parser that hands Paneflow the status, and to the Claude Code and Codex teams for shipping it.</p>
<p>If you maintain a CLI that ever waits on a human, emit OSC 7501. You can see what a terminal does with it by running this in a Paneflow pane, where the header shows <code>blocked: permission · Apply?</code> for ten seconds:</p>
<pre><code class="language-sh">printf '\033]7501;state=blocked:kind=permission:app=deploy:msg=QXBwbHk/\033\\'; sleep 10
</code></pre>]]></content:encoded>
    </item>
    <item>
      <title>libghostty-vt on Windows: replacing Alacritty in Paneflow 0.8.1</title>
      <link>https://paneflow.dev/blog/libghostty-windows</link>
      <guid isPermaLink="true">https://paneflow.dev/blog/libghostty-windows</guid>
      <pubDate>Tue, 21 Jul 2026 00:00:00 GMT</pubDate>
      <dc:creator>Arthur Jean</dc:creator>
      <category>paneflow</category>
      <category>windows</category>
      <category>terminal</category>
      <category>ghostty</category>
      <description>How Paneflow 0.8.1 brought Ghostty&apos;s terminal engine to Windows x64: ConPTY integration, static linking, and the Alacritty fallback available at the time.</description>
      <content:encoded><![CDATA[<blockquote>
<p><strong>About version 0.8.1.</strong> This article records the Windows migration in July 2026. The <code>terminal.backend</code> settings below apply to that release. Paneflow 0.19.1 uses Ghostty on all shipped platforms and no longer includes Alacritty. For setup today, see the <a href="/docs#windows" rel="noopener noreferrer nofollow ugc" target="_blank">Windows installation guide</a>.</p>
</blockquote>
<p><a href="https://github.com/arthjean/paneflow/releases/tag/v0.8.1" rel="noopener noreferrer nofollow ugc" target="_blank">Paneflow 0.8.1</a> made <code>libghostty-vt</code> the default terminal engine in the official Windows x64 build. New sessions used Ghostty when <code>terminal.backend</code> was omitted or set to <code>auto</code>.</p>
<p>The migration followed <a href="/blog/libghostty-linux" rel="noopener noreferrer nofollow ugc" target="_blank">Linux support in Paneflow 0.8.0</a>. It changed how Paneflow interpreted terminal output and encoded input, while keeping ConPTY for the shell connection and GPUI for rendering.</p>
<p><img src="https://paneflow.dev/images/libghostty-windows.webp" alt="Ghostty app icon next to the Windows logo in a blue and lavender landscape" /></p>
<h2>ConPTY connects the shell, Ghostty interprets the terminal</h2>
<p>Paneflow opens a Windows pseudoterminal through <code>portable-pty</code>, which uses ConPTY. It passes the shell's UTF-8 output to <code>libghostty-vt</code>. The engine interprets terminal sequences and maintains the screen, cursor, and scrollback. It also handles Unicode characters, line wrapping, text reflow after resizing, and keyboard and mouse encoding.</p>
<p>Paneflow then copies the terminal state into Rust snapshots for GPUI to draw. Those copies keep rendering separate from Ghostty's native memory: a later terminal update cannot invalidate the data used to draw a frame.</p>
<p>Paneflow embeds the terminal library rather than the Ghostty desktop application. Panes, sessions, process management, persistence, and the interface remain Paneflow's responsibility.</p>
<h2>Windows input and session shutdown</h2>
<p>The port also had to handle what happens around the engine. The Windows session host groups resize requests, reads the remaining output before closing, and waits for its reader thread to finish. It bounds queued output when several panes are busy at once.</p>
<p>Input support includes AltGr, dead keys, text committed through an input method editor (IME), paste, clipboard, mouse, and focus events. Version 0.8.1 also fixed <code>Shift+Enter</code> handling through key translation and ConPTY, preserving multiline input in agents that use that shortcut.</p>
<p>Redraw notifications are grouped to avoid unnecessary rendering during heavy output. These changes address input, display, and shutdown behavior, without changing how you organize panes or workspaces.</p>
<h2>The engine is built into the Windows executable</h2>
<p>The official x64 executable statically links <code>ghostty-vt-static.lib</code>. You do not need to install Ghostty or Zig, or add a Ghostty DLL. The MSI installs Paneflow with the engine already built in.</p>
<p>The repository pins the Ghostty source commit and native toolchain, along with headers, Rust bindings, build metadata, licenses, and checksums. CI rebuilds the native archive separately from the Windows application build so it can check that the application uses the expected artifact.</p>
<p>That pinning also creates a maintenance obligation: an engine update requires reviewing the native archive and its matching bindings together.</p>
<h2>Alacritty remained available in 0.8.1</h2>
<p>In the official Windows x64 build of 0.8.1, <code>auto</code> and <code>ghostty</code> selected Ghostty. To use the previous engine for new sessions, you could set <code>alacritty</code> in <code>paneflow.json</code>:</p>
<pre><code class="language-json">{
  "terminal": {
    "backend": "alacritty"
  }
}
</code></pre>
<p>The setting applied only to newly created sessions. If Ghostty failed before the shell process started, Paneflow could fall back to Alacritty once. After startup, a session kept its engine; recovery did not launch a second shell or require deleting workspace data.</p>
<p>This migration covered Windows x64 MSVC and brought it onto the same terminal core as Linux x86_64 and ARM64. Other Windows targets and macOS remained on Alacritty in that release.</p>]]></content:encoded>
    </item>
    <item>
      <title>libghostty-vt on Linux: replacing Alacritty in Paneflow 0.8.0</title>
      <link>https://paneflow.dev/blog/libghostty-linux</link>
      <guid isPermaLink="true">https://paneflow.dev/blog/libghostty-linux</guid>
      <pubDate>Sat, 18 Jul 2026 00:00:00 GMT</pubDate>
      <dc:creator>Arthur Jean</dc:creator>
      <category>paneflow</category>
      <category>linux</category>
      <category>terminal</category>
      <category>ghostty</category>
      <description>How Paneflow 0.8.0 moved its Linux terminal to libghostty-vt from Rust, with the Alacritty rollback of that release. A dated post; current docs are linked.</description>
      <content:encoded><![CDATA[<blockquote>
<p><strong>Historical announcement (Paneflow 0.8.0).</strong> This article describes Paneflow 0.8.0. Its instructions and media belong to that period. Paneflow 0.19.1 uses Ghostty on all shipped platforms, with no Alacritty fallback; the old <code>terminal.backend</code> options below are not current troubleshooting advice. See <a href="/docs#linux" rel="noopener noreferrer nofollow ugc" target="_blank">current Linux installation</a>.</p>
</blockquote>
<p><a href="https://github.com/arthjean/paneflow/releases/tag/v0.8.0" rel="noopener noreferrer nofollow ugc" target="_blank">Paneflow 0.8.0</a> now uses <code>libghostty-vt</code> for every new terminal session in standard Linux builds. With <code>terminal.backend</code> left on <code>auto</code>, Linux x86_64 and ARM64 builds select Ghostty by default.</p>
<p>This changes the engine that interprets VT data and maintains terminal state, not the workspace around it. Paneflow still owns the PTY, process lifecycle, GPUI renderer, panes, sessions, agent state, diffs, and persistence. macOS and Windows continue to use Alacritty.</p>
<p><img src="https://paneflow.dev/images/libghostty-linux.webp" alt="Ghostty and Paneflow app icons standing together in a blue and lavender landscape" /></p>
<h2>Ghostty joins Paneflow at the VT engine layer</h2>
<p>Until Paneflow 0.7.x, terminal sessions were built around the Rust crate <code>alacritty_terminal</code> 0.26. That engine handled escape sequences, the grid, scrollback, input modes, search, and part of the rendering model.</p>
<p>The new Linux path uses <a href="https://github.com/ghostty-org/ghostty/blob/ae52f97dcac558735cfa916ea3965f247e5c6e9e/README.md#cross-platform-libghostty-for-embeddable-terminals" rel="noopener noreferrer nofollow ugc" target="_blank"><code>libghostty-vt</code></a>, Ghostty's embeddable terminal engine. It parses VT sequences, tracks cursor and screen state, handles graphemes, wrapping and reflow, encodes keyboard and mouse input, and exposes incremental render state to a host application.</p>
<p>Paneflow does not embed the Ghostty app, its GTK interface, or its renderer. Ghostty provides the terminal core. Paneflow turns that state into owned Rust snapshots and paints them through its existing GPUI renderer, so the product interface and multi-agent workflow stay under Paneflow's control.</p>
<h2>A Paneflow boundary now separates the engine from the product</h2>
<p>Replacing the parser was only part of the work. Alacritty types had reached into the PTY loop, rendering, search, selection, hyperlinks, scrollback restoration, and session lifecycle. Swapping one dependency for another without first removing that coupling would have moved the same problem to a new engine.</p>
<p>Paneflow now exposes its own terminal-session boundary. Both Alacritty and Ghostty produce the same Paneflow commands, events, modes, search results, and render snapshots. The renderer no longer needs to know which engine created a cell.</p>
<p>That boundary is the durable part of the migration. Linux can move first without changing macOS or Windows, and a future engine upgrade no longer requires the rest of the app to adopt its internal types.</p>
<h2>The unstable C API stays inside a small Rust wrapper</h2>
<p>Ghostty describes <code>libghostty-vt</code> as functionally mature while its API signatures are still changing. Paneflow therefore pins the exact Ghostty commit <a href="https://github.com/ghostty-org/ghostty/tree/ae52f97dcac558735cfa916ea3965f247e5c6e9e" rel="noopener noreferrer nofollow ugc" target="_blank"><code>ae52f97d</code></a>, its C header, generated bindings, Zig version, build configuration, and archive checksum.</p>
<p>The raw C ABI is isolated in one <code>-sys</code> crate. A second safe wrapper owns every native handle, validates the API version and C layouts before creating a terminal, catches callback panics, and releases Ghostty allocations with the matching allocator.</p>
<p>The ownership rule matters most during rendering. <code>libghostty-vt</code> exposes borrowed rows and cells that a later terminal mutation can invalidate. Paneflow copies the required data while the terminal is locked, then gives GPUI an owned Rust snapshot. No C pointer or borrowed slice survives the lock or a frame boundary.</p>
<p>This costs more maintenance than following an unpinned dependency: every Ghostty upgrade must regenerate and review the header, bindings, static archives, checksums, symbols, and licenses for both Linux architectures. That cost is explicit and contained instead of being paid as runtime uncertainty.</p>
<h2>Alacritty remains the differential reference and rollback</h2>
<p>The intended user-visible result is continuity. Shells, coding agents, full-screen TUIs, search, selection, clipboard operations, scrollback, OSC events, resize, reflow, and process shutdown still need to behave as they did before the engine changed.</p>
<p>Paneflow feeds the same deterministic VT streams to Alacritty and Ghostty in several chunk sizes, then compares their normalized snapshots and ordered events. Separate fuzz targets exercise malformed and truncated sequences, input encoding, resize and reflow, and boundaries where a sequence arrives across multiple PTY reads. Package checks also reject a Linux artifact if it links to a runtime <code>libghostty.so</code>, carries the wrong build identity, or omits the reviewed native notices.</p>
<p>Alacritty has not been removed. To use it for newly created Linux sessions, set the backend in <code>paneflow.json</code>:</p>
<pre><code class="language-json">{
  "terminal": {
    "backend": "alacritty"
  }
}
</code></pre>
<p>An active session never changes engine in memory. Close it and open a new pane after changing the setting. <code>auto</code> selects Ghostty in standard Linux builds and Alacritty on macOS, Windows, or Linux builds compiled with <code>--no-default-features</code>.</p>
<h2>Static linkage, with no Ghostty installation required</h2>
<p>The official Linux packages contain a pinned static <code>libghostty-vt</code> archive for x86_64 or ARM64. Users do not need Ghostty, Zig, or a shared library installed on the machine. A normal <code>cargo build</code> from a clean Paneflow checkout also uses the verified bundled archive and never downloads native source during <code>build.rs</code>.</p>
<p>Linux is the first platform for this backend. Extending it to Windows or macOS, and eventually removing Alacritty, are separate decisions. Paneflow 0.8.0 keeps the blast radius smaller: one new default, two supported engines, and an immediate rollback for new sessions.</p>
<p>Update to Paneflow 0.8.0, open a fresh pane, and run the shell, TUI, or coding agent you normally use. If a terminal behavior regresses, switch new sessions back to Alacritty and report the command, Linux distribution, and whether the session ran under Wayland or X11.</p>]]></content:encoded>
    </item>
    <item>
      <title>Launching Paneflow on Show HN</title>
      <link>https://paneflow.dev/blog/show-hn-launch</link>
      <guid isPermaLink="true">https://paneflow.dev/blog/show-hn-launch</guid>
      <pubDate>Tue, 30 Jun 2026 00:00:00 GMT</pubDate>
      <dc:creator>Arthur Jean</dc:creator>
      <category>paneflow</category>
      <category>agents</category>
      <description>The Show HN launch of Paneflow in June 2026: parallel CLI agents, worktree review, and the control boundaries of the CLI and read-only MCP bridge.</description>
      <content:encoded><![CDATA[<blockquote>
<p><strong>Launch context.</strong> This article and the demo below describe the June 2026 interface, including the former Review view with one column per worktree. For Paneflow 0.19.1, see <a href="/blog/introducing-paneflow" rel="noopener noreferrer nofollow ugc" target="_blank">the Paneflow introduction</a>.</p>
</blockquote>
<p>Paneflow launched on Show HN in June 2026 as a native terminal multiplexer for coding agents. The goal was to bring agents, project context, and code review into one local interface.</p>
<p>With Claude Code fixing a bug, Codex reviewing changes, and a dev server running alongside them, each terminal holds part of the project state. Switching between them means finding the right directory, checking the branch, and reading output to see who needs a response. Paneflow brought those terminals and their context together.</p>
<p>Demo video: <a href="/videos/paneflow-landing-demo.mp4" rel="noopener noreferrer nofollow ugc" target="_blank">/videos/paneflow-landing-demo.mp4</a></p>
<p>Watch the <a href="https://www.youtube.com/watch?v=hElqzB2XMn0" rel="noopener noreferrer nofollow ugc" target="_blank">full Paneflow launch demo on YouTube</a> or read the <a href="https://news.ycombinator.com/item?id=48735123" rel="noopener noreferrer nofollow ugc" target="_blank">Show HN: Paneflow discussion</a>.</p>
<h2>Keep a task's terminals and changes together</h2>
<p>Each pane remained a terminal running an ordinary CLI process. Claude Code, Codex, OpenCode, tests, and dev servers could run alongside each other in the same workspace.</p>
<p>A task could use its own Git worktree to keep its files and branch separate. The launch interface's Review view displayed diffs side by side, one worktree per column. You could compare the changes from two tasks before deciding what to keep or revise. Separate worktrees still required review and conflict resolution when combining the branches.</p>
<h2>Coordinate through the CLI</h2>
<p>Paneflow Conductor exposed coordination through the CLI and a local socket. <code>paneflow ps</code> listed panes and agents; <code>paneflow watch</code> streamed events as JSONL. Agent activity came from hooks and the event bus, with tracking depending on the available integration.</p>
<p>The interface let you read output, interrupt a process, or take over a terminal. Prompt sending pre-filled text by default, leaving you to press Enter. Automatic submission required an explicit opt-in.</p>
<h2>Share output through a read-only MCP bridge</h2>
<p>The MCP server exposed three tools: <code>list_panes</code>, <code>read_pane</code>, and <code>search_pane</code>. An agent connected to the bridge could read test output from another pane or search for an error before proposing a fix.</p>
<p>The bridge could not type into panes or control processes. Terminal output was treated as untrusted data: sharing an agent's transcript did not make its instructions authoritative. Read access and CLI control had separate permission boundaries.</p>
<h2>A native interface for local processes</h2>
<p>Paneflow was built in Rust with GPUI, the UI framework used by Zed. The agents remained CLI processes running locally and connecting to their own model providers.</p>
<p>The launch brought project context and review closer to those processes. Assigning tasks, answering approval requests, and reviewing the resulting code remained your responsibility.</p>]]></content:encoded>
    </item>
    <item>
      <title>Paneflow: a native terminal multiplexer for coding agents</title>
      <link>https://paneflow.dev/blog/introducing-paneflow</link>
      <guid isPermaLink="true">https://paneflow.dev/blog/introducing-paneflow</guid>
      <pubDate>Thu, 30 Apr 2026 00:00:00 GMT</pubDate>
      <dc:creator>Arthur Jean</dc:creator>
      <category>paneflow</category>
      <description>Group Claude Code, Codex, and other agents by project. Return to live terminals and inspect their changes in Changes and Files.</description>
      <content:encoded><![CDATA[<p>Paneflow is a native terminal multiplexer for coding agents. Run Claude Code, Codex, OpenCode, or another CLI side by side, then read and edit the project's files in the same interface. The agents remain the command-line tools you already use, each in its own terminal.</p>
<h2>Panes grouped by project</h2>
<p>Open the project directory, then split a tab into panes. You can assign implementation to Claude Code, ask Codex for a review in another pane, and keep tests or the dev server in a third. Activity tracking helps you spot agents that need attention; the available states depend on each agent's integration.</p>
<p>Several agents can share a tab and a working directory. That works, for example, for implementation alongside a review that makes no edits. When two tasks need to change files independently, create a separate branch and <a href="/docs/worktrees" rel="noopener noreferrer nofollow ugc" target="_blank">Git worktree</a>. Each task gets its own directory; you still need to resolve any conflicts when integrating the branches.</p>
<h2>The diff beside the terminal</h2>
<p>After an agent changes the code, open <strong>Changes</strong> to inspect the result. This view compares the active working directory with <code>HEAD</code>, including staged and unstaged changes and untracked files. It covers local changes; to review existing commits, use the branch diff.</p>
<p>Then open a file in <strong>Files</strong> to read its context or make a correction. The integrated editor supports saving, undo, and redo, with Git markers in the gutter. You can move from the agent's output to the code it produced without leaving Paneflow.</p>
<h2>Close the interface while work continues</h2>
<p>Terminals run in a host process separate from the interface. When quitting, choose <strong>Keep sessions running</strong> to leave shells and agents alive. Reopening Paneflow reconnects to those terminals while the host and machine remain running. <strong>Stop everything and quit</strong> ends the processes.</p>
<p>A machine restart or host crash ends those sessions. Restarting an ended terminal opens a fresh shell. To resume an agent conversation, Paneflow uses that agent's saved history and resume command.</p>
<h2>Share output between agents</h2>
<p>An agent reviewing code can read test results from another pane through the <a href="/docs/scripting" rel="noopener noreferrer nofollow ugc" target="_blank">MCP bridge</a>. The following command installs the bridge for the supported agents it detects:</p>
<pre><code class="language-sh">paneflow mcp install
</code></pre>
<p>Its tools, <code>list_panes</code>, <code>read_pane</code>, and <code>search_pane</code>, let agents find panes, read their output, and search for text. Those three tools only read. A fourth, <code>write_pane</code>, sends a message to another agent's pane once you have allowed that pair of agents; the bridge cannot type or control a terminal in any other way. The CLI provides that control through explicit permissions. An agent must treat the output it reads as data to examine, even when it looks like an instruction.</p>
<h2>A native application that runs locally</h2>
<p>Paneflow is built with Rust, using GPUI for the interface and Ghostty's <code>libghostty-vt</code> as its terminal engine. Version 0.19.1 is available for Linux x86_64/aarch64, macOS Apple Silicon, and Windows x64. The <a href="/docs" rel="noopener noreferrer nofollow ugc" target="_blank">installation guide</a> covers the available packages. Paneflow is free of charge and free software under <a href="https://github.com/arthjean/paneflow/blob/v0.19.1/LICENSE" rel="noopener noreferrer nofollow ugc" target="_blank">GPL-3.0-or-later</a>.</p>
<p>Terminals run on your machine without a Paneflow account. Each agent connects to its own model provider, so its requests may leave the machine. Paneflow telemetry is disabled by default. If you enable it, it excludes terminal contents, paths, and prompts; <code>PANEFLOW_NO_TELEMETRY=1</code> disables it regardless of configuration.</p>]]></content:encoded>
    </item>
  </channel>
</rss>
