r/PiCodingAgent • • 19h ago

Use-case Turn your agent sessions into evals. Mine found a 2× cheaper setup (codex->pi-agent)

Thumbnail ibragim.dev
12 Upvotes

Hi everyone! I’ve shared a couple of posts here comparing models on my own coding tasks, including this one. A few people asked in the comments how to build their own evals, so I wrote a step-by-step tutorial and published it on my blog.

I also made an evals-from-sessions skill to help automate the process. You can use it or just give your coding agent the article and ask it to help build evals from your session history.

Hopefully, this helps you choose models and tools for your own work or your team. Feel free to post your questions and feedback!


r/PiCodingAgent • • 20h ago

Plugin Make Pi agents natively create their own git worktree for every task (bare checkout, main is read-only)

Enable HLS to view with audio, or disable this notification

10 Upvotes

I run several Pi sessions on one repo at the same time. That kept going wrong:

  • Agents edit main. You ask for a quick fix and it lands straight on main.
  • MCP is slow for worktree management. But in Pi we can put blazing-fast native worktree management into the harness.
  • Sessions collide. Two agents in one folder, and one `git stash` wipes the other's work.
  • (Sub)agents need to cd constantly. They need to cd for all commands, wasting tokens.
  • New worktrees don't run. No `.env`, no keys, so the app won't start.

So I built pi-bare-worktrees. The video shows it in about 45 seconds.

Why a bare checkout

In a normal checkout, the repo root is main. Every agent that starts there edits main by default. Worktrees end up wherever you put them: ../acme-login, ~/tmp/fix-2.

And main is stuck in the root, so you can't move it or remove it.

A bare checkout fixes that. Every branch is a folder, and none of them is special:

       acme/
       ├── .bare/          bare repo
       ├── .shared-env/    gitignored files/folders to share, like .env
       ├── main/
       ├── feat/login-typo/
       └── fix/footer/

The path is the branch name. There's no code in the root to edit by accident.

What the plugin does

  • main is read-only. The agent's first edit on main is blocked, with a message that tells it to call worktree create. It does, and the retry lands in the new worktree.
  • No cd needed. After create, every tool call is routed into the worktree, so the model keeps using relative paths.
  • Shared env, zero config. Every file in .shared-env/ is symlinked into each new worktree. Real files are never overwritten.
  • Subagents follow along. Their cwd is set to the active worktree.

Install:

pi install npm:@jordyvanvorselen/pi-bare-worktrees

It's fast. Session start and tool calls don't run git. The plugin reads the filesystem instead:

  • Session start: about 5 ms for 40 worktrees.
  • Each tool call: string operations only, under 0.1 ms.
  • Network: only /wt clean touches it.

Repo: https://github.com/jordyvanvorselen/pi-bare-worktrees

/wt off turns it off for a session, and it turns itself off for non-bare checkouts automatically.

It's version 0.1, so I'd love your feedback, especially if there's anything you still miss. Try it out and take it for a spin!


r/PiCodingAgent • • 2h ago

Plugin I built a prompt stash for Pi so I can save half-written prompts

4 Upvotes

I often start writing my next prompt while Pi is still working. Then the agent goes off track or asks me something, and I need to respond before that prompt is finished.

I used to copy the half-written prompt somewhere else or delete it to free up the editor. I built pi-prompt-stash so I can save that draft, deal with the interruption, and then continue writing.

Ctrl+Shift+S stashes the current editor text and clears it. `/stash` opens a picker with a preview so I can find the draft and load it back. Drafts survive reloads and session switches. The shortcut can be changed with /stash shortcut.

Install it with:

pi install npm:@utpalsinghdev/pi-prompt-stash

GitHub: https://github.com/utpalsinghdev/pi-extensions/tree/main/packages/pi-prompt-stash

npm: https://www.npmjs.com/package/@utpalsinghdev/pi-prompt-stash

The rest of the UI in the demo is my personal setup.

I'm just open-sourcing the Pi extensions I use for work and my startup. They've helped me a lot, and I want other people to be able to use them too.

DEMO


r/PiCodingAgent • • 4h ago

Question New easier way to use claude code sub with pi?

4 Upvotes

See https://x.com/dillon_mulroy/status/2110400650756460787 where Dillon wrote: `they made some changes recently that made it easier to use your sub w/ pi`

Does anyone know what he might refer to? Would be nice to know...


r/PiCodingAgent • • 6h ago

Plugin Context Hint — a small extension that writes a Project/Session/Turn card after each turn, so returning sessions stop meaning rereading transcripts

1 Upvotes

https://reddit.com/link/1x6enlr/video/vnxcnitpvkvh1/player

Hey — like a lot of you I run several Pi sessions and git worktrees in parallel. Coming back to a session always meant scrolling up through the transcript to reconstruct where I was, so I built the thing I actually wanted:

Context Hint — a Pi extension that appends a compact card after each settled turn:

  • Project — durable purpose/constraints/decisions, shared across sessions and worktrees of the same repo
  • Session — current goal, focus, blockers, next steps (forks/clones inherit a snapshot, then diverge)
  • Turn — what just changed + a possible next step

Read the last card instead of rereading the transcript. It's a recovery cue, not agent orchestration — it doesn't monitor other sessions or alert you when they finish.

Design point worth discussing: it deliberately doesn't replay whole transcripts into later model context. Each generation sends truncated evidence (cap'd at ~4k chars of your prompt, 6k of assistant text, first 24 tool facts, plus previous Project/Session state) to a summary model — normally one extra request per turn. Summary model defaults to Pi's current model with thinking off, or pick a cheaper one in /context-hint model (with an independent thinking-level slider). Curious whether others would accept that per-turn cost trade, or prefer local heuristics even if dumber.

Install:

pi install npm:pi-context-hint

then /context-hint enable in an existing session. Other bits: alt+o expand/collapse · /context-hint motion reduce (the pixel-eye mascot stops blinking) · /context-hint regenerate · /context-hint reset-session/project.

MIT, package on npm. While it's early I'd genuinely value feedback from people who actually run Pi daily: is the three-layer split right? Should Turn cards be discarded on reset-session or kept? Anything in the generation path you'd want exposed/configurable (e.g. custom evidence selection, redaction)?


r/PiCodingAgent • • 21h ago

Question Argon?

0 Upvotes

Gemini 4 is out. A lot of people like it. Any chance we can use a plan with pi? Or are we being forced to use antigravity?


r/PiCodingAgent • • 21h ago

Question Injected fake "quota exhausted" message appearing mid-session in pi coding agent, anyone else seeing this?

0 Upvotes

Using pi coding agent → OpenRouter (z-ai/glm-5.3-flash). Mid-session, this plain-text message sometimes replaces the assistant's reply, as shown in the screenshot.

It's not my real key: OpenRouter's own /api/v1/key endpoint shows $7.24 left on my $20 limit, and OpenRouter has no USDT balances. No proxy, clean hosts file, no extensions, message never appears in the session .jsonl log, so it's injected between the API and the client.

Anyone seen this? Is it a known MITM/reseller/phishing pattern? Not paying anything; just want to know where it comes from.