pi-btw-cc

Claude Code-style /btw side questions for pi: a no-tools side thread in a floating overlay, persisted per session and promotable into the main conversation with one key.

Packages

Package details

extension

Install pi-btw-cc from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-btw-cc
Package
pi-btw-cc
Version
0.2.0
Published
Sep 21, 2026
Downloads
156/mo · 156/wk
Author
lune_99
License
MIT
Types
extension
Size
514.1 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "image": "https://raw.githubusercontent.com/Nouvelle-Lune/pi-btw-cc/main/docs/btw-overlay.png",
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-btw-cc

npm CI license

/btw side questions for pi: ask about the work in progress without derailing it. The answer lands in a floating overlay instead of the main conversation, and only reaches it if you promote it with f.

/btw what does the retry wrapper do on a 429?

Install

pi install npm:pi-btw-cc
pi install git:github.com/Nouvelle-Lune/pi-btw-cc   # or from GitHub

Needs Node >= 22.19 and pi 0.85.x.

Usage

Command
/btw <question> Ask a side question — opens the overlay and starts the request right away
/btw Reopen the overlay on the existing side thread (no model call)
Key
Scroll the answer
⇧← ⇧→ Browse the side thread
e Expand or fold a long side question
c Copy the selected answer
f Promote the selected exchange into the main conversation
x Delete the selected side question
Esc Enter Close

The selected exchange is the one expanded in the body and the one ⇧←/⇧→, e, c, f and x act on. The thread list under it marks the selection with , and the footer shows the position as 2/3.

A question that wraps to more than three rows is folded to its first line plus a … N more lines (e to show) marker, so it does not push the answer — or the spinner while the request runs — out of the body. e unfolds the selected question; opening the overlay again starts folded.

f adds the selected exchange to the main conversation, and the main agent answers it on its next turn:

Notes

  • A side request sees the session's conversation (compaction-aware) but has no tools: it answers from context only, in one response, and cannot read files or run commands.
  • Side questions stay in the session, so the thread continues across restarts, /reload, /resume and /tree branches.
  • Promotion only appends, so the main conversation's cached prompt prefix stays valid. While a side request is still running, f waits instead of aborting it.
  • Side requests don't share the main conversation's prompt cache, so their input tokens are billed in full.
  • On narrow terminals the key hints wrap onto more rows and the answer area shrinks to keep them visible.
  • Depending on the fold, a state change reveals what changed: a folded question keeps the top of the exchange in view, an unfolded one scrolls to the answer (or to the error) below the question. On a terminal too short to show both, the answer or status row wins over the question top.

Development

npm install
npm run typecheck
npm test
npm run docs:images   # regenerate docs/*.svg + docs/*.png (needs rsvg-convert)

License

MIT