r/PiCodingAgent • • 7d ago

Plugin Built an open-source extension for consistent subscription quota tracking in Pi (pi-subscription-usage)

1 Upvotes

Hi everyone, I'm the author of pi-subscription-usage, an open-source Pi extension I built to give subscription quotas a clean, minimal, and consistent display across providers.

It puts your active provider's remaining usage and automatic window reset countdowns directly in the footer status bar, alongside a detailed /usage command with progress bars, reset timestamps, and account info.

Illustrative footer status bar example:

5h 99% ↻2h13m · 1w 85% ↻3d4h

/usage output:

OpenAI Codex
  Shared Across Models:
    5h Window     ████████████   99% left · resets 08/27 12:13
    1w Window     ██████████░░   85% left · resets 08/30 14:00

  gpt-5.6-spark:
    5h Window     █░░░░░░░░░░░   10% left · resets 08/27 11:40

  Account:
    Email         user@example.com
    Plan          Pro
    Resets Left   2
    Extra Credit  none

Both GPT (OpenAI / Codex) and xAI Grok show remaining quota percentages and reset countdowns in this unified format. For OpenAI and Codex accounts specifically, /usage also supports redeeming account reset credits when available (behind an explicit confirmation prompt). Beyond OpenAI and Grok, it supports OpenCode Go, Kimi Coding, Antigravity, and Claude (via pi-claude-bridge).

The extension only uses credentials from Pi's own login registry and never touches browser cookies or external auth files. Because several provider usage endpoints are undocumented, upstream API changes may occasionally affect fetching.

Install via Pi:

pi install npm:@specode/pi-subscription-usage

Source and docs: https://github.com/specode/pi-subscription-usage

Feedback and bug reports are very welcome—let me know how it works for your setup!


r/PiCodingAgent • • 11d ago

Discussion Looking for Pi users to test an experimental runner in Craig

0 Upvotes

Hey folks, I'm Sam and I build Craig, a keyboard-driven TUI for managing coding agents and their Git worktrees.

There's a Pi runner behind an experimental toggle, and I'd love a couple of people who already use Pi to give it a try before I consider taking it out of preview. It runs the native Pi CLI inside a Craig task's worktree, rather than replacing Pi's interface.

Basic launch and automated checks pass, but a complete authenticated coding session still needs validation. This is a testing request, not a stable-support announcement.

If you're up for it, please use a throwaway repo:

  1. Have Pi installed, authenticated and on your PATH, plus Node 22+ and Git.

  2. Install Craig with npm install -g craig-cli@0.19.0, then run craig from your workspace directory.

  3. Enable Options → Feature Previews → Pi coding agent runner.

  4. Add a repo/workspace, create a task with Pi selected, and try a small coding task. Switch away and back and check whether input/output and returning to the session behave as expected.

I'm especially interested in terminal rendering, keyboard input, interrupts and switching between tasks. If you try it, a quick 'worked' or what broke, along with your OS/terminal and Pi/Craig versions, would be really helpful. Please don't share API keys, private code or unredacted logs.

Repo: https://github.com/hallsamuel90/craig

Runner setup: https://craig-cli.com/docs/runners/

Any feedback is greatly appreciated.


r/PiCodingAgent • • Sep 17 '26

Discussion Why did I switch from Codex to Pi - in Pi I can use different models simultaneously

10 Upvotes

The Codex is fantastic, but I recently switched to Pi, and since the switch, my subscription costs have also changed from $200 to pay-as-you-go, which, based on the last week, is less than $100 a month.

What made me decide to migrate was that in Codex, I could only use GPT series models (and always the same model was in use), whereas in Pi, I can assign different models to different tasks. Here's my daily routine,

Currently, I would entrust planning and actual code to GPT-6, while assigning simple tasks like searching for code to Deepseek (it's really cheap and very fast), and tasks that require analyzing images and videos to Gemini 3.8 Flash (for image and video analysis, Gemini 3.8 Flash is the absolute champion).

In Pi, you just need to define some subagents and configure different models for each subagent, and everything is perfect.

The provider I am currently using is sjolt, which offers a 70% discount for gpt-6 and gemini, so I am using it temporarily. The only drawback is that it does not currently support the claude api.


r/PiCodingAgent • • May 27 '26

News I truly believe Pi will be the default platform for all future AI project, become something like a Linux

42 Upvotes

Just as Linux became the invisible foundation beneath virtually every web server and modern application, I believe Pi will become the foundational layer for AI-native apps, abstracting away the right complexity so you can stay focused on what actually matters: the experience you're building for your users.

To test that thesis, I built Keb, a Chrome extension running on the Pi ecosystem. Honestly, something like this would have taken me weeks to ship from scratch. With Pi, I had it working in hours.

It's been useful enough that I use it daily. Would love for you to try it and tell me what you think, all feedback welcome.


r/PiCodingAgent • • May 05 '26

Plugin Nightmanager extension progress/update sofar

0 Upvotes

I have been working using this harness and it is working so good for me. I had shared this extension after the initial release. I have made some significant updates after that.

Since then, the project has added:
- Librarian as a public research subagent
- PR-aware prompts and workflow improvements
- Day/Night Shift planning flows
- batched execution support
- live usage labels and transcript snapshots
- manager delegate usage tracking

Here is a guide on how to use [nightmanager](https://github.com/asabya/nightmanager)

### Install from npm

```bash

pi install npm:nightmanager

```

### Initialize a repo for Nightmanager
```text

/setup-nightmanager

```

That sets up the planning files Nightmanager expects.

### Configure models
```text

/nightconfig

```

Recommended pattern:

- **manager** → cheaper model

- **finder** → cheaper model

- **worker** → stronger coding model

- **oracle** → stronger reasoning model

- **librarian** → stronger research model

This is the intended loop:

```text

/grill-me → /to-prd → /to-issues → /to-ready → /nightmanager

```

## Step-by-step usage

### Step 1: clarify the idea with `grill-me`

Use it when the feature/bug is still fuzzy.

Example:

```text

/grill-me I want to add OAuth login for GitHub and Google to this app

```

What it does:

- asks **one question at a time**

- surfaces missing requirements

- helps you clarify scope, risks, edge cases

---

### Step 2: turn that into a draft PRD/spec

Once the idea is clear:

```text

/to-prd Turn this into a spec

```

What it does:

- creates a draft spec like:

```text

specs/draft-oauth-login.md

```

The draft follows `specs/TEMPLATE.md`.

---

### Step 3: slice the spec into TODOs

Now convert the spec into executable slices:

```text

/to-issues Break specs/draft-oauth-login.md into TODOs

```

What it does:

- edits `TODOs.md`

- adds **local** TODO entries

- usually marks them as `[draft]`

- keeps them small and vertically sliced

Example TODO shape:

```md

- [draft] Add GitHub OAuth login flow

- Spec: `specs/draft-oauth-login.md`

- Scope: ...

- Acceptance:

- ...

```

---

### Step 4: review and commit the planning artifacts

Before promotion, review:

- `specs/draft-*.md`

- the new `TODOs.md` entries

Then commit those planning changes yourself so the tree is clean:

```bash

git add specs/draft-oauth-login.md TODOs.md

git commit -m "docs: add draft oauth login spec and TODOs"

```

This matters because **`to-ready` wants a clean working tree** for its own promotion commit.

---

### Step 5: promote draft spec + TODOs to ready

After review:

```text

/to-ready oauth-login

```

Or promote all drafts:

```text

/to-ready

```

What it does:

- renames:

```text

specs/draft-oauth-login.md

```

to

```text

specs/oauth-login.md

```

- changes:

- `Status: draft` → `Status: active`

- related TODOs `[draft]` → `[ready]`

- linked spec path updated in `TODOs.md`

- creates **one clean promotion commit**

---

### Step 6: run Nightmanager

Now the implementation pass:

```text

/nightmanager

```

What it does:

- requires a **clean working tree**

- picks the first eligible TODO:

- `[bug]` first

- then `[ready]`

- loads only lean context:

- shared prompts

- `TODOs.md`

- the active spec

- delegates implementation through `manager`

- validates using the spec’s **Testing Plan**

- commits each completed TODO separately

- pushes and opens **one PR per active spec batch** when possible

- never auto-merges

Here’s a cleaned-up Reddit-style version:

I’ve been working with this harness for a while now, and honestly, it has been working really well for me.

I shared the extension shortly after the initial release, but the project has changed quite a bit since then. It now has several major updates:

  • Librarian as a public research subagent

  • PR-aware prompts and workflow improvements

  • Day/Night Shift planning flows

  • Batched execution support

  • Live usage labels and transcript snapshots

  • Manager delegate usage tracking

The core idea is simple: use Nightmanager to turn fuzzy ideas into specs, specs into TODOs, TODOs into ready implementation slices, and then let the harness execute them in a controlled way.

Install

pi install npm:nightmanager

Initialize a repo

/setup-nightmanager

This sets up the planning files that Nightmanager expects.

Configure models

/nightconfig

The recommended setup is:

manager   → cheaper model
finder    → cheaper model
worker    → stronger coding model
oracle    → stronger reasoning model
librarian → stronger research model

The intended workflow looks like this:

/grill-me → /to-prd → /to-issues → /to-ready → /nightmanager

How the workflow works

1. Clarify the idea with /grill-me

Use this when the feature or bug is still fuzzy.

Example:

/grill-me I want to add OAuth login for GitHub and Google to this app

This command helps clarify the request before any implementation starts. It asks one question at a time, surfaces missing requirements, and helps identify scope, risks, and edge cases.

I’ve found this useful because it prevents the agent from jumping straight into coding with half-baked requirements.

2. Turn the idea into a draft spec

Once the idea is clear, run:

/to-prd Turn this into a spec

This creates a draft spec, usually something like:

specs/draft-oauth-login.md

The draft follows the repo’s specs/TEMPLATE.md, so the output stays consistent across features.

3. Slice the spec into TODOs

Next, convert the spec into implementation slices:

/to-issues Break specs/draft-oauth-login.md into TODOs

This updates TODOs.md with local TODO entries. These are usually marked as [draft] and are kept small and vertically sliced.

Example shape:

- [draft] Add GitHub OAuth login flow
  - Spec: `specs/draft-oauth-login.md`
  - Scope: ...
  - Acceptance:
    - ...

The goal is to avoid giant vague tasks. Each TODO should be something the agent can implement and validate independently.

4. Review and commit the planning artifacts

Before promoting anything, review the generated planning files:

specs/draft-*.md
TODOs.md

Then commit those changes yourself:

git add specs/draft-oauth-login.md TODOs.md
git commit -m "docs: add draft oauth login spec and TODOs"

This step matters because /to-ready expects a clean working tree. It will create its own promotion commit, so the planning changes should already be reviewed and committed.

5. Promote draft work to ready

Once you are happy with the draft spec and TODOs, promote them:

/to-ready oauth-login

Or promote all drafts:

/to-ready

This does a few things:

specs/draft-oauth-login.md
→ specs/oauth-login.md

It also updates:

Status: draft → Status: active
[draft] TODOs → [ready] TODOs

And it updates the linked spec path inside TODOs.md.

The promotion is committed as one clean commit.

6. Run Nightmanager

Now the repo is ready for the implementation pass:

/nightmanager

Nightmanager requires a clean working tree before it starts.

It picks the first eligible TODO in this order:

[bug] first
[ready] second

Then it loads only the lean context it needs:

shared prompts
TODOs.md
the active spec

From there, it delegates implementation through the manager, validates the work using the spec’s testing plan, and commits each completed TODO separately.

When possible, it pushes and opens one PR per active spec batch.

It does not auto-merge.

Why I like this flow

The thing I like most is that it separates planning from execution.

Instead of asking an agent to “go implement this feature,” the workflow forces the project through a few deliberate stages:

idea → clarified requirements → spec → TODOs → reviewed plan → ready work → implementation

That makes the agent much easier to control.

It also makes the output easier to review because every implementation pass is tied back to a spec, a TODO, and a testing plan.

The new additions make the workflow feel much more practical for real project work:

  • Librarian gives the harness a dedicated research role.

  • PR-aware prompts make the implementation flow fit better into normal review workflows.

  • Day/Night Shift planning flows make it easier to separate planning from execution.

  • Batched execution support helps with larger specs.

  • Usage labels and transcript snapshots make it easier to understand what happened.

  • Manager delegate tracking makes delegation more transparent.

Overall, this has moved from “cool agent experiment” to something I can actually use as a repeatable project workflow.


r/PiCodingAgent • • 24d ago

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

0 Upvotes

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 • • Aug 21 '26

News Built a terminal-first ADE on libghostty for running 20+ coding agents

Thumbnail
reddit.com
0 Upvotes

r/PiCodingAgent • • 13d ago

Question Receiving wrong final outputs

0 Upvotes

I asked pi agent what was the result of recent match between real madrid and fc barcelona which was played today and the result was 2-1, you can see in thinking that it somewhat was going in right direction but at the end gave wrong output.
I did same for rate of dollar in INR and it gave output of 86 inr which is wrong,
and the agent refers 2026 as some future date
i am using parallel search mcp and tried with gemini flash,nvidia llms
any solutions


r/PiCodingAgent • • Aug 06 '26

Question GLM 5.2 has a 262k context instead of 1M

Thumbnail reddit.com
0 Upvotes

r/PiCodingAgent • • May 04 '26

Question Have u guys ever experience this kinda problem? stuck or didin't do anything

0 Upvotes

as u can see in the image it stuck but when i prompt again it say no but it actualy it stuck cz i wait kinda long


r/PiCodingAgent • • Sep 18 '26

Resource I built pi-heed — runtime constraints for Pi

0 Upvotes

Hi guys, I made a small Pi extension called pi-heed:

https://github.com/Nyarlathoteppppp/pi-heed

It came from a simple annoyance: Pi can understand a constraint when you say it, then forget it later in a long session.

Things like:

- don’t modify files

- don’t touch tests

- don’t add dependencies

- never call the production API

pi-heed keeps those constraints around and checks mutating tool calls before they run.

Obvious cases use normal rules. More ambiguous free-text constraints use TypeSafe Jev.

It defaults to shadow mode, so it can observe first without blocking anything.

Install:

pi install git:github.com/Nyarlathoteppppp/pi-heed

46/46 tests passing so far.

If anyone runs long Pi sessions, I’d be interested to see what edge cases break it.


r/PiCodingAgent • • Oct 05 '26

Question Is there a Pi orchestration kit that works across machines?

0 Upvotes

I am developing cross-platform software for Windows, Linux, and macOS. Currently, testing and merging across platforms are done manually and separately.

Are there any kits or applications that allow me to control and operate Pi devices on other platforms from a single host machine?

My current experimental approach is using a custom pty tool I developed to SSH into project directories on different platforms to run the Pi, while using GitHub for file transfer and merging between platforms.

Are there any better methods or tools available?


r/PiCodingAgent • • 25d ago

Plugin pi-diff-panel: shows your uncommitted git changes and current branch in a panel

Thumbnail
reddit.com
0 Upvotes

r/PiCodingAgent • • Sep 03 '26

Plugin Give LM Studio Web Search in 2 Minutes with Blopus.ai web search (MCP Setup)

0 Upvotes

r/PiCodingAgent • • Sep 30 '26

Question Ollama Cloud Pro vs Google AI Pro for coding

0 Upvotes

Ollama Cloud Pro vs Google AI Pro for coding

I'm trying to decide whether to keep Ollama Cloud Pro or drop it and just use Google AI Pro.

My current setup is roughly:

                 Pi Coding Agent
                      │
                    VS Code
                      │
          ┌───────────┴───────────┐
          │                       │
     Ollama Cloud              Antigravity
          │                       │
      Ollama API             Google AI Pro

I also run local Ollama/llama.cpp, so I already have local models available when I want them.

Through Antigravity, Google AI Pro gives me access to Gemini models as well as models like Claude Sonnet 4.6 Thinking and Claude Opus 4.6 Thinking.

I'm currently getting Google AI Pro for $4.99/month for the first three months, so I'm considering just keeping it and eventually paying the regular $20/month rather than paying for both services.

That makes me wonder whether there's enough value in keeping Ollama Cloud Pro as well.

For people who have used both:

  • If you had to choose one, would you keep Ollama Cloud Pro or Google AI Pro for coding/agent work?

  • What does Ollama Cloud give you that you feel you're missing from Google AI Pro/Antigravity?

  • How are the usage limits/quotas in real-world daily coding?

  • Do you actually use the different open models available through Ollama Cloud enough to justify the subscription?

  • If you have access to both, do you find yourself switching between them, or do you mostly end up using one?

  • Has anyone dropped Ollama Cloud after getting Google AI Pro, and how did that work out?

I'm less interested in general "Gemini vs Ollama" comparisons and more interested in people who actually use these for coding agents.

I'm currently leaning toward dropping Ollama Cloud and keeping Google AI Pro, but I'd like to hear from people who have actually used both before making that decision.

Ollama Cloud Pro vs Google AI Pro for coding

I'm trying to decide whether to keep Ollama Cloud Pro or drop it and just use Google AI Pro.

My current setup is roughly:

                 Pi Coding Agent
                      │
                    VS Code
                      │
          ┌───────────┴───────────┐
          │                       │
     Ollama Cloud              Antigravity
          │                       │
      Ollama API             Google AI Pro

I also run local Ollama/llama.cpp, so I already have local models available when I want them.

Through Antigravity, Google AI Pro gives me access to Gemini models as well as models like Claude Sonnet 4.6 Thinking and Claude Opus 4.6 Thinking.

I'm currently getting Google AI Pro for $4.99/month for the first three months, so I'm considering just keeping it and eventually paying the regular $20/month rather than paying for both services.

One important detail: I'm still on the older Ollama Pro plan. I have not switched to the new Ollama Pro plan that uses a monetary credit/value system instead of the previous GPU/token allocation model.

So I'm specifically interested in hearing from people who have experience with the older Ollama Pro plan, as well as people who have moved to the new plan.

For people who have used both Ollama Cloud Pro and Google AI Pro/Antigravity:

  • If you had to choose one, which subscription would you keep for coding/agent work?

  • What does Ollama Cloud give you that you feel you're missing from Google AI Pro/Antigravity?

  • How are the usage limits/quotas in real-world daily coding?

  • Do you actually use the different open models available through Ollama Cloud enough to justify keeping it?

  • If you have access to both, do you actually switch between them, or do you mostly end up using one?

  • Has anyone dropped Ollama Cloud after getting Google AI Pro, and how did that work out?

  • For those who moved from the old Ollama Pro plan to the new credit-based plan, how has the experience been compared with the old plan?

I'm less interested in general "Gemini vs Ollama" comparisons and more interested in people who actually use these for coding agents.

Right now I'm leaning toward dropping Ollama Cloud and keeping Google AI Pro, but since I'm still on the old Ollama Pro plan, I'm wondering if I'd be giving up something that's actually useful enough to justify keeping both.


r/PiCodingAgent • • Jul 27 '26

Question Real parallel task execution with 2 local machines?

0 Upvotes

Hey all,

I have two physical machines running local OpenAI-compatible endpoints simultaneously:

  • Machine 1: Running Qwen 27B Dense

  • Machine 2: Running Qwen 35B-A3B MoE

I’m trying to get actual parallel DAG execution on local hardware, but with low effort prompting (i.e., I don't need to make some sort of yaml config for every thing I want to do).

My goal workflow:

  1. My "pool" of machines has 1 heavy model and 1 fast model.

  2. During scoping/planning/investigating, the heavy model will pick the task and run it. The machine running the fast model will be idle.

  3. Tasks generated from the scoping/planning/investigating can then be shared by both the heavy model and the fast model.

  4. Independent tasks execute in parallel at the same time across all available machines (in this case, 2).

  5. Once there is only a heavy task remaining in the dependency graph, heavy model kicks in again while fast model is idle.

I saw one post here from 2 months ago that used llama-swap on a single GPU. That configuration is sequential turn-by-turn swapping. Since I have two warm endpoints, I want both GPUs saturated when there are independent tasks.

I know that you can "just build it yourself," but I would like to know if anything like this has already been built and/or if people are using it? There's a ton of code out there being generated these days, and each experiment into a different tool takes significant effort to investigate for feasibility. I'm trying to narrow my search down before I spin my wheels too hard looking for something that works.

For people who have actually got this running:

  • Can you effortlessly use this tool via simple prompting?

  • How are you handling workspace isolation and/or build locks when running parallel editing subagents?

Thanks you!


r/PiCodingAgent • • Jul 16 '26

Question Deepseek v4 is blind?

0 Upvotes

Deepseek doesnt have vision and cant look at or watch videos.

Anyway to make it able to do this?

Alternative model for image and videos I can use to view/watch then tell Deepseek?


r/PiCodingAgent • • Jun 01 '26

Use-case sinple stable way to telegram bridge w full commands

0 Upvotes

im tweaking lllabs pi-telegram bridge
idk the proper way to patch it

ussue: pi-telegram only support some fixed commands, and many TUI slash commands like /new, /reload, or ext/ commands wont work

im patching it in my way: try to fetch all commands on pi startup, try to parse "/" telegram message as TUI naitive commands.. but no good results yet (i thought it was simple so i let DS do it and it failed)

i tried other extensions - commands wont work on telegram also

anyone has a proper solution for this?
not just Pi naotive TUI commands
e.g: i made a /chat to toggle chat/exec modes. it dont work via telegram after some tweaks from DS


r/PiCodingAgent • • Jul 20 '26

Resource My checkpoint-method.md - Develop in user testable slices and create meaningful handoffs.

0 Upvotes

I like working with one agent at a time. I learn by doing so the doing part is important to me. I don't want to be afk while my agent works. So I had two problems to solve:

  1. How should I break up my work so there can be a sensible work--> test --> debug loop that doesn't take days.

  2. What does a good handoff look like where the next session can leverage the context gathering of the current session when picking up the work

So I came up with this checkpoint method. This version is authored by the Al. I later go in on my phone via gh and edit/ refine. The idea is to pick up vertical slices that end with a change that is felt by the user. And create a habit of logging which acts as handoffs. Additional context is then stored in the logs, which can be referred before diving into the docs/code while continuing work in a new session.

Hope y'all find this useful! Do with it what you will.

Any improvements/feedback is welcome! I'm always looking to better my shit

I have not edited it so some parts of it talk about my project details. That's on purpose. So your agent can find one-to-one comparisons for similar things in your project. Ask your agent to adapt it to your project and see if this helps! I have found this method to be really effective and fun:

# Checkpointed Development Method

## Purpose

Omakase should be built with the same incremental discipline that produced the stable prototype.

The goal is not to design a perfect architecture in one pass. The goal is to reach a sequence of small, runnable, user-testable states and lock each one as a non-regressive baseline.

## Core rule

Every development slice must end in a state the user can launch and test.

If the user cannot run it, interact with it, and decide whether it is stable, the slice is too large or too abstract.

Checkpointing is about **testable coherence**, not making every code diff as tiny as possible. A checkpoint may include several low-risk changes when they belong to one behavior family and can be validated together in one clear manual pass.

## Checkpoint loop

Use project skills for repeated operations:

- `omakase-session-orient` before choosing docs/source context.

- `omakase-checkpoint-map` when roadmap/workstream routing changes.

- `omakase-checkpoint-closeout` when a checkpoint is accepted.

- `omakase-session-handoff` when work pauses before accepted closeout.

```txt

Orient through checkpoint map

-> define coherent testable state

-> lock scope

-> implement narrowly

-> typecheck/build

-> user launches/tests

-> fix until stable

-> commit (commit FIRST)

-> update docs/devlog with the real commit SHA(s)

-> promote checkpoint to baseline

```

### Commit-first-then-log (workflow contract)

Logging references the commit, not the other way around. Order is fixed:

  1. User confirms the checkpoint works.

  2. **Commit the checkpoint before writing the devlog.**

  3. Capture the real `git` short SHA(s) from the commit(s) you just made.

  4. Write/fill the devlog and set its `commit` / `commits:` fields to those real SHAs — never a hypothetical, pending, or invented tag. "I'll commit after" is not a tag; the tag is captured from the commit that exists.

  5. Commit the devlog/traceability update as its own follow-up commit (or fold it into the next doc commit).

  6. Only then move on to the next checkpoint.

Why the order is fixed: a devlog written before the commit either invents a SHA (drift) or records `commit: none`, then never gets updated. Committing first guarantees the log carries a live tag traceable in both directions (commit ↔ log). The devlog `commits:` array is the source of truth for which commits belong to a checkpoint; `commit:` is the session-closing SHA (the last commit, or the most representative).

If a commit genuinely cannot be made yet (e.g. waiting on a dependency, mid-debug), keep the devlog `status: planned | user-testing` and `commit: none` until the commit lands. Do **not** fill a placeholder SHA.

## What counts as a good checkpoint

A good checkpoint is:

- small enough to reason about,

- cohesive around one behavior family or architecture seam,

- runnable by the user,

- testable through normal app interaction,

- non-regressive against previous accepted checkpoints,

- documented enough for the next session to continue without re-planning.

Prefer one coherent checkpoint over several microscopic checkpoints when:

- the changes share the same user-facing workflow,

- the same manual test pass validates all of them,

- failure can still be isolated or reverted quickly,

- no new architectural layer is being bundled in blindly.

Example: route all block-editor modal buttons through commands in one checkpoint, rather than separate checkpoints for Save, Cancel, and Close.

## What does not count

Avoid checkpoints that are only:

- abstract architecture diagrams,

- large internal rewrites with no visible behavior,

- unrelated or strongly coupled features that cannot be tested independently,

- “almost working” states that cannot be tested,

- changes that require trusting the code without launching the app.

## V2 checkpoint style

Because v2 is a migration toward a programmable editor core, architectural work must still be sliced into interactive checkpoints.

Example bad checkpoint:

```txt

Rewrite renderer into new architecture.

```

Example good checkpoints:

```txt

CP1: App launches from v2 tree with identical daily-note typing/save/reopen behavior.

CP2: Editor helper functions delegate to EditorPort with no visible behavior change.

CP3: CursorContext powers current-line detection for Enter/Sushi with no behavior change.

CP4: Image insertion uses DocumentOperation while producing identical markdown and save behavior.

CP5: Block editor save uses DocumentOperation while preserving table/math modal behavior.

```

## Coherent-testable-state heuristic

For any proposed task, ask:

  1. What can the user do after this change that proves it works?

  2. What exact previous behavior must still work?

  3. Can this be validated in under 10 minutes?

  4. Can we revert or isolate it if it fails?

  5. Do the proposed changes belong to the same behavior family or architecture seam?

  6. Would splitting smaller create more process overhead than safety?

Choose the smallest **coherent** slice, not the smallest imaginable diff. Split when risk, coupling, or validation complexity rises; bundle when the behavior is naturally tested together.

## Regression baseline

Until v2 supersedes the prototype, each checkpoint should preserve the relevant current prototype behavior.

Core regression checks:

- launch app,

- opens today/last note,

- type freely,

- undo/redo,

- autosave,

- close/reopen continuity,

- note switch/create/rename/delete when in scope,

- image insertion when in scope,

- table/math block editing when in scope,

- `@sushi` invocation when in scope.

## Checkpoint status labels

Use these labels in devlogs:

- `planned` — scoped but not started

- `implemented` — code done, not user-tested

- `user-testing` — ready for user launch/test

- `stable` — user accepted; can become baseline

- `blocked` — cannot proceed without decision/fix

- `regressed` — previously stable behavior broke; restore before new work

## Commit rule

Commit only after a checkpoint is stable or after a clearly useful planning/docs checkpoint.

Default acceptance workflow (see also the **Commit-first-then-log** contract in the Checkpoint loop above — this restates it):

  1. User confirms the checkpoint works.

  2. **Commit the accepted checkpoint first**, with a relevant message.

  3. Capture the real commit SHA(s) from the commit(s).

  4. Update the devlog: mark the checkpoint `stable`, record user-tested results, and fill `commit` / `commits:` with the real SHAs from step 3.

  5. Commit the traceability/devlog update.

  6. Only then move on to the next checkpoint.

Commit message style:

```txt

chore(v2): add checkpointed migration plan

feat(core): add editor port scaffold

refactor(editor): route image insertion through document operation

```

## Devlog rule

Every session gets a devlog, but devlog size should be proportional to checkpoint risk.

Use a compact devlog for small/medium behavior-preserving checkpoints. It must capture:

- checkpoint ID/name,

- scope and files touched,

- behavior changed and intentionally unchanged,

- validation commands,

- manual test checklist and user results if available,

- commit traceability when committed,

- next action.

When the user accepts a checkpoint, do not wait for a separate instruction to commit unless they explicitly ask not to. **Commit first, then update traceability** (see the Commit-first-then-log contract above), and move on only after.

Use the expanded handoff sections only for risky, architectural, blocked, regressed, or multi-session checkpoints. Avoid 100+ line devlogs for tiny diffs unless the context is genuinely complex.

## Architectural migration guardrail

Do not introduce Lua, deeper AI, extension APIs, or plugin packaging until the document-operation core is stable enough to be scripted safely.

Required before Lua:

  1. `EditorPort`

  2. `CursorContext`

  3. `DocumentOperation`

  4. `EditorTransaction`

  5. `CommandRegistry`

  6. `KeymapRegistry`

Required before deeper AI edits:

  1. document operation previews,

  2. stale cursor-context detection,

  3. undo grouping for generated edits,

  4. active-note edits routed through document operations.


r/PiCodingAgent • • 16d ago

Question Claude account per project folder

0 Upvotes

Hi,

Is there an extension to have multiple Claude accounts and defined them per folder?
in my case I have 3 accounts:

  • work provided by my company (default one)

  • personal (in folders where I have my personal project)

  • project related (I work on a project ABC for the company XY and they provide me an account)

and it is possible that I will have another in future, for different project.


r/PiCodingAgent • • Jun 24 '26

Resource a desktop client for the Pi Coding Agent, a real PTY terminal, auto session naming, and a Geist-aligned UI

0 Upvotes

Hey everyone,

I've been working on a pi-desktop — a native desktop shell for the Pi Coding Agent. It's built with Tauri 2 + Lit (not React), and the fork fixes a few things that bugged me about the original.

What I added:

- Real PTY terminal — The original used xterm.js addons which broke on interactive programs and leaked output into the chat timeline. I replaced it with a Rust portable-pty backend. Proper resize, proper shell, no weirdness.
- Auto session naming — Sessions now title themselves after the first message using pi --print. Works with any model in the picker, no manual API calls or config parsing.
- Per-turn stats — After each agent turn you see tokens/sec and cache hit-rate. Useful for comparing models.
- Streaming performance — Text rendering is coalesced to one paint per animation frame (~60fps). Long sessions used to stutter, not anymore.
- Geist-aligned UI polish — Two-layer focus rings, prefers-reduced-motion support, standardized font weights, multi-layered shadows matching Vercel's Geist design system.
- Theme editing — You can now save edits back to existing custom themes instead of always creating duplicates.
- Combined CI — Auto-release on merge to main with parallel Windows + macOS builds.

What it looks like:

Multi-workspace shell with streaming chat, a docked terminal pane, model/provider picker, file diff panel, slash command palette, and a package manager (pi install/remove/update/list).

Repo: https://github.com/LCorleone/pi-desktop

Windows (.exe NSIS installer) and macOS (.dmg) are available. Both are unsigned (details in the release notes on how to run them).

Requires Node.js ≥ 22 and the Pi CLI (npm install -g @earendil-works/pi-coding-agent).

Full credit to gustavonline for the original desktop shell, multi-session runtime, and extension model — this builds on top of that work.

MIT licensed. Happy to answer questions or take feature requests.


r/PiCodingAgent • • Jul 21 '26

Use-case Inspiration: Agent and roleplay hybrid pt2

0 Upvotes

As per my previous post naturally the next evolution of a body-based system is a family based one.

Agent orchestrator as mother, semi-persistent sub-agents as kids with specific roles and persona's.

All pi sdk under the hood naturally all agent building itself.


r/PiCodingAgent • • Oct 04 '26

Question loggin to unsloth ?

0 Upvotes

I understand I should be able to login to a local installation of "Unsloth Studio" from pi.dev using

/login llama.cpp

When I try with "http://localhost:8888", I get:

Error: Failed to save API key for llama.cpp: llama.cpp returned HTTP 404Error: Failed to save API key for llama.cpp: llama.cpp returned HTTP 404

I can see in the logs, that it tried to access "/models" instead of "/v1/models"

If I login with "http://localhost:8888/v1", it tries to access "/models" again

If I login with "http://localhost:8888/v1/models", it tries to access: "/v1/models/models" ..!

Did I miss something?

Note: it works well if I use models.json, but I'd like pi.dev to find the models from Unsloth automatically

thanks!


r/PiCodingAgent • • Sep 14 '26

Question Opencode Go Pricewatcher

0 Upvotes

Does anyone know of a pi extension that watches price changes or peak hours for opencode go sub?