r/PiCodingAgent • • Aug 09 '26

Plugin pi-gpt-search: (ZERO GPT tokens) Use Codex's standalone search engine with ZERO GPT tokens spent, native web search for any Pi model

128 Upvotes

Hey everyone! If you have used OpenAI Codex, you know how incredibly high-quality its web search results are. Traditional search extensions or custom API-key search tools (like Google Custom Search or Brave API) often return noisy, outdated, or poorly ranked snippets that don't match the depth and quality of Codex's search engine.

Now you can use that exact same Codex search engine natively inside Pi with any model (Gemini, Claude, local models, OpenRouter) - and with ZERO GPT model inference turns or ZERO GPT tokens spent.

I built pi-gpt-search, an extension that exposes a native web_search tool to Pi by reusing Codex's standalone web retrieval backend directly.


⚑ 1-Line Install

Install via npm:

pi install npm:pi-gpt-search

Or install via GitHub:

pi install https://github.com/mateusdcc/pi-gpt-search

Or try it in a single ephemeral session without installing:

pi -e npm:pi-gpt-search

🧠 How It Works (Zero-GPT Invariant)

The extension does NOT ask GPT to search the web and summarize the answer for Gemini. Instead, it extracts and calls OpenAI Codex's standalone web search backend API directly (/codex/alpha/search) using your existing codex login authentication (~/.codex/auth.json or .env).

Pi Coding Agent
└── Gemini (or active model)
└── web_search(query: "latest Rust release")
└── OpenAI Standalone Search API (/codex/alpha/search)
└── Structured Results (Title, URL, Snippet)
└── Gemini continues reasoning & answers user

Because it hits the raw web retrieval endpoint directly: 0 GPT Tokens Billed: 0 input tokens, 0 output tokens, 0 reasoning tokens. Model Sovereign: Gemini (or your active Pi model) receives the raw search results and performs 100% of the reasoning. Query-Only Privacy: It never sends your conversation history, code, or system prompt to search.


πŸ”¬ How It Was Discovered

We reverse-engineered the endpoint by: Inspecting the Codex CLI macOS binary (0.147.0-alpha.6.5) with strings to locate search symbols (standalone_web_search, alpha/search). Probing backend parameters on https://chatgpt.com/backend-api/codex/alpha/search. Discovering the exact payload schema (commands.search_query: [{ q: query }]). Writing a network interception test suite (zero-gpt.test.ts) that asserts GPT_inference_calls == 0 during web search.


πŸ“¦ Repository & Documentation

Check out the full repository, documentation, and reverse-engineering details here: πŸ‘‰ https://github.com/mateusdcc/pi-gpt-search

πŸ“¦ https://www.npmjs.com/package/pi-gpt-search

Features:

  • README.md: Setup, credentials, and usage guide.
  • HOW-IT-WORKS.md: Full architectural breakdown.
  • HOW-IT-WAS-EXTRACT.md: Reverse-engineering technical writeup.
  • 4-Level test suite (npm test): Unit, Integration, Real Search, and Zero-GPT assertion. Feel free to check it out, test it, or open issues! Feedback and contributions welcome.

r/PiCodingAgent • • Aug 09 '26

Question Workflow for coding with pi agent

17 Upvotes

Hi everyone, I’m new to pi agent and to AI tools in general, but I’m on vacation so I finally have time to learn this stuff properly. I’d like to set up a workflow like this, let me know if it makes sense.

- I open a new tmux session for my project and start pi.
- I chat with a planner to figure out a change or a new feature.
- Once the plan is ready, I tell it to implement it, and it spawns a new pi agent in another tmux window that creates a new git branch and starts coding.
- When the coder is done, it goes back to the planner and explains clearly what it changed.
- The planner sends this to a reviewer, who checks the work.
- If the reviewer finds problems, it goes back to the planner and the loop starts again with new instructions for the coder. If everything’s fine, the planner gives me a final summary.

I’d also like a TUI with more info about what pi is doing.
Nothing should run silently in the background, everything should happen in tmux windows I can check whenever I want.
If an agent crashes or stops without returning anything, it should restart automatically, so the whole thing is semi-automatic.
The agents need to be able to search the internet, use MCPs, and have their own memory per project, not a global one.
I’d like a config file for pi, one per project, that says which MCPs to use and other settings like that.
The planner and reviewer should only be able to read the code, only the coder should be able to write to it.

Does this workflow make sense or am I overcomplicating things? Any extensions you’d recommend? Can pi actually build small personal test projects on its own, start to finish? Thanks a lot.


r/PiCodingAgent • • Aug 09 '26

Discussion Testing pi-rlm and pi-fabric on my Kaggle eval

7 Upvotes

PrimeIntellect-ai/prime-agent has been getting a lot of attention recently. Unlike a traditional coding agent that exposes tools like read, edit, and bash directly, Prime Agent gives the model a persistent IPython environment and lets it interact with tools, context, and subagents programmatically. Two Pi extensions, shift-labs-ai/pi-rlm and monotykamary/pi-fabric, explore a similar code-first tool interface, so I tested them on my Kaggle eval.

For the test, I used an eval dataset I built from NeuroGolf, a Kaggle competition I previously participated in. It starts from a solution at the private leaderboard gold-medal cutoff, and the model has to improve the existing ONNX operator implementations rather than solve a toy task from scratch. I kept the model and reasoning setup the same and compared default Pi, shift-labs-ai/pi-rlm, monotykamary/pi-fabric, and kky42/pi-flow (my own harness).

The result was pretty straightforward: neither pi-rlm nor pi-fabric beat default Pi on this eval.

My takeaway is pretty simple. Current models have probably seen a lot of traditional agent-harness trajectories during post-training, so tools like read, bash, and edit are already close to muscle memory. If we remove those familiar tools and only provide one code-based execute interface, it does not necessarily get better; in this test it actually got worse. The idea looks elegant, but the result was not very good.


r/PiCodingAgent • • Aug 09 '26

Plugin Pi Codex Fast Mode not working?

2 Upvotes

I've been trying to use Codex's fast mode inside Pi using extensions. It was previously working, but does not seem to be working right now. Does anybody have a working extension/setup to leverage Codex's fast mode that they can share?

And no, not "Tell pi to make it for you." I did that and was unsuccessful, thus why I'm turning to the community for some advice.


r/PiCodingAgent • • Aug 09 '26

Question Want QMD based search for pi-llm-wiki ?

Post image
23 Upvotes

I’ve been working on introducing QMD based search for @zosmaai/pi-llm-wiki

I want to know what you think of this idea.

Thank you for being so supportive and helping me maintain this project.

I want to take it to next level now. Better search and re-ranking of search results so that LLM get useful results.

Also wanted to introduce Zettelkasten style of taking note and using card style so that agent gets to see important cards before it wanting to deep dive into more details.

GitHub link -> https://github.com/zosmaai/pi-llm-wiki


r/PiCodingAgent • • Aug 08 '26

Question Which extensions do you use?

38 Upvotes

Hi guys,

Perhaps we can learn from each other and discover some great experiences with Pi Agent. I will start with my list of extensions and skills that I use. Please do share yours and we can learn from each other even if you have nothing to learn from us but help others.

Extensions

  • npm:@ff-labs/pi-fff
  • npm:@juicesharp/rpiv-ask-user-question
  • npm:@juicesharp/rpiv-todo
  • npm:@juicesharp/rpiv-web-tools
  • npm:context-mode
  • npm:pi-mcp-adapter
  • npm:pi-powerline-footer
  • npm:pi-rtk-optimizer
  • npm:pi-subagents

Skills

  • grill-me
  • karpathy-guidelines
  • last30days
  • caveman

And you?


r/PiCodingAgent • • Aug 09 '26

Use-case I built a tool to find bugs using small models

0 Upvotes

Hey so this is a side project I have been working on, I built a custom embedding layer and solver to help guide and ground false positives from smaller models. It seems to be working great for me, and it works actually even better with frontier models (I was able to get attributed CVEs, GHA and one small bounty from huntr) so I am sharing it https://reflection.redmirror.io/ here, let me know what you think? First month is completely free no strings attached, but do you see value in this? Or should it just be open source? Thanks!


r/PiCodingAgent • • Aug 08 '26

News @zosmaai/pi-llm-wiki v0.11.3 is out β€” a round of reliability fixes for the background engine

Post image
6 Upvotes

Our LLM wiki extension just got a solid reliability release β€” the interesting bit is the bug we found while reviewing our own toast feature.

Quick context: LLM Wiki is a pi extension that keeps a Markdown vault of everything an agent learns β€” sources, entities, concepts β€” with automatic metadata and recall injected into future sessions.

v0.11.3 has the usual stuff (MCP bootstrap for MCP-only clients, layered recall over MCP, gap-snapshot persistence fix), but the one I want to talk about is the stale session context race:

We shipped an "instant completion toast" for background actions. The code read ctx.hasUI/ctx.ui after an await inside the background task. If the user switched sessions or reloaded pi while a long lint was running, that ctx is a stale proxy β€” property access throws. The catch block then fired a false "task failed" warning and skipped the real success report entirely. Worst case of the exact thing toasts were supposed to fix.

The surrounding code already had a comment warning about this exact hazard in the sibling function β€” we just didn't mirror it. One-line fix (capture before await), plus a regression test where the ctx getters throw once work is in flight. Test fails on the old code, passes on the new. That's the kind of bug that's invisible in unit tests against fresh ctx objects and only shows up in the real session lifecycle.

Repo: https://github.com/zosmaai/pi-llm-wiki

Anyone else hit stale-context issues with extension APIs that hand you proxied context objects?


r/PiCodingAgent • • Aug 09 '26

Question Do you bother with an AGENTS.MD if you have a CLAUDE.MD

0 Upvotes

I use Pi and Claude a lot and swap between a lot. So far I have been syncing up my AGENTS and CLAUDE . Do I need to bother? Is it ok to ONLY use a CLAUDE.MD ? I know Pi supports it but is it better to continue as I am?

What happens if there is an AGENTS.MD in the folder above or above that?


r/PiCodingAgent • • Aug 08 '26

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

26 Upvotes

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

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

I've been able to make it so that:

  • I see diffs in Neovim instead of in the terminal (much prefer it this way, easier to navigate too imo)
  • Have Pi run commands in Neovim directly when I want to.
  • Have Pi be able to 'focus' in on certain sections of code (I ask 'Can you show me where that it' and it jumps straight to it)
  • I can have whole different worktrees with entirely different buffers that I switch between

r/PiCodingAgent • • Aug 08 '26

Question Extention to show local GPU usage

0 Upvotes

Does anyone know of a Pi extension that shows your current GPU usage (inside the PI app)?

Figured I would try to find an existing extension before vibing one up but so far my searching has not turned up anything.

When running Pi with local models, for some reason I just like to see what's up with the GPU usage. Would love to have a simple UI widget, or even replace the "waiting for response" message... Thanks!


r/PiCodingAgent • • Aug 08 '26

Question Footer context size is wrong

0 Upvotes

I use this model (models.json):

      { 
         "_test": "βœ”οΈReally good",
         "_speed": "35 t/s",
          "id": "Qwen3.6-28B-REAP20-A3B-Q4_K_M_barozp.gguf",
          "name": "Qwen 3.6 28B REAP20 (barozp) 64k",
          "contextWindow": 64000,
          "maxTokens": 4096,
          "reasoning": true,
          "input": [ "text", "image" ]
      },

It cleary state contextWindow 64000 (instead of 65536 but ok...).

Why the footer shows 128k? What "auto" means ?
I think that Pi use the model training context as fallback ("auto"?) when the "contextWindow" is not set... but here it is set and I think this model training context is 264 anyway.

Shown Pi footer.

↑109k ↓44k R6.5M 51.5%/128k (auto)     
(Llama.cpp) Qwen_3.6_28b_reap_20_(barozp)_64k
⚑ TPS: 30.0 tok/s​

I have this add-on/extensions:
RUN pi install https://github.com/gsanhueza/pi-token-speed
RUN pi install npm:pi-idle
RUN pi install npm:pi-voice-stt
RUN pi install npm:pi-llama-cpp-stats

I had the issue for a while (at least 2 weeks?) and I update Pi almost every day.