<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pi-agent on Saurabh Kumar</title><link>https://saurabh-kumar.com/tags/pi-agent/</link><description>Recent content in pi-agent on Saurabh Kumar</description><generator>Hugo</generator><language>en-US</language><copyright>Copyright © 2025, Saurabh Kumar.</copyright><lastBuildDate>Fri, 09 Oct 2026 12:00:02 +0000</lastBuildDate><atom:link href="https://saurabh-kumar.com/tags/pi-agent/index.xml" rel="self" type="application/rss+xml"/><item><title>Pi Pocket's subagent implementation</title><link>https://saurabh-kumar.com/til/1791547202/</link><pubDate>Fri, 09 Oct 2026 12:00:02 +0000</pubDate><guid>https://saurabh-kumar.com/til/1791547202/</guid><description>&lt;p&gt;&lt;a href="https://github.com/TannerMidd/pi-pocket/blob/3e6046612db4358b599da302d5c96bd407d9de5c/src/server/extensions/subagents.ts" rel="noopener external"&gt;Pi Pocket&amp;rsquo;s subagent implementation&lt;/a&gt; gives each worker a retained conversation and uses durable tasks to deliver messages and report answers. Request IDs and recorded answer IDs prevent duplicate delivery and reporting after restart. The idea worth stealing: make the handoff durable, not just the worker.&lt;/p&gt;&#10;</description></item><item><title>Arnav Gupta's pi-subagent-manager</title><link>https://saurabh-kumar.com/til/1791547201/</link><pubDate>Fri, 09 Oct 2026 12:00:01 +0000</pubDate><guid>https://saurabh-kumar.com/til/1791547201/</guid><description>&lt;p&gt;&lt;a href="https://github.com/championswimmer/pi-subagent-manager" rel="noopener external"&gt;Arnav Gupta&amp;rsquo;s pi-subagent-manager&lt;/a&gt; makes context inheritance explicit. Nested threads receive their parent&amp;rsquo;s snapshot; independent roots start without its history. Threads stay around for steering and resume. I want synchronous coordination by default, forks for continuity and fresh context for independent review.&lt;/p&gt;&#10;</description></item><item><title>Armin Ronacher's subagent extension</title><link>https://saurabh-kumar.com/til/1791547200/</link><pubDate>Fri, 09 Oct 2026 12:00:00 +0000</pubDate><guid>https://saurabh-kumar.com/til/1791547200/</guid><description>&lt;p&gt;&lt;a href="https://github.com/mitsuhiko/agent-stuff/blob/main/extensions/subagent.ts" rel="noopener external"&gt;Armin Ronacher&amp;rsquo;s subagent extension&lt;/a&gt; runs one observable Pi child at a time in tmux. The parent waits for the result, while I can attach to inspect or intervene. Worth preserving when adding hierarchy: synchronous coordination must not mean invisible execution.&lt;/p&gt;&#10;</description></item><item><title>Pi Durable</title><link>https://saurabh-kumar.com/til/1791374400/</link><pubDate>Wed, 07 Oct 2026 12:00:00 +0000</pubDate><guid>https://saurabh-kumar.com/til/1791374400/</guid><description>&lt;p&gt;&lt;a href="https://earendil.com/posts/pi-durable/" rel="noopener external"&gt;Pi Durable&lt;/a&gt; is Earendil&amp;rsquo;s experimental agent harness, shipped alongside Pi 1.0. &lt;a href="https://github.com/TannerMidd/pi-pocket" rel="noopener external"&gt;TannerMidd/pi-pocket&lt;/a&gt; is a mobile-first, multiplayer web app for Pi built on it.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Every model call and tool call is a task that checkpoints to storage (SQLite, JSONL, or memory) before moving on. Kill the process and a new one opens the same file and resumes.&lt;/li&gt;&#10;&lt;li&gt;Recovery is per step: a cut-off model request is resent with the partial answer kept and marked aborted. A cut-off tool call reruns only if it is replay-safe; otherwise the model is told it was interrupted.&lt;/li&gt;&#10;&lt;li&gt;A &lt;code&gt;requestId&lt;/code&gt; makes a submission exactly-once, so a client retrying after a crash gets the original back.&lt;/li&gt;&#10;&lt;li&gt;Forks see the parent transcript up to the fork point without copying it.&lt;/li&gt;&#10;&lt;li&gt;~15k lines total, small enough for an agent to read end to end.&lt;/li&gt;&#10;&lt;li&gt;pi-pocket: restart the server mid-run and the work continues. Several people can watch, steer, or queue messages on the same session.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;npm start -- --access tailscale&lt;/code&gt; binds only to the tailnet address, so my phone gets it with no tunnel.&lt;/li&gt;&#10;&lt;li&gt;The shift: the session lives in a SQLite file, not a terminal process, so the phone is just another client. Could replace my Moshi + tmux setup.&lt;/li&gt;&#10;&lt;li&gt;Caveat: anyone who can steer runs shell commands as you.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>pi-blackhole</title><link>https://saurabh-kumar.com/til/1788609600/</link><pubDate>Sat, 05 Sep 2026 12:00:00 +0000</pubDate><guid>https://saurabh-kumar.com/til/1788609600/</guid><description>&lt;p&gt;Every coding agent (Claude Code, Codex, pi) compacts long sessions the same way: ask an LLM to prose-summarize, then summarize that summary, until load-bearing details erode (why a decision was made, which approaches got rejected). &lt;a href="https://github.com/k0valik/pi-blackhole" rel="noopener external"&gt;pi-blackhole&lt;/a&gt; swaps that for deterministic compaction: a zero-token &lt;code&gt;compile()&lt;/code&gt; that extracts structured sections (goal, files touched, commits, preferences, brief transcript). No LLM, no drift, no cost. The compile is only lossy in the window, not on disk: blackhole also ships a &lt;code&gt;recall&lt;/code&gt; tool (BM25 + regex over the raw session JSONL and the memory ledger) that re-fetches any dropped turn on demand, so compile + recall together is lossless where an LLM summary-of-a-summary destroys the original. It also adds observational memory: background observer/reflector workers append durable facts to per-session ledgers that survive every compaction, and &lt;code&gt;/blackhole-export&lt;/code&gt; walks every past-session JSONL under a git-root into a ranked context file. The clever part is what export trusts. A fact&amp;rsquo;s rank is driven by cross-session &lt;em&gt;recurrence&lt;/em&gt;, damped as &lt;code&gt;log(1 + distinctSessions)&lt;/code&gt; with a burst penalty, not raw counts, so one chatty session can&amp;rsquo;t inflate it. Recurrence-as-reinforcement is basically &lt;a href="https://saurabh-kumar.com/articles/2025/11/notes-on-understanding-hebbian-learning/" rel="noopener external"&gt;Hebbian&lt;/a&gt;: facts that keep firing across sessions get stronger. Dedup is a 3-pass funnel, exact then Levenshtein then Sørensen-Dice token-set, with a Levenshtein floor so keyword overlap alone can&amp;rsquo;t merge two distinct facts. Bonus: the OM workers run on their own model and billing, so I point them at &lt;code&gt;openai-codex/gpt-5.6-luna&lt;/code&gt; while the main thread stays on Claude.&lt;/p&gt;&#10;</description></item></channel></rss>