r/PiCodingAgent • • 19h ago

Question How do you track which files a pi session changed, including edits made through bash?

0 Upvotes

I want to keep track of the files my pi session changes, and look them up at any point during the session. One session often touches 3 or 4 repos, so `git status` in pi's working dir doesn't give me that list.

I thought this would be easy: hook into `edit` and collect the changed files. But some models edit files through bash or python instead. In https://github.com/earendil-works/pi/issues/11876 a maintainer replied that this is model behaviour and pi can't do much about it. So how do you keep track of the files a session changed when some of the edits never go through `edit`?

What I have so far

I wrote a small extension that hooks `tool_result` for the `edit` and `write` tools:

- For each file, it runs `git rev-parse --show-toplevel` and records the file and its repo root in a JSON file for that session.

- It skips files that aren't in a git repo.

- A picker reads that list and opens a diff review for the repo I choose.

This works well for anything the model changes through `edit` or `write`.

The gap

The extension never sees changes the model makes through bash, such as `sed -i`, `perl -i`, or a `python3 - <<EOF` heredoc.

What I've looked at

- https://pi.dev/packages/pi-workspace-history It snapshots the workspace with git, so it does catch bash edits. But it tracks a single workspace, it's off in the home dir by default, and it skips nested repos, so it doesn't fit my setup.

- Running `git status` after every bash call in the repos the session already knows about. This catches bash edits in those repos, but it's expensive: one `git status` per known repo after every bash call. It also can't find a repo the session didn't already know about, so a repo the model only ever touched through bash is still missed.

- Blocking `sed -i` and similar commands in a permission-gate extension, with a message telling the model to use `edit`. That enforces the rule, but sometimes a bash edit is the right call, for example a rename across many files.

Has anyone found a reliable way to catch the files a model writes through bash?


r/PiCodingAgent • • 15h ago

Plugin pi-faster: fast-mode for all providers (GCP/Vertex, OpenAI, Anthropic)

0 Upvotes

many of the /fast mode extensions are open-ai specific in Pi
but if you use GCP from Vertex API that has /fast mode too and Anthropic has fast mode for Opus as well.

if you are mixing and matching models in subagents and want /fast to work across all models, here is an extension for you: `pi install npm:pi-faster` it will do it for all models. (if any future provider drops any new format, I'll add that too).

You can configure it to fall back to slow mode when hitting limits (429), or just stop when fast is not available. Up to you.


r/PiCodingAgent • • 11h ago

Plugin Pi Veto: Auto Mode (Safe + Autonomous) for Pi so it stops running everything unchecked

5 Upvotes

Pi runs every tool call without asking, which is great right up until an agent decides to git reset --hard, poke around ~/.ssh, or sneak something weird into a script it just wrote. On the other hand, approving every command by hand makes you stop reading and just mash Enter.

I forked Deepu K Sasidharan's pi-automode-classifier and kept building on it until it turned into Pi Veto: https://github.com/killianmiles27/pi-veto

The main idea is two guarded modes plus YOLO (Alt+M cycles them):

  • Safe mode lets normal project work run (npm test, cargo check, local edits, reads) and only pops a prompt when something stays unclear.
  • Autonomous mode never prompts at all. Anything the guard won't clear gets blocked, logged to /veto blocked, and handed back to the agent so it keeps working and tells you at the end. If you say "yeah go ahead and run that" in chat, the next attempt gets re-checked with your words.

Out of the box it uses deterministic Bash/PowerShell rules plus your session's own model, so you don't have to set up anything extra. If you want it faster and smarter, you can wire up a local CPU classifier (LANCET, ~7-15 ms) and/or a context decider (Jev 1.14 on OpenRouter, or a local loopback llama.cpp /v1/systemone server).

Two parts that actually made it hold up in practice:

  1. It statically reads scripts, imports, and test-runner targets (npm test, build.rs, etc.) before running them, and scans dangerous writes when they're written.
  2. The context model only sees your messages, the command, and the measured effects. It never sees tool output or file contents, so a prompt injection sitting in a repo file can't talk it into approving anything.

Quick note on limits: this is a tool-call guard, not a sandbox. It doesn't isolate processes, doesn't touch ! commands you type yourself, and won't catch malicious code that was already committed to a repo before you opened it. For untrusted repos, still use a container.

Install (Node 22.18+, Git for Windows if you're on Windows):

pi install git:github.com/killianmiles27/pi-veto#v0.7.0

We ran two red-team rounds against it (round 1 got 110/142 through, round 2 still got 43/100 before fixes, 0/223 after), so I'm under no illusion that it's airtight. If you try it and find a command that either nags on normal work or slips past when it shouldn't, drop it here and I'll add it as a test case. (or in github)


r/PiCodingAgent • • 22h ago

Question Would you use an open-source, independent multi-agent review tool?

Thumbnail reddit.com
0 Upvotes

r/PiCodingAgent • • 8h ago

Resource pi-freehand: a pi extension implementing Microsoft's Freehand harness

Thumbnail
github.com
45 Upvotes

I've been reading Microsoft Research's Freehand paper. The idea is to give a frontier model one bash tool, a tiny prompt, and a cost meter, and get out of its way. They report that this beats harnesses with long prompts and lots of tools, on both score and cost. pi is already pretty lean and is my go-to harness, so I built out Freehand as an extension: pi --freehand gives the model only bash and a ~135-word prompt (by default), and adds a cost/token meter line after every turn showing context, cache share, cost and budget.

One thing I left out on purpose is Freehand's transcript editing. Edits that hit context break the prompt cache, and I'm not convinced they pay for themselves in pi, particularly for interactive sessions. Of course, pi has plugins for context management, anyway. I

I've also found subagents pretty useful, not just for parallel work, but also to help frontier models protect their own contexts. My little addition to Freehand's premise is sub-agent accounting. In Freehand, the model gets help by running pi -p from the shell. pi-freehand passes the mode and the remaining budget down to those child runs. Each child reports its usage back up through stdout, so the parent's meter and your /session totals include everything, at any depth. You can also set a hard dollar budget or a max depth. Not bulletproof, but....

Microsoft is clear to point out that Freehand only provides improvements with high-end frontier models, so use pi-freehand only with frontier models, and keep in mind that it runs everything through bash and has no built-in guardrails besides the model itself.

pi install npm:@seandavi/pi-freehand

Repo: https://github.com/seandavi/pi-freehand

(There's also an unrelated unscoped pi-freehand by u/xiyanzhou that does include transcript editing but not subagent accounting. Both use --freehand, so pick one.)


r/PiCodingAgent • • 15h ago

Resource PiChamber v1.1: Pi extensions now draw native UI in the workspace

60 Upvotes

Hi everyone. PiChamber is an open-source workspace for Pi Coding Agent. Same Pi session on desktop, browser, or phone. Your extensions, skills, providers, and credentials stay on your machine. It started as a community fork of OpenChamber and was rewritten around the Pi SDK.

Earlier post if you want the original pitch: https://www.reddit.com/r/PiCodingAgent/comments/1whrhm5/pichamber_same_pi_session_on_desktop_browser_and/

v1.1 is out. The main change is the extension surface.

Pi extensions already work in PiChamber. Tools, commands, hooks, skills, and the normal ctx.ui dialogs all run the same way they do in the CLI. Nothing is required from you for that.

On top of that, an extension can now ask PiChamber to draw extra UI. A few lines that check for globalThis.pichamber and call it. Cards in the chat, forms, composer controls, live panels on the rail, custom tool views. The same extension still works in the plain Pi CLI. The extra drawing only happens inside PiChamber.

Everything is an extension. PiChamber adds no new context, no extra system prompt, nothing that changes what the agent sees. It's the same Pi you already run.

Docs: https://github.com/RyderAsKing/PiChamber/blob/main/packages/docs/content/docs/extensions.mdx

There's also a package browser in settings that lists Pi packages from npm, including ones marked as enhanced for PiChamber. You can turn extensions on and off, update, or remove them without editing config files. Changes apply to the Pi CLI too.

Other things that shipped since the last post: native git PR and issues integration, sandboxed projects, themes and wallpapers, better mobile stability, reverse proxy and Docker pairing, shell mode, threads view, and more. Full list is on the roadmap: https://pichamber.ryder.pro/roadmap

Repo: https://github.com/RyderAsKing/PiChamber

Site: https://pichamber.ryder.pro

Still Pi-only. Still the same session across desktop, browser, and phone. Still not trying to be every agent UI.

If you have extensions that could use a better surface in the workspace, try the API and tell me what breaks or what is missing. Feedback and beta testing welcome. Discord is https://discord.gg/MQgt2YMtw6 if you want to drop by.


r/PiCodingAgent • • 2h ago

Question Good way to queue up multiple tasks overnight?

9 Upvotes

Can you guys recommend a way to queue up tasks overnight?

My current workflow is something like this:

- human created feature document, using AI to brainstorm and check for gaps and conflicts

- ask the AI to split feature doc into implementation specs. These specs have some special format like gated phases etc.

- do review passes on the specs with subagents

- implementation of the spec doc with sub agents

This has worked pretty well for me. But I have to baby sit it. After specs are written, the context is too full to start implementation. Let alone start writing a new spec after implementation.

I need a kind of “meta” agent that can spawn sub agents (spec writer) which then spawn sub-sub agents (reviewers) and then the implementers and then do the whole thing again.

Does anyone do a workflow like mine? How did you solve these problems? Thank you!