A Pi extension that routes Pi's Claude model requests through the official Claude Code CLI so you can use a Claude Pro or Max subscription.
dbachelder/pi-btw
A pi extension that adds a /btw side-conversation channel, running a parallel sub-session with coding-tool access while the main agent keeps working.
- Stars
- 218
- Forks
- 60
- Open issues
- 0
- Last commit
- 3 days ago
What is it?
pi-btw is an extension for the pi coding agent that adds a /btw command for side conversations. You can ask a question while the main agent is still running a task, and the answer comes from a separate pi sub-session that has read, bash, edit and write tool access.
The side thread persists across the session, and its exchanges are stored as hidden state so they stay out of the main agent's context. Users can switch between a contextual thread, a contextless tangent (/btw:tangent) and a read-only mode (/btw:ask) that only exposes read, grep, find and ls. BTW-only model and thinking overrides are supported, and the thread can be injected back into the main agent or summarized first with /btw:inject and /btw:summarize.
The overlay has its own composer and transcript, and focus can move between BTW and the main editor with configurable shortcuts. Optional extension tools such as web search can be enabled per user or project through a btw.json config file, and an SSH workspace mode is available.
Key features
- 01Runs a side conversation in a separate pi sub-session without interrupting the main agent.
- 02Offers read-only, contextless, and contextual thread modes via /btw:ask, /btw:tangent, and /btw.
- 03Keeps BTW exchanges out of the main agent's future context while persisting them across reloads.
- 04Lets you inject the full thread or a summary back into the main agent.
- 05Supports BTW-only model and thinking overrides.
- 06Allows opt-in extension tools and an SSH workspace mode through a config file.
Use cases
- Asking a clarifying question about the codebase while the main agent is mid-task.
- Brainstorming an approach separately, then injecting the conclusion into the main session.
- Running a read-only review of recent changes without risking edits.
- Saving a single useful exchange as a visible session note.
Quick start
- 1
Install the extension from npm with pi
pi install npm:pi-btw - 2
Reload pi inside the app to load the extension
/reload - 3
Ask a side question with the /btw command
/btw what file defines this route?
Things to know
- Requires the pi coding agent; it is a pi extension and does not run on its own.
- Supports only Pi 0.85.1 through 1.x.
- Extensions enabled for BTW are trusted code and are not sandboxed.
- The Super+/ focus shortcut needs a terminal that supports the Kitty keyboard protocol.
In collections
Topics
FAQ
- What is pi-btw?
- A pi extension that adds a /btw side-conversation channel, running a parallel sub-session with coding-tool access while the main agent keeps working. pi-btw is an extension for the pi coding agent that adds a /btw command for side conversations. You can ask a question while the main agent is still running a task, and the answer comes from a separate pi sub-session that has read, bash, edit and write tool access.
- Is pi-btw free to use? What license does it have?
- pi-btw is open source under the MIT license. Check the license terms before using it in commercial products.
- Is pi-btw still maintained?
- Actively maintained. The last commit to pi-btw was on Nov 3, 2026.
- What can I use pi-btw for?
- Asking a clarifying question about the codebase while the main agent is mid-task. Brainstorming an approach separately, then injecting the conclusion into the main session. Running a read-only review of recent changes without risking edits. Saving a single useful exchange as a visible session note.
- How do I install pi-btw?
- Install the extension from npm with pi: pi install npm:pi-btw Reload pi inside the app to load the extension: /reload Ask a side question with the /btw command: /btw what file defines this route?
- Where can I get pi-btw?
- The source code and installation instructions are on GitHub: https://github.com/dbachelder/pi-btw
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Durable, named agents for the Pi coding agent that run delegated tasks in the background, can be messaged, and survive restarts.
A workspace where AI coding agents from different machines and tools share threads, files, and a browser in one place.
A local-first, evidence-first AI coding terminal that connects LLMs to real project files, tools, permissions, verification and context.
A local-LLM-first agentic coding assistant that runs against vLLM, sglang, ollama or llamacpp backends with a browser UI.
Open source AI coding agent that runs in VS Code, JetBrains IDEs, or the terminal, with access to 500+ models.