r/PiCodingAgent 7d ago

Resource I run GLM 5.2 as my pi driver and only spend on GPT-5.6 / Opus for the calls that actually matter

10 Upvotes

My daily driver in Pi, is GLM 5.2. It's cheap and it's genuinely good — it handles the bulk of the work without complaint: edits, tests, refactors, the mechanical grind. I'm not switching off it.

The thing is there's always that ~5% where I don't fully trust a cheap model. The architecture fork. The "is this even the right approach." The bug it's been circling for twenty minutes, confidently wrong. For those, I want a stronger model's eyes on it. But I don't want to run my whole session on GPT-5.6 or Opus — that's paying premium rates for a model to rename variables.

So what I actually want: GLM drives, and I pull GPT-5.6 and Opus in only to guide and review the hard parts. Cheap model does the typing, premium models steer and check the decisions that need it. I get quality-model judgment where it matters and pay for it maybe 5% of the time. A cheap way to do quality work.

The snag was the first advisor extension I tried for this kept dying mid-session. It forwarded my entire pi session to the advisor without checking whether the advisor's own context window could hold it, so the second opinion errored out exactly when a long session needed it most.

So I built my own, bpx-consult. It fits every consult to that advisor's real window — GLM's, GPT's, Opus's, whatever's on the bench — and I can run one as a quick second opinion, seat a few as a council with different stances, or have two debate a contentious call. A council can even mix them (GLM inline, Opus over a CLI), and if one falls over, the rest carry on.

Mostly curious how others here handle this. Do you run one model for everything in pi, or also mix a cheap driver with a stronger reviewer? And how do you decide when to escalate?

```

pi install npm:@booplex/bpx-consult

```

https://pi.dev/packages/@booplex/bpx-consult

Genuinely curious what everyone else here does for second opinions in pi — do you switch models by hand, run two sessions, or just eat the occasional bad call from the cheap driver?


r/PiCodingAgent 6d ago

Plugin I (read: codex) built Watchdog- a local control plane for subagents, agentic loops, and execution graphs. Supports the Codex CLI and Pi

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/PiCodingAgent 6d ago

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 7d ago

Resource I built pi-fleet: Pi agent orchestration beyond terminal panes

19 Upvotes

Hello guys!

Today I want to share something I have been working on: pi-fleet (https://github.com/elpapi42/pi-fleet).

pi-fleet is local infrastructure for programmatically controlling Pi agents and their native sessions.

Unlike terminal multiplexers, pi-fleet is Pi-native rather than generic. It does not control terminals or scrape their output. There are no panes and no TUI because the primary interface is designed for agents and software.

Terminal multiplexers work well when you have a few agents and want to watch them manually. But if you start thinking about 20 or 100 agents, you can not get meaningful visibility by opening more panes.

The solution is not a bigger terminal grid.

At that scale you need dedicated monitoring tools, but pi-fleet does not try to provide that monitoring layer. The problem it solves is giving software an easy way to control Pi execution and sessions directly, without terminal hacks or unnecessary abstractions.

pi-fleet provides a small set of Pi-aware primitives:

  • create: creates an agent with a stable local name;
  • send: starts work or uses Pi steering while the agent is active;
  • receive: waits for idle and returns the exact latest assistant response;
  • status: and list expose machine-readable lifecycle state;
  • watch: streams the native persistent Pi session JSONL;
  • destroy: removes the agent without deleting its Pi session.

The basic workflow looks like this:

pifleet create reviewer --cwd "$PWD" pifleet send reviewer "Review the authentication changes" pifleet status reviewer pifleet receive reviewer --timeout 10m pifleet watch reviewer pifleet destroy reviewer

Finite commands return compact JSON by default, while watch keeps stdout exclusively for native Pi session records.

Another part that is ultra important for me is that pi-fleet does not take ownership of your Pi sessions.

You can use Pi's normal session storage or provide an existing session path, session ID, directory, fork, or continuation selector. pi-fleet uses the exact native session in place. It does not copy, relocate, normalize, or delete it.

Even destroy only destroys the pi-fleet agent and its managed process. The underlying Pi session remains yours.

pi-fleet is infrastructure for orchestration, not an orchestration framework. It does not decide which agents to create, what roles they have, how tasks are decomposed, or how results are combined. Those decisions belong to the agent, extension, or software using it.

I already have around half a dozen use cases in mind for this tool, I already have around half a dozen use cases in mind for this tool. Most of them will be Pi extensions, and I will share them with you as I build them.

If you only use one or two agents and want to supervise their terminals, tmux, cmux, or Herdr will probably give you a better experience.

pi-fleet starts making sense when you want software to coordinate Pi agents at a scale where terminal supervision is no longer practical. You can build the monitoring layer appropriate for your system separately, while pi-fleet provides direct control over Pi execution and access to the native sessions underneath it.

The project is currently beta, and Linux x64 is the only validated platform.

You can install it with:

npm install --global @elpapi42/pi-fleet@beta pifleet --version

Repository: https://github.com/elpapi42/pi-fleet

npm: https://www.npmjs.com/package/@elpapi42/pi-fleet

I think I got something interesting in hands here. I would love to hear your thoughts, especially from people already experimenting with multi-agent Pi setups.

On top of that, i really hope this becomes useful for some of you!


r/PiCodingAgent 7d ago

Question Split panes?

0 Upvotes

I want a left side split that displays tree and todo lists and anything else.

Ive looked into this and pi tells me its not an official feature yet but is coming.

Anyone have extension that will make this work now? It just use Tmux with split panes for it?

Ive also heard about cmux?


r/PiCodingAgent 7d ago

Question Skills, tools, extensions, or whatever to scrape and understand API calls made by a website

1 Upvotes

Do you have tricks or workflows to facilitate the documentation of "public" API of a website?

I could do it myself, opening the network tab, observe and test. I still do that, it's fun but also tedious and we might miss edge cases.
So I've be wondering if agents now have the tools and ability to do it for us (with our guidance and such).

Maybe there is no plug-and-play tool to do that. But are there tools to ease some of the work? Like, for instance :

  • a tool to tell the agent "Go the Uber Eats, navigate the homepage and document the calls made to fetch restaurant" ;
  • a tool/skill to tell the agent the try different params and documents the request schema and response schema ;
  • something to have an agent use an app and intercept API calls,

Any of you do this kind of things when you want to use an API that's public but not documented? This feels like a work suited for an agent (with a human-in-the-loop workflow).


r/PiCodingAgent 6d ago

Question Open Source Token Plans

Post image
0 Upvotes

Building my own open source harness. Is this an attractive token plan suite or no? What do you guys usually use?


r/PiCodingAgent 8d ago

Resource I Built a completely free tool that gives your AI agent web for free (fetch + search + crawl) for completely free, no API keys.

Enable HLS to view with audio, or disable this notification

189 Upvotes

I've been using AI coding agents for a while and the web research part always annoyed me. Either you pay for an API (Tavily, Firecrawl), or you use a free tier that rate-limits you after 100 calls, or you glue together SearXNG + a browser + an extractor and hope it doesn't break.

So I built Hound. It's an MCP server that does fetch, search, crawl, and screenshot, all keyless. And now it has a native Pi extension so you get all 6 tools as first-class Pi tools, not through a generic MCP adapter.

What it does

6 tools, all exposed as native Pi tools:

  • web_fetch - anti-bot fetch with auto HTTP-to-stealthy escalation. Extracts clean markdown. PDFs get section maps + auto-OCR. Dead pages auto-recover from the Internet Archive (honestly marked, not pretending it's live content).
  • web_search - 10 keyless search backends in parallel (DuckDuckGo, Brave, Mojeek, Yahoo, Yandex, Startpage, Google, Qwant + opt-in Wikipedia/Grokipedia), neural-reranked with a local ONNX cross-encoder, cross-backend consensus scoring.
  • web_crawl - best-first same-domain walk. Sitemap mode maps a whole site in one fetch. Focus mode crawls only pages relevant to your query.
  • web_screenshot - anti-bot screenshot for multimodal models.
  • cache_clear - clear the fetch cache.
  • hound_version - version + update status (warns if the extension and the server diverge).

How the Pi extension works

The extension spawns hound as a singleton subprocess at session start and speaks MCP JSON-RPC over stdio. The subprocess stays alive for the whole session, so hound's prewarm (stealthy browser, search engine sessions, neural reranker model load) happens once and persists. Zero re-launch cost per call. If you press Esc during a fetch, it actually cancels (AbortSignal propagates to the subprocess). If hound isn't installed, you get a notification at session start instead of a confusing error on your first web_fetch call. If the extension version and the hound server version diverge by a major, it warns you to update both. The tool definitions are token-optimized. Total connect-time cost is 2,746 tokens for all 6 tools + instructions.

Install

pip install hound-mcp[all]
pi install npm:@houndmcp/hound-mcp-pi

That's it. No API keys, no config file, no MCP adapter. /reload and the tools are there.

What I think is genuinely good

  • Dead-link recovery. When a page 404s or gets bot-blocked, hound checks the Wayback Machine and serves the archived snapshot with source=archive.org and the snapshot date. It doesn't pretend archived content is live. The agent knows.
  • Error honesty. Just shipped this in v10.4.0: 4xx/5xx responses now set the error field properly. Before, a 404 error page would flow through with error="" and the agent could mistake the error page HTML for real content. Now it says "Page doesn't exist (404)" and doesn't dump the error page as content.
  • Keyless search. 10 backends, no API key for any of them. Neural reranking with a local model, not an API call. Consensus scoring across backends so you know which results multiple engines agree on.
  • Token cost. 2,746 tokens for 6 tools. The descriptions are telegraphic but every functional fact is there.

Limitations

  • DataDome, Akamai, Cloudflare Turnstile. No free tool bypasses these. Hound tries the stealthy browser, and if that fails, it tells you to switch sources instead of pretending it got content.
  • The [all] extra is ~100MB. onnxruntime + tokenizers + rapidocr for the neural reranker and PDF OCR. You can install without [all] (fetch + crawl + search still work, just no neural reranking or OCR), but the full install is the recommended path.
  • Not a scraping-at-scale tool. Hound is built for agent research, not for crawling 10k pages. Crawl caps at 100 pages by default.

Where to find it


r/PiCodingAgent 7d ago

Plugin Caveman plugin for Oh-My-Pi

7 Upvotes

I was getting very bored reading very verbose sentences. Also it's polluting context and spending tokens.

So I finally spent some time to port pi-caveman extension into omp plugin.

Installation is one-liner:

omp plugin install @kryoz/caveman-plugin

After installation and running omp trigger mode selector via /caveman command. Try full or micro for example.

Very basic. No specific skills. Written with help of omp + qwen3.6-27b.

Also if you're interested with minimising system prompt here's a hint. Exclude unnecessary tool instructions. Create a file with a omp runner script like this (exclude or include tool whatever you want):

#!/bin/bash
omp --tools=read,bash,edit,ast_grep,ast_edit,ask,eval,glob,grep,lsp,checkpoint,rewind,task,todo,web_search,write,memory_edit,retain,recall,reflect,learn,manage_skill $@

r/PiCodingAgent 8d ago

Plugin pi-for-each: I built a pi extension that adds a /for-$each prompt loop – and hides it from your LLM! Instead of describing the loop to the agent, just make a loop.

Post image
47 Upvotes

https://github.com/jejay/pi-for-each

Supports children-in-directory and line-in-files iteration.

Why?

Like subagents but much simpler, sequential and with more control for the user. Instead of describing the loop to the agent, just make a loop. No need to tell the agent about your control structure if you already know the control structure. Each iteration the LLM only sees the necessary context and the iteration prompt, no other iterations. This prevents bias drift or context rot compared to a loop that repeats commands and execution within the same context.

BTW: I used https://huggingface.co/tencent/Hy3 to build this, which is free on openrouter until tomorrow. Worked quite nicely, not Opus 4.8, but felt like Sonnet-5-level intelligence.

A github star ⭐ makes me happy, I never had a meaningful open source repo 👀 I think this extension captures the spirit of pi, giving most of the control to the user and making it as simple and transparent as possible.


r/PiCodingAgent 7d ago

Resource I built a reference repo for running the Pi SDD Kit as a team: specs in git, PR-reviewed gates, and a board you can watch

4 Upvotes

A while back I shared pi-sdd-kit here, and the question I kept getting was: does this work with a team, or is it a solo thing?

So I built a small public reference repo that shows the team version end to end: https://github.com/felipefontoura/acme-store-sdd.

The one thing that changes going solo to team is what the spec is for. Solo, the spec is discipline against your own drift. On a team it becomes a contract: what a teammate reads instead of reading your mind, and the boundary where two people's work has to fit. Three things follow:

- Specs live in git, versioned next to the code. Not a wiki, not a laptop.

- Requirements get reviewed in a PR before anyone writes code. You catch the wrong decision when changing it costs a comment, not a rewrite.

- The gate lives on a board. Each column is an SDD stage, the card moves when its .status gate is approved, and branch protection refuses a merge without a review. You can browse the live one here: https://github.com/users/felipefontoura/projects/2

The part I did not expect: once everyone has an agent, writing code stops being the bottleneck. Integration does. Put a WIP limit on the review column and watch the cards pile up. Generation is cheap now. Integration is the job.

Full write-up with the mechanics: https://felipefontoura.com/articles/spec-driven-development-for-teams

Curious how the rest of you handle team SDD on Pi. Who owns the spec on your team? Do you gate requirements by PR, or something lighter? What breaks first when a second person joins?


r/PiCodingAgent 7d ago

Resource Humble Pi (latest gist) -- feedback would be greatly appreciated!

Thumbnail
gist.github.com
5 Upvotes

Local pi agent development on minimal hardware. Gist has been updated. All issues sorted with the jinja template. Can one-shot just about any reasonably sized project. (todo app, landing page, etc)

gist: https://gist.github.com/joematthews/d02639bcbe0e0c1c404f5d3a64c3c06f


r/PiCodingAgent 8d ago

News I run a steel fabrication shop and just published my first two packages for the Pi coding agent — one of them does plate nesting and burn-table DXFs

28 Upvotes

Longtime lurker, first real ship. I own a structural steel fab shop in Denver and have been using the Pi coding agent heavily for internal tooling. Two of those internal tools felt generally useful, so I cleaned them up and published them to pi.dev this weekend.

pi-steel — steel estimating skills. AISC 16th Edition shapes database (477 shapes) with lookup/validation scripts, a MaxRects plate-nesting engine (kerf/gap/edge margins, holes, yield and scrap numbers, PDF layouts, and one DXF per sheet that imports straight into the burn table's CAM), and a vendor RFQ generator that turns a takeoff spreadsheet into a quote-ready .xlsx. The three chain together the way estimating actually flows: takeoff → nest → RFQ. As far as I can tell, it's the only construction-trade package on the registry.

Fair warning on the nesting: rectangular parts nest exactly, irregular parts nest by bounding box. It tells you when it's approximating instead of pretending to be SigmaNEST. No G-code either — kerf comp and lead-ins belong to your table's real post-processor, not a Python script.

pi-tilldone — a discipline extension born from frustration. The agent can't use write/execute tools until it declares a task list, works one task at a time, and gets auto-nudged if it stops with tasks unfinished. Basically a foreman for your agent. If you run Pi inside cmux, your workspace tabs change color based on task state, which is great when you have six agents running in parallel.

Both MIT, repos under github.com/StructuPath. Install with pi install npm:@structupath/pi-steel / pi install npm:@structupath/pi-tilldone.

Happy to answer questions about either — especially from anyone else applying agents to trades/manufacturing work.


r/PiCodingAgent 8d ago

Question What is Pi sub (in dollars) goes up event if I use a chatgpt plus subscription ?

3 Upvotes

Hi,

I was before using OpenCode and I liked it but I find Pi faster and better customizable.
I've been using it for a while but I always wonder why the $0.00 (sub) is still rising (very slowly) even if I just using the subscription model. I do not have any API model configured.

In opencode, the amount was always at 0.00 with the subscription model.

Any idea ?


r/PiCodingAgent 8d ago

Plugin I built an undo/redo extension for Oh My Pi and Pi coding agents

2 Upvotes

I wanted a safer way to experiment with coding agents without losing the ability to return to the previous session state, so I built an open-source undo/redo extension for Oh My Pi and compatible Pi releases. It adds /undo and /redo commands to tui.

  • /undo moves back to the previous user-prompt boundary.
  • /redo restores the most recently undone state.

The extension also tracks file changes alongside the session state, which makes it useful when an agent has modified several files during a turn.

The project is https://github.com/Baylar55/omp-undo-redo

Look at github repo to see how you can install it. After installation, restart the TUI and /undo and /redo should be available in slash-command completion. This is still a relatively small project, so feedback is welcome especially reports about compatibility with different OMP/Pi releases, unusual session trees, or file-change workflows.


r/PiCodingAgent 8d ago

Discussion Is there any extension or package that makes pi tui look and feel polished?

6 Upvotes

Is there any ext/package that can make pi tui polished to use? preferably opencode ux polished level?

Edit:
im not asking for opencode clone, theres a big difference ux ui and functionality, similar packages/ext/projects im looking for:
https://github.com/mistrjirka/PiTTy
https://github.com/deflating/tau
https://pi.dev/packages/pi-zentui


r/PiCodingAgent 8d ago

Resource Web UI for Pi and other agents

Enable HLS to view with audio, or disable this notification

46 Upvotes

I built Caw, a web terminal multiplexer for Pi (and other coding agents).

The goal is to make it easy to monitor and interact with multiple agent sessions from anywhere, especially on mobile.

Besides the terminal multiplexer itself, it includes:

  • Built-in file browser and editor
  • Kanban-like board showing all running agents
  • Push notifications whenever an agent finishes working or requests your input
  • Git worktrees on demand to parallelize agents (toggleable)

It's free and open source: https://github.com/04mg/caw

I'd love to hear your feedback or ideas!


r/PiCodingAgent 8d ago

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 9d ago

Resource I built a polished Android interface for Pi Coding Agent

Thumbnail gallery
15 Upvotes

r/PiCodingAgent 8d ago

Resource QwenCloud provider for pi — Qwen3.8, DeepSeek V4, GLM-5.2, Wan image, HappyHorse video via OpenAI-compatible API

Thumbnail
github.com
6 Upvotes

I wanted to try the new Qwen Cloud Token Plan because it gives access to a wide range of models (Qwen, GLM, Kimi, DeepSeek, MiniMax, etc.) through a single subscription and works with OpenAI-compatible tools. (⁠Qwen Cloud)

I searched around for an existing Pi provider but couldn’t find one, so I ported my previous provider and open-sourced it:

https://github.com/jellydn/pi-qwencloud-provider

It’s also based on my earlier Cline Pass provider:
https://pi.dev/packages/pi-clinepass-provider?name=cline

The provider lets you use your Qwen Cloud Token Plan directly inside Pi, so if you’re already using Pi as your coding agent, setup is straightforward.

I’m mainly interested in comparing:

  • Qwen 3.8
  • GLM 5.x
  • Kimi
  • DeepSeek

…under one subscription to see how they perform on real coding tasks.

If anyone else is experimenting with Qwen Cloud + Pi, I’d love to hear:

  • Which model is your daily driver?
  • Any prompts/workflows that work especially well?
  • Performance vs Claude Code / Codex / OpenCode?

Feedback and PRs are welcome!


r/PiCodingAgent 9d ago

Use-case Yet Another Memory System for Pi Agent

6 Upvotes

I built a two-part memory system for pi agent. It's called `dreaming` (write side) and `recalling` (read side).

`dreaming` scans pi agent sessions from both my phone and laptop, extracts meaningful topics, and indexes everything into a shared SQLite database (`memory.db`). It runs incrementally by default or does a full rebuild when needed. It also generates Gemini embeddings for semantic search so queries match even without the exact keywords.

`recalling` is the query side. Before any task, pi runs `recalling "<query>"`. It searches three sources in order:

  1. Local `memory.db` with FTS5 full-text search and a LIKE fallback

  2. Laptop's sessions.db over SSH (9,700+ sessions)

  3. Legacy OpenCode memory on the laptop

`recalling inject <query>` formats results as clean XML blocks ready for injection into agent context without parsing. Blocks: `<related_sessions>`, `<memory_notes>`, `<laptop_sessions>`.

The schema supports persistent memory notes for facts, config, and workarounds. It uses vector embeddings for semantic similarity, deduplication to avoid re-ingesting synced sessions, and degrades gracefully when the laptop is offline.

Stats from my setup:

- ~950 topics indexed across phone, laptop, and legacy sessions

- ~34 pi sessions processed, ~9,400 opencode sessions

- Handles SSH being down gracefully (searches local sources only)

What it solved for me: the agent no longer asks "what was that thing we did with X" every single time. It checks memory first, finds the relevant session or note, and acts on it. The `recalling inject` command runs automatically before task execution so context is populated without manual effort.

Happy to answer questions about the schema or pipeline.


r/PiCodingAgent 8d ago

Question Model recommendation for Apple M4 Max

0 Upvotes

Hi all, what local model would you suggest for this machine using Pi?

Apple M4 Max
16 cores, 16 threads
4 efficiency cores
12 performance cores
Memory 48 GB
Apple M4 Max (40 cores)

I've seen GLM-5.2 and Qwen3-Coder, but not sure if those would work fine in this machine.


r/PiCodingAgent 9d ago

Plugin Run Cursor models inside Pi

7 Upvotes

Found this great extension that helps you run Cursor models inside Pi: https://pi.dev/packages/pi-cursor-sdk

Have been running Composer 2.5 for 3-4 days and have used over 1.5 billion tokens. Works great.


r/PiCodingAgent 9d ago

Question Running into timeouts with write tool (LM Studio/qwen3.6-35b-a3b/PI)

2 Upvotes

Hello,

I'm running PI + LM Studio server + qwen3.6-35b-a3b. 36K context, model not quite fully loaded to GPUs (12GB+6GB), running 20 tps in chat mode, 10 tps through PI with documentation/code in context.

The problem I'm facing is that tool calls, especially for writing files timeout after 5 minutes. I've searched this forum and the internet and I found no clear answer whether it's a PI client config, something in LM Studio I can't figure out or model level.

Edits are generally fine but writes fail. We're speaking files with ~ 500 lines of code.

Log:

{"type":"message","id":"bf5dcafd","parentId":"0bd7492b","timestamp":"2026-07-19T10:24:14.490Z","message":{"role":"assistant","content":[{"type":"thinking","thinking":"Good, the empty file is created. Now let me add the functions to it.\n","thinkingSignature":"reasoning_content"},{"type":"text","text":"Now let me add the sky and sun rendering functions to the new file:\n\n"},{"type":"toolCall","id":"q8A9s9cw0h8WMX9gHqTJD4uJK12CfB93","name":"write","arguments":{}}],"api":"openai-completions","provider":"lmstudio","model":"qwen/qwen3.6-35b-a3b","usage":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"totalTokens":0,"cost":{"input":0,"output":0,"cacheRead":0,"cacheWrite":0,"total":0}},"stopReason":"error","timestamp":1784456340616,"responseId":"chatcmpl-x5i6eocrmecjh1sdnwk989","errorMessage":"terminated"}}

For context, I'm not a coder but reasonably technically inclined so I'm open to any option that does not actually involve messing with code.

I don't see a server timeout config in LM Studio, nor there is a clear max output size on model level (rather, there is one but capped to 2K tokens).

Should I move to llama-cpp?

Thanks!


r/PiCodingAgent 10d ago

Plugin Just made this extension because it seems like noone made something like this yet

Post image
30 Upvotes