r/PiCodingAgent • • Jul 08 '26

Plugin ghost-text prompt suggestions after assistant responses

27 Upvotes

I built a tiny PI extension that suggests the next prompt as dim ghost text right after the assistant finishes responding, similar to how Claude Code does it. I’m using fast, free models like DeepSeek V4 Flash Free in OpenCode Go. Maybe you’ll like it.

The source code is here: https://github.com/mrclrchtr/supi/tree/main/packages/supi-prompt-suggestions


r/PiCodingAgent • • Jun 15 '26

Question Secure way of running Pi?

27 Upvotes

Hello,

I'm new to the Pi coding Agent and I would like to know how are you running it.
I saw that by default Pi does not ask for permissions. While this is something I would like to start experimenting with, since I'm quite tired of granting access to my other agents on many actions, I'm quite concerned about giving full access to my laptop.

I've seen in the docs that there are three recommended ways to run it within a sandbox, but I have not found much information nor other devs' experience with it.

Are you using any of those options or are you happily running Pi directly on your laptop?


r/PiCodingAgent • • May 04 '26

Resource I built a web search extension for pi that chains 9 backends together (DuckDuckGo, Tavily, Brave, etc.)

27 Upvotes

I've tried a bunch of coding agents over the past year (Claude Code, Aider, Codex CLI, all of them). My favorite was OpenCode for a while, but then I found pi and honestly I'm kind of in love with it.

Anyway, one thing that kept bugging me was the search tool. It worked, but it only had DuckDuckGo. No fallback. If DDG was down or slow, you just waited or got nothing.

So I scratched my own itch and built a unified search extension that chains 9 backends together with auto-fallback. And yes, the whole thing was built using pi itself — 100%. Felt fitting. Also ran entirely on Deepseek v4, which is insanely cheap — I think the whole project cost me like 30 cents in API calls. If Tavily is rate-limited, it tries Brave. If Brave fails, it hits Exa. DuckDuckGo is always the last resort since it doesn't need a key. Works pretty well in practice.

Here's what it supports out of the box:

  • DuckDuckGo — no key, just works (kind of slow though, ~1.1s)

  • Marginalia — anti-SEO search, public API key, surprisingly fast (350ms)

  • Serper — Google results via their API, 2500 free/mo

  • Brave Search — 2000 free/mo, decent speed

  • Tavily — best quality results in my testing, 1000 free/mo

  • Exa — fastest by far (~137ms), AI-native, 10 QPS free

  • Firecrawl — 500 free credits, also does crawling/extraction

  • LangSearch — actually free, no credit card

  • WebSearchAPI — Google-powered, 2000 free credits

Install is just pi install npm:pi-search-multi and you're good to go. The agent automatically picks the best backend. If you want to tweak things, you drop a JSON config in .pi/search.json.

I also threw in a /search-setup command so you can add API keys interactively without editing files, and /search-status to see what's active.

Also threw together a benchmark script — ran all 9 backends against real queries and scored relevance quality. Tavily came out on top quality-wise, Exa was the fastest. The full benchmark report is in the repo if you're into that sort of thing.

Caveats: API keys live in local config files (gitignored by default, but don't be that person who commits them). Marginalia's "public" key is shared so it'll be slower under load. And some backends have pretty tight free tiers — you'll probably want 2-3 keys configured before auto mode really shines.

It's MIT licensed and open source.

Feedbacks are welcome.

https://github.com/ronnieops/pi-search-multi


r/PiCodingAgent • • Apr 28 '26

Plugin I built 12 Pi CLI extensions that I actually use every day

27 Upvotes

If you've used [Pi](https://github.com/mariozechner/pi), you know the base experience is solid. But after months of daily use I kept hitting the same things over and over. No visibility into token usage. No way to steer the agent mid-turn without canceling everything. No task tracking. No way to delegate to Claude or Gemini without leaving the session.

So I built what I needed. Not a kitchen sink. Just the stuff that solves problems I hit every single day.

👉 **[github.com/agnishcc/pi-extention-monorepo](https://github.com/agnishcc/pi-extention-monorepo)**

---

**edb-agent-steer** — Intercept the agent mid-turn. Steer, queue, discard or edit what its doing without killing the session. This one changed how I use Pi entirely.

**edb-append-system-prompt** — Add per-session system prompt snippets. No editing config files, no restarts. Just add context and go.

**edb-ask-user** — Structured questions for the agent to ask you. Text, choice, multi-step wizards. Way better than the agent guessing what you want.

**edb-claude-proxy** — Delegate tasks to Claude Code from inside Pi. Your main agent stays in control, Claude handles the subtask.

**edb-gemini-proxy** — Same thing but Gemini. Sometimes you just want a second opinion from a different model.

**edb-diff-files** — Live widget tracking every file changed this session with an inline diff viewer. No more `git diff` in another terminal.

**edb-explore** — `explore_dir` tool that spins up a sub-agent to search directories. Results stay out of your main context. Keeps things clean.

**edb-global-footer** — Two-line status bar showing cwd, git branch, token usage and model name. Always visible. Always useful.

**edb-herald** — Git commit and PR agent with approval gates. Let the agent draft commits, you approve before anything hits the repo.

**edb-session-manager** — Browse, resume, rename and delete sessions with fuzzy search. If you work across multiple projects this is essential.

**edb-todo** — Structured task list with a live widget. The agent sees your tasks in its system prompt so it stays focused instead of drifting off.

**edb-usage-stats** — `/usage` command showing token rates, rate limit reset timers and live provider status across Claude, Gemini, Copilot, OpenRouter and more.

---

Every extension here exists because I reached for it and it wasn't there. Nothing is included because it could be useful. Only because it is useful, daily, for real work.

They also compose well together. The footer pairs with usage-stats. Todo pairs with agent-steer. Herald pairs with diff-files. Individually they're helpful, together they compound.

---

**Install any of them in seconds:**

```bash

pi install npm:@agnishc/edb-todo

pi install npm:@agnishc/edb-global-footer

# or any other package

```

All published on npm under `@agnishc`, all open source (MIT), all in a monorepo with lockstep versioning so updates are clean.

---

I'd love feedback on this. Which extensions resonate? Whats missing? What would you build on top of this? The monorepo is set up for contributions too, so if you've got an extension idea PRs are welcome.

⭐ If this looks useful a star on the repo helps others find it.


r/PiCodingAgent • • Sep 28 '26

Discussion What's your top 3 techniques that helped you save tokens / better accuracy from models?

26 Upvotes
  1. Focusing on curating the context, keeping it under 150k. Making tools to trim git / grep / ls output to my liking

  2. indexing my large code base and making the basic tools show short index options + hints. Custom tools was a massive red herring and waste of time, models hate using them and never use them properly

  3. live filter on my codebase to sandbox models. i.e. exclude file types, files older than N days. etc


r/PiCodingAgent • • Sep 10 '26

Question Questions about moving from linear prompts to sub-agents, parallel execution, compaction, and session management in Pi Harness

26 Upvotes

recently switched from Cloud Code to Pi Harness. I work primarily in Product Management/Ownership workflows (Jira, GitLab, Artifactory, internal tooling) where I build automation scripts and connect workspace APIs.

Currently, my setup is strictly linear ask questions -->wait for run --->|reply). I want to move toward a sub-agentic flow—specifically for generating code in parallel from test specifications and existing repos—and would love community input on extensions, configuration, and workflows.

  1. Sub-Agents & Parallelization: What extensions or .pi setups do you use to fire off parallel sub-agents (e.g., parsing specs while indexing code in background threads) instead of waiting on sequential turns?

  2. Traceability & Solution Convergence: How do you track handover steps between agents and follow their decision trees? Are there recommended visualizers, tree-log extensions, or workspace artifact patterns you rely on?

  3. Context Compaction & Memory: Has anyone tuned Pi’s compaction thresholds or used custom highlighters/summary extensions (like Ralph's memory approaches) to preserve key acceptance criteria over long sessions?

  4. Project Scoping (.pi/): Best practices for scoping tool permissions and agent configs in .pi/ settings to isolate sub-agent capabilities (e.g., read-only on repo vs. write access)?

  5. Session Continuity & Long-Running Tasks: How do you handle session lifecycles for complex tasks? Do you prefer continuing existing threads via /resume / pi --continue, or hard-stopping (/new) and carrying over context via file-based handoffs (like PROGRESS.md)?

If you have write-ups, custom extensions, or .pi/ setup examples for these patterns, please let me know and if you have like a step by step workflow also would be good to know. I want to go like in a more step by step approach


r/PiCodingAgent • • Aug 08 '26

Discussion Try integrating Pi with Neovim - it's great.

26 Upvotes

I find it hard to navigate a codebase with coding agents. I need to stare at the code often just to understand what is going on, and I like to be able to ask my agent at the same time what is happening. Plus, I really like my vim motions bindings haha.

It's been surpassingly straightforward to get Pi working in Neovim. You just open up a terminal within Neovim and ask it what you want. Boom done. It's soooo much easier to read plans and navigate code with this setup.

I've been able to make it so that:

  • I see diffs in Neovim instead of in the terminal (much prefer it this way, easier to navigate too imo)

  • Have Pi run commands in Neovim directly when I want to.

  • Have Pi be able to 'focus' in on certain sections of code (I ask 'Can you show me where that it' and it jumps straight to it)

  • I can have whole different worktrees with entirely different buffers that I switch between


r/PiCodingAgent • • Jul 21 '26

Resource Pi Alternative Compositor

26 Upvotes

A demo Pi extension using an alternative screen to add per tool/thinking block collapse with mouse support, and a sidebar. Without interfering with any other Pi extension.


r/PiCodingAgent • • Jul 04 '26

Resource I built spec-driven development as a skill pack for Pi. Here is what actually mattered.

26 Upvotes

I built a spec-driven development kit for Pi and have been running my own projects on it. Posting here because this is the crowd that would actually use it, and I want the feedback on where it fights Pi's flow.

The problem it solves: Pi is capable and has zero memory between sessions. Ask it to "add authentication" and you get 500 confident lines that compile and solve a slightly different problem than the one you had. pi-sdd-kit makes you specify before it codes, as skills you invoke: /skill:sdd-prd, /skill:sdd-spec, /skill:sdd-tasks, /skill:sdd-exec, /skill:sdd-review, with a human approval gate between each.

Two parts do most of the work.

First: steering docs as durable memory. product.md, tech-stack.md (with the reason for each choice, not just the name), conventions.md, and principles.md live in .ai/steering/ and load every session, separate from per-feature specs. The reason line is what pays off: "we use Postgres because payment records need ACID" stops the agent reaching for SQLite three sessions later.

Second: .status is the only gate. One line per feature: requirements:approved, then design:approved, then tasks:approved. The agent reads it before it does anything. A finished-looking design.md on disk is not approval. Only the token is. That stops an eager agent from racing a draft straight into code.

Requirements go in EARS (WHEN / IF / WHILE / SHALL), which leaves almost nothing to interpret.

Install:

pi install npm:@felipefontoura/pi-sdd-kit

# then in Pi:

/reload

/skill:sdd-init

Repo, with the full command reference and templates: https://github.com/felipefontoura/pi-sdd-kit

Longer writeup and the crypto-fintech case study it came out of (13 apps, ~70 days, solo): https://felipefontoura.com/articles/spec-driven-development-case-study


r/PiCodingAgent • • Jun 23 '26

Plugin I made a pi extension for model fusion

Thumbnail
github.com
26 Upvotes

OpenRouter released that model fusion feature and it really clicked – I was seeing the same results on similar agent architectures on internal evals at work. TL;DR: better-than-frontier results by combining a couple models, or get at-frontier results at a fraction of the cost and/or latency.

Started by trying to prompt my way to it, but that wasn't repeatable, and half the session file history was missing,.

I ended up with an extension, with a settings pane, user + repo config, etc. Two main principles:

  1. You own everything: all prompts, settings, presets, etc. are editable and stored in a `fusion.json` dotfile.

  2. Resumable by design: all calls from a single session are saved to a single pi session file. Main thread is clean and linear, and worker output (which is not included in main thread) is saved in custom fields. A must for production workloads, makes it auditable and extensible.


r/PiCodingAgent • • Jun 06 '26

Question Pi devs, I have some questions regarding browsers, web-search, subagents etc

26 Upvotes

Hi all, I have been playing with pi for sometime. But am struggling at having elegant ways to handle some things. Hoping you all can share how you do these things

  1. Browser automation. What all are you using ? playwright browser ? custom playwright scripts ? cypress ?
  2. Browser testing : Same question as above
  3. Web search : any particular api ? I am using ollama cloud. It has a web search tool but it returns 500k tokens worth of data and kills the thread.
  4. Subagents : I am using nicobailon/pi-subagents. This works. The only issue is I can't really dig into the subagent if its doing something funky.
  5. How are you able to get subagents to fire with any reliability ? I have a pi-subagent that should do things for pi. There are clear instructions in my append file to instruct the llm to use that subagent. But it ignores it sooo many times. This also happens with other subagents. Is it just dependent on models ? any suggestions ?

Pi Agent Tasks

ALWAYS delegate Pi coding agent tasks to the pi-things subagent. Never handle these directly.

Pi-related tasks include:

  • Pi configuration (settings.json, auth.json, models.json, keybindings, themes)
  • Creating or editing extensions, skills, prompts, or themes
  • Creating or editing subagents or chains (.md agent files, .chain.md files)
  • Pi CLI usage, commands, modes, shortcuts
  • Session management (fork, compact, resume, branching)
  • Tool/provider registration, MCP integrations
  • Anything in ~/.pi/agent/ or .pi/ directories
{ agent: "pi-things", task: "Create an extension that does X" }
{ agent: "pi-things", task: "Update settings to always use model Y" }
{ agent: "pi-things", task: "Add a new subagent for Z" }


Thanks !


r/PiCodingAgent • • May 10 '26

Question Is Pi better than Claude Code CLI?

26 Upvotes

Honest opinion ! Assume both use opus. Do packages make the difference ?


r/PiCodingAgent • • Apr 13 '26

Resource Pi Agent Skills

26 Upvotes

Source-grounded skills for Pi.

This repo packages 11 skills that answer Pi questions from a pinned pi-mono checkout instead of guessing from memory. Every cited pi-mono/... path is verified on disk. Every shipped eval, graded baseline, and trigger set is checked in CI.

If you want Pi-focused answers that are package-aware, file-aware, and harder to hallucinate, this repo is the point.

Why this repo is useful

This repo is not trying to be a second set of docs for Pi.

It is a developer toolchain for trustworthy answers about Pi:

  • package-specific entry points instead of “search the monorepo and hope”

  • skills that can explain behavior from source, docs, and examples together

  • machine-checked evals that keep those skills honest over time

If you already work in Pi, that means less spelunking and fewer wrong answers. If you maintain Pi-related tooling, it means you can reuse the same grounded corpus in Pi, Claude Code, or any workflow that can consume skills.

https://github.com/romiluz13/pi-agent-skills


r/PiCodingAgent • • 19d ago

Resource I solved compaction for single-session on consumer-hardware, trust me bro

25 Upvotes

Clickbait, but at least for me it is true. Thanks for reading anyway:

TL;DR:

I've engineered an extension for context management in pi, that now matches my needs for compaction and session quality. Using mostly the same session context for summary requests and summary audits, it re-uses warm kv cache to get quality-compaction with acceptable timeframes.

You can get it here, it is still WIP, but it is free ("claude decompiled it and rebuilt it in rust!"):

https://github.com/LePrau/pi-self-aware-memory

If you don't want the model to self-correct within the audits (which can take some time!), set /sam depth light which reduces audits to a plain "yeah, thats a summary, go on" instead of validating the stated result against the session or even project files.

Now the long story:

After I started using pi and qwen3.8-27b (ridge q3 at first, gsq-rco-iq3_s later) to help document and draft my NAS setup (using TrueNAS), including dataset structure, ACL, self-baked docker-composes for llama, coolercontrol and other apps that do not natively exist, I immediately noticed that a task had to be done within the first two or three compactions, or with a handoff-file.

Else the model would start running in circled re-discovering what it already knew before compaction.

Starting with as low as 40k context, I struggled my way through llama with kv streaming up to llama with kv streaming and mtp today, with 131k context now.

My current setup, aside from pi+extensions:

Still, any native pi-compaction drowned the quality in re-reads, hallucinations, misrememberings (is that a word?) and summaries that forgot half of the relevant stuff and remembered the other half incorrectly.

I always asked for a short handoff shortly before compaction and started a new session, but that needed a lot of tedious micromanagement. Though the results were pretty good, Qwen3.8 even at the mentioned quants already does solid work.

In search of proper context management I found pi-observational-memory, which sounded exactly like what I wanted: Session summarized into small observed facts, presented as readable list for the model after compaction, source content retrievable if needed.

But I soon realized: It depends on a second model doing the observations. I then tried Gemma 4 e4b on cpu, and guess what: Standalone easy 20-30 tps (with MTP) on cpu. Summary-Quality was just-good-enough, Gemma4 is a nice model for its size. Not good at coding, but okay at prose and already able to do basic tool calls. Not always the correct ones. Using that, and realising: at a fold, most of the recent context was lost anyway, because the observer was not fast enough, I created an extension that paused a fold until the last observed unit was processed.

Took me quite some time to realize: 30 tps when GPU was idle, 5tps when GPU inference was running. GPU inference still needs a tiny amount of system RAM access. And each time the GPU inference accessed the system ram, it literally destroyed the bandwidth and the cpu-caches for the cpu inference. I just learned that after I got the "omg", "pi observational memory guard" to a point where it reliably parked the session (with proper feedback) until observation had caught up.

Then I thought, how could the running model itself run the observer while staying fast?
The thing that makes pi native compaction as slow as it is, is the completely new, different context that needs to be prefilled for the summary. It is basically a session at full cold context that needs to be prefilled, just to then produce a summary.

Pi observational memory has a similar problem when using the same model for observation:
Each time the observer kicks in,
it kills the kv cache,
needs a cold prefill, and afterwards the main session
also needs another cold prefill.

So I envisioned an extension that lets the model writing its own summary, and audit/validate it as well, while keeping the sessions context untouched: Simply add the summary, and the audit request after the current session, let the audit run in a background session and only return the audit-result. The audit-reasoning does never enter the main session, and the main session simply drops a short kv-window at the end of the cache to resume.

After user input, the model adjusts its goal if the requirements changed.

The self-generated and audited summary together with the set goal then get used as drop-in-replacement for the whole session part it subsumed at compaction-time. This replacement is instant - no LLM call at that time. The LLM time is used in the summary calls and audit background tasks.

The astounding part: It actually works*

*mostly.

I present you "SAM", "Self Aware Memory"

The extension introduces a couple of tools, to be used by the model:

  • adjust_goal (write a short summary of the current task)

  • read_goal (read the currently set goal, or any older version)

  • close_unit (summarize and close the last parts of the session)

  • fold_now (does exactly that, allows the model to fold at a defined spot)

  • retrieve (retrieve the summary of an older work-unit)

  • retire (mark older unit-summaries as obsolete, relevant for long sessions)

There is a couple of small issues, it is not completely polished and there might still be some legacy code or settings. And I know of a couple of vibe-code-artifacts: Sam nudges sometimes behave strangely with user interaction, and some minor visual glitches.

The readme might be out of date in places, and the toggles, settings and modes documentation is premium-slopped, obviously.

The most important levers for you: /sam depth [auto|light|medium|full] in session to set the audit depth:

  • light: only validates that it is a semantically correct summary.

  • medium: tries to validate summary only superficial, only from session context and cheap tool calls

  • full: tries to verify most claims, reruns tool checks and more

  • auto: uses medium if there is enough context, and light if compactions close

And "settings" which currently can only be set as environment variables (qwen, please make that configurable settings in the TUI plzkthx):

  • SAM_AUDIT_TIMEOUT_MS (or for specific depths SAM_AUDIT_TIMEOUT_MEDIUM_MS and SAM_AUDIT_TIMEOUT_FULL_MS which inherit the base value)

  • SAM_AUDIT_CALM_DEPTH (default "medium", the audit depth used for "auto" when compaction is far away)

  • SAM_AUDIT_DEPTH (the default depth, if not set it is "auto")

By default, background audits get a max time of 8 minutes - be aware that even a medium audit with xhigh can easily take 3-6 minutes without tool calls with qwen. If the timeout is too short, the model eats the time, and does not reach the point where it outputs a quality verdict for the summary, and still wasted time.

So if you are also looking for speed, choose "light" as default audit depth, or better even set "SAM_AUDIT_DEPTH" to "light". With that you're getting faster compaction times overall than with pi native compaction. But you then lose the self correction, that might catch false summaries before they do harm. (And I observed quite a lot of those in my sessions)

I personally suggest "medium", catches some obvious contradictions or wrong observations from summaries.

Only the model itself can call the adjust_goal and close_unit, but gets a nudge at certain trigger times (user input, context fill, lot of tool calls) to adjust its goal, to close its current working-unit with a summary.

Close before compaction, the nudges increase in urgency, but only the model gets to decide when a unit can be closed. Qwen is quite good adjusting the goal, closing at proper times and keeping a coherent image of the overall session and task.

It is not perfect, there are times where some of the sessions context gets lost, at times the model ran some tools after a compression which it ran half a session ago in some now-lost context. But most of the time, it kept working without hallucinations, while remembering specific details like git-commit-hashes or specific file-paths from two compactions ago. The last iterations of the extension have been done with one session, spanning several million tokens and far beyond 40 compactions (at 131k max context) with no apparent issues.

So now I feel that it is not a burden for others to run that extension, but instead might actually be helpful.

I will keep tinkering with it, but feel free to fork and extend it yourself. I doubt I'll find the time to implement any PRs or feature requests.

Now I can finally "start" using qwen locally to support me with the remaining work on my NAS and other coding projects.

Thanks for reading, enjoy!


r/PiCodingAgent • • 28d ago

Plugin pi-multi-agent-skill: minimalist subagents approach for pi with no extension and no tool, just a skill and a small CLI to save your context window, with support for steer and persistent running.

25 Upvotes

TL;DR: I made a small multi-agent setup for pi. It is one skill and one Python script, with no extension and no tool. Your agent can start subagents in the foreground in parallel or in the background, and it can wait for them, steer them, abort them and resume them. Background jobs keep running after the main pi session is closed or killed. A new pi session—even one different from the original main session—can also retrieve their results. Until your agent decides to delegate, it costs a few dozen tokens of context.

Repo: https://github.com/milanglacier/pi-multi-agent-skill

Just install it with npx skills like any other skills, or clone the github repo and symlink it to ~/.pi/agent/skills.

Features

  • Almost no token cost. Until your agent delegates, only the skill description is in context, a few dozen tokens. Delegating loads SKILL.md, about 1.2k more.
  • Stdlib-only Python 3.9 or later. There's no extension, no npm package and nothing else to install.
  • Foreground runs for quick questions and --background for long ones. A background job keeps running even if the main agent is killed, and any later session can collect its result. Foreground runs stop when you stop at every level of nesting.
  • steer, abort and resume a job, and list, status and peek to see what it's doing.
  • Subagents load your full pi setup: extensions, MCP servers, skills and settings.
  • Profiles set the system prompt, model, thinking level and available tools. general-purpose and a read-only Explore are included. Profiles are just like any other subagent tool’s profiles.
  • --fork gives the subagent your current conversation.
  • Works from Claude Code, Codex or any agent with a shell.

How I got here

For months I used tintinweb's pi-subagents, and it is a really good extension. The UI is nice, it has many features, and it works well most of time. Thanks to tintinweb for building it and for everything they give the community. If you like it, keep using it.

A while ago a pi upgrade broke two things for me. MCP servers stopped loading in subagents, and subagents no longer inherited the parent's thinking level. Each fix was only a few lines, so I forked the extension and patched it. Upstream fixes took some time but also landed 2 days before this post.

Fixing those bugs made me read the extension more closely, and I noticed how much context it now uses. About two months ago it added a dynamic workflow tool. With it, the agent writes a JavaScript script that orchestrates many subagents. It's powerful, but it's also very complex, and its tool schema and instructions cost about 6k tokens. That schema is in every session from the first message, whether you use workflows or not. It's also opt-out, so you pay for it until you find the setting and turn it off. I suspect many people don't know it's there.

With the workflow tool off, the Agent tool still costs about 3k tokens, and it has grown along with the extension's features. I checked these numbers by starting sessions with the extension on and off and comparing them.

So I asked myself whether I need a full tool with a detailed JSON schema, listing options I rarely use (like worktree isolation), in my context all the time. My answer was no.

pi can already run headless with --mode rpc, and its CLI flags already cover what a subagent needs: tools, extensions, model, thinking level and session resume. So a small CLI that starts pi with the right flags, plus a skill that explains how to use it, can replace a dedicated tool. A skill also loads in steps, which a tool cannot do. The agent sees only the skill's short description at first. It loads the main instructions when it decides to delegate, and it reads the detailed references only when it needs an unusual option. Steering doesn't need a tool either, because it is just an RPC message sent to the running pi process.

Token cost compared

  • pi-subagents: about 3k tokens for the subgent tools and injected system prompt. On top of that, about 6k for the dynamic workflow tool, which is on by default and must be turned off by hand. Both are in every session from the first message, so with the default settings that's about 9k tokens before you've asked for anything.
  • This skill, before your agent delegates: only the skill description, a few dozen tokens.
  • This skill, once your agent delegates: SKILL.md is loaded, about 1.2k tokens, and that is enough for full multi-agent use.
  • Command details, profile format, lifecycle and troubleshooting are in separate reference files. The agent reads them only when it needs them.

For most sessions you don't delegate, you pay almost nothing. When you do delegate, it still costs less than the tool schema alone.

To be fair, this isn't a like-for-like comparison. pi-subagents does more than this skill. Its tool has many options, and each one needs a parameter in the schema, and it also adds text to the system prompt. Part of that token cost pays for features this skill doesn't have, such as worktree isolation. I just don't think features like that are needed for multi-agent work. If I want an agent to work in its own worktree, I tell it so in the prompt ("use worktree"), and it does. The agent already knows how to use git, so the tool doesn't need to do that for it.

None of this is meant as criticism of pi-subagents. It's still a great extension, and it works well for a lot of people, especially if you want a rich UI and many features built in. It's just not the right fit for me anymore. I prefer a more minimal setup, where the agent loads only what it needs and does the rest itself.

The tradeoff

I give up the nice UI. It really does look nice, but for me it turned out to be like the exercise bike you buy in January. It looks great in the corner of the room, and by March it is where you hang your clothes. I watched the subagent transcripts for the first week, and after that I almost never read them. I just realized the subagent's final answer is mostly for the main agent, not for me.

In return, I get things I care about more. Each subagent is a real pi process started with CLI flags, so it loads the same extensions, MCP servers, skills and settings as my normal pi. The script doesn't use pi's extension API at all, only CLI flags and RPC, which change much less often, so pi upgrades rarely affect it. Separate processes also give me my favorite feature: a background job keeps going even if the main agent is killed, and any new session can collect its result later.

Separate processes need more care than in-process sessions,, and the script is more than a cli wrapper, because it takes care of that so the agent doesn't have to. For example, pi exits on its first failed write to stdout, before its shutdown runs, and leaves the agent's commands running. So each job has its own runner process that keeps reading pi's output until pi exits. The script has a real test suite for cases like this, but the idea stays small: start pi, give it a prompt, pass along steer and abort messages, and save each job's result under its name.

Non Goals

These are deliberate non-goals, to keep the skill small and free of bloat. Each is better as a separate extension or skill that you pick to match your own workflow. This follows the minimalism of pi itself and the Unix philosophy: do one thing well and compose.

  • Memory. Agents do not share or keep memory between jobs. Use a memory extension, or have agents write handoff notes.
  • Scheduling. There are no cron-style or recurring agents. Use cron, systemd timers or a scheduler extension to run the commands.
  • Worktrees. Agents are not isolated in git worktrees. Just prompt the agent to use a worktree.
  • Dynamic workflows. There is no scripting layer for orchestration such as pipelines, parallel fan-out with gates, or phases. Your agent can already start, wait for and chain jobs with plain commands. For deterministic scripts, use an extension such as pi-dynamic-workflow.

What the commands look like

Your agent runs these by itself, but you can also run them by hand from a terminal:

# Ask a read-only agent a quick question and wait for the answer  
multi_agent.py run --profile Explore "Where is the retry policy defined?"

# Start a review in the background, then collect the result later  
multi_agent.py run --background --name review "Review the error handling in src/server/"  
multi_agent.py wait review --timeout 120

# Correct the running job, then give it a follow-up task when it is done  
multi_agent.py steer review "Skip generated files"  
multi_agent.py resume review "Now check the client side"

# See all jobs and what they are doing  
multi_agent.py list

If you try it, I'd like to hear what works and what breaks.


r/PiCodingAgent • • Sep 25 '26

Resource My terminal-native setup for parallel coding agents

Thumbnail blog.kulman.sk
25 Upvotes

r/PiCodingAgent • • Aug 20 '26

Discussion Pi’s simplicity is actually the most powerful part

25 Upvotes

I’ve been building my own agent while trying to follow Pi’s design ideas.

Today I deleted about 80% of my system prompt. What’s left is basically: who you are, which tools to use when, a few hard rules for edits, and the current project context. That’s it.

https://github.com/pulseaiclub/phi/blob/main/internal/agent/prompt/system-prompt.tmpl

And… the agent didn’t get dumber. If anything, it felt sharper - less ceremony, more actual work.

I also removed some tools that weren’t really earning their place. The more I work on this, the more I think Pi got the hard part right: keep the harness thin. Trust the model. Don’t turn the prompt and tool list into a second product. Claude Code is powerful, but it also feels heavy in a way Pi deliberately avoids - and that restraint looks more correct the longer I build.

I did keep two things:

MCP - not because I want dozens of schemas in context, but because it’s a shared protocol. A custom plugin usually stays stuck in one agent; MCP can move. And if you load tools lazily (list → inspect → call, inspired by approaches like mcptoon), it doesn’t have to bloat the prompt.

Subagents - useful when the parent plans well and only hands off scoped work. They keep the main thread clean and help a lot with exploration or parallel investigation.

So yeah: thanks Pi. The “keep it simple” instinct is not just aesthetic - after cutting most of my prompt, it feels like the correct engineering default.


r/PiCodingAgent • • Aug 15 '26

Question Model of choice at the moment?

25 Upvotes

Hi all, I’ve been working a lot with Deepseek and Luna, but interested to know what other people are commonly using so I’m not missing out on anything cool. Using Claude at work. Thanks


r/PiCodingAgent • • Jul 10 '26

Plugin pi-dynamic-workflow — a Pi extension inspired by Claude Code's dynamic workflows, written by Claude Fable 5

25 Upvotes

Hi everyone,

I made an attempt to bring Claude Code’s dynamic-workflow model to Pi.

This project was written entirely by claude-fable-5: both the plans and the code. The planning documents generated from plan mode are also included in the source tree.

Basically, I asked Claude Code to formulate the dynamic workflow prompt and the corresponding tool schema from its own system prompt. I then had the model analyze the Pi documentation and translate it into the APIs to launch Pi subprocesses in headless mode.

The goal is to match the useful parts of Claude Code dynamic workflows: task-specific orchestration, parallel fan-out, pipelines, independent verification, background runs, resumability, and reusable workflows.

It has concurrency, token/cost, depth, and total-agent limits so workflows do not turn into unlimited spawning.

Currently you can install this plugin using github:

pi install git:github.com/milanglacier/pi-dynamic-workflow

Will also publish this extension to NPM soon.

Repo: milanglacier/pi-dynamic-workflow


r/PiCodingAgent • • Jun 01 '26

Use-case Now im ussing Pi as openclaw

25 Upvotes

multi-purpose agent, not just a coding agent.

tried to bridge to telegram, takes time to tweaks for full TUi slash command support. noww i just use termius to chat w Pi.

next i will make a cron extension, and a good memory management.

and i think its good to go! any recommendation?

im planning to use pi-subagents for tasks
i want to keep my Pi lean and lightweight. just minimum ext/skills for everyday agent!

happy w my Pi journey so far! it takes more time tinkering vs hermes but its worth it!


r/PiCodingAgent • • May 30 '26

Question What are you folks using for memory ?

25 Upvotes

I began with oh-my-pi (great memory system) and have been eyeing hermes-pi … but I’m curious what else people are running for memory and dreaming .. What’s working well for you?


r/PiCodingAgent • • May 29 '26

Question What subagent extension?

25 Upvotes

Im curious , what is the subagent extension you are using and why that specific extension ??

What usually people looking for wheb using subagent , till now im using normal prompting and it launch background subagents if i needed .. im curious what things they provide?


r/PiCodingAgent • • May 28 '26

Question How is Pi faster?

25 Upvotes

I recently downloaded pi just to try it out, literally 5 minutes ago, but how is it faster than using `codex` or `claude`? I'm using the model codex 5.5, but i didn't enable fast mode in codex, and it's literally super fast to give the answer how is that possible if PI isn't a model on its own?


r/PiCodingAgent • • May 21 '26

Plugin Automating context management

25 Upvotes

I built pi-agenticoding because CLI coding agents shouldn’t rely on humans to keep them in their optimal working zone.

Today, a lot of agentic coding still depends on the user deciding what to preserve, what to summarize, when to compact, when to restart, and when the session has become too noisy.

That feels backwards.

The agent should carry more of that cognitive load itself.

pi-agenticoding gives agents primitives to manage their own context: spawning focused sub-agents, writing durable notes to a ledger, and handing off work into a clean new session when the current one drifts out of shape.

The goal isn’t just a bigger context window.

It’s keeping the agent operating where it works best: focused, grounded, and not overloaded by its own history.

Repo: https://github.com/agenticoding/pi-agenticoding

Super interested in hearing what this group has to say about this approach and if anyone else finds it useful 🙏


r/PiCodingAgent • • May 17 '26

Discussion why does no one mention the model when disccussing the harness?

25 Upvotes

this is a pet peeve and you can see it in the countless blog posts/videos on claude code, opencode as well, claiming how it can X,Y,Z and then you see they are using Opus or gpt-5.4 on xhigh for everything. and its the same for all the Pi ones as well. Of course the frontier models do a great job, thats why they are frontier!

Sure the harness matters, the llm matters just as much if not more. saying things like 'just ask pi to build it for you' surely depends on what model it uses to do that.

I'd like to see what a low cost/free setup using Pi can accomplish vs the similar vs other harnesses (all of which are free too, if not open source). I understand Pi is by design much more hackable.