A small pi extension that adds a /btw side conversation channel.
/btw opens a real pi sub-session with coding-tool access, and it runs immediately even while the main agent is still busy.

read / bash / edit / write tool access/btw:tangent for a contextless side thread that does not inherit the current main-session conversationAlt+/, Super+/, or Ctrl+Alt+W (all remappable)--savepi-btw requires Pi 0.85.1 or newer.
pi install npm:pi-btw
pi install git:github.com/dbachelder/pi-btw
Then reload pi:
/reload
pi install /absolute/path/to/pi-btw
/btw what file defines this route?
/btw how would you refactor this parser?
/btw --save summarize the last error in one sentence
/btw:new let's start a fresh thread about auth
/btw:tangent brainstorm from first principles without using the current chat context
/btw:model openai gpt-5-mini openai-responses
/btw:thinking low
/btw:inject implement the plan we just discussed
/btw:summarize turn that side thread into a short handoff
/btw:clear
/btw [--save] <question>/btw requires the TUI; pass the question inline on RPC/SDK hosts--save, also saves that single exchange as a visible session noteAlt+w toggles the overlay between the framed window layout (inset from the terminal edges) and a full-width layoutAlt+/, Super+/, or Ctrl+Alt+W toggles focus between BTW and the main editor without closing the overlaySuper+/ requires a terminal that reports the Super modifier, typically through the Kitty keyboard protocolCtrl+Alt+W remains a fallback for terminals that do not deliver either primary shortcutPI_BTW_FOCUS_KEYS environment variable to remap these when they conflict with your window manager or terminalPI_BTW_FOCUS_KEYS="ctrl+/,ctrl+alt+b"; it replaces the defaults entirelyctrl, shift, alt, and super with a single base key (letter, digit, symbol, or named key like enter/f5); blank or invalid entries are ignored, and the defaults are kept if none are usableEsc aborts the request and keeps its partial transcript visible; press Esc again to dismissEsc dismisses the overlay immediately/btw:new [question]/btw:tangent [--save] <question>/btw to /btw:tangent (or back), the previous side thread is cleared so the modes do not mix--save, also saves that single exchange as a visible session note/btw:clear/btw:inject [instructions]/btw:summarize [instructions]/btw:model [<provider> <model> <api> | clear]clear removes the override and returns BTW to inheriting the main thread model/btw:thinking [<level> | clear]clear removes the override and returns BTW to inheriting the main thread thinking level/btw:model or /btw:thinking disposes the current BTW sub-session and applies the new settings on the next BTW prompt while preserving the hidden threadBTW is implemented as an actual pi sub-session with its own in-memory session state, transcript events, and tool surface.
/btw threads seed that sub-session from the current main-session branch while filtering out BTW-visible notes from the parent context/btw:tangent starts the same BTW UI in a contextless mode with no inherited main-session conversation/btw:model and /btw:thinking/btw:summarize uses the current effective BTW model but keeps thinking off/btw:inject and /btw:summarize) read from the BTW sub-session thread rather than maintaining a separate manual transcript modelInside the BTW modal composer, slash handling is split at the BTW/session boundary:
/btw:new, /btw:tangent, /btw:clear, /btw:model, /btw:thinking, /btw:inject, and /btw:summarize stay owned by BTW because they control BTW lifecycle, configuration, or handoff behaviorprompt() path/help are handled by the sub-session instead of being rejected by a modal-only fallbackThis keeps BTW-owned lifecycle commands explicit while giving the side conversation the same slash-command surface as the underlying sub-session.
BTW exchanges are persisted in the session as hidden custom entries so they:
/btw thread or a contextless /btw:tangentIf you use --save, that one BTW exchange is also written as a visible custom message in the session transcript.
Sometimes you want to:
This package also ships a small btw skill so pi can better recognize when a side-conversation workflow is appropriate.
It helps with discoverability and guidance, but it is not required for the extension itself to work.
The extension entrypoint is:
extensions/btw.tsThe included skill is:
skills/btw/SKILL.mdTo use it without installing:
pi -e /path/to/pi-btw
MIT
TypeScript
100.0%
A small pi extension that adds a /btw side conversation channel.
/btw opens a real pi sub-session with coding-tool access, and it runs immediately even while the main agent is still busy.

read / bash / edit / write tool access/btw:tangent for a contextless side thread that does not inherit the current main-session conversationAlt+/, Super+/, or Ctrl+Alt+W (all remappable)--savepi-btw requires Pi 0.85.1 or newer.
pi install npm:pi-btw
pi install git:github.com/dbachelder/pi-btw
Then reload pi:
/reload
pi install /absolute/path/to/pi-btw
/btw what file defines this route?
/btw how would you refactor this parser?
/btw --save summarize the last error in one sentence
/btw:new let's start a fresh thread about auth
/btw:tangent brainstorm from first principles without using the current chat context
/btw:model openai gpt-5-mini openai-responses
/btw:thinking low
/btw:inject implement the plan we just discussed
/btw:summarize turn that side thread into a short handoff
/btw:clear
/btw [--save] <question>/btw requires the TUI; pass the question inline on RPC/SDK hosts--save, also saves that single exchange as a visible session noteAlt+w toggles the overlay between the framed window layout (inset from the terminal edges) and a full-width layoutAlt+/, Super+/, or Ctrl+Alt+W toggles focus between BTW and the main editor without closing the overlaySuper+/ requires a terminal that reports the Super modifier, typically through the Kitty keyboard protocolCtrl+Alt+W remains a fallback for terminals that do not deliver either primary shortcutPI_BTW_FOCUS_KEYS environment variable to remap these when they conflict with your window manager or terminalPI_BTW_FOCUS_KEYS="ctrl+/,ctrl+alt+b"; it replaces the defaults entirelyctrl, shift, alt, and super with a single base key (letter, digit, symbol, or named key like enter/f5); blank or invalid entries are ignored, and the defaults are kept if none are usableEsc aborts the request and keeps its partial transcript visible; press Esc again to dismissEsc dismisses the overlay immediately/btw:new [question]/btw:tangent [--save] <question>/btw to /btw:tangent (or back), the previous side thread is cleared so the modes do not mix--save, also saves that single exchange as a visible session note/btw:clear/btw:inject [instructions]/btw:summarize [instructions]/btw:model [<provider> <model> <api> | clear]clear removes the override and returns BTW to inheriting the main thread model/btw:thinking [<level> | clear]clear removes the override and returns BTW to inheriting the main thread thinking level/btw:model or /btw:thinking disposes the current BTW sub-session and applies the new settings on the next BTW prompt while preserving the hidden threadBTW is implemented as an actual pi sub-session with its own in-memory session state, transcript events, and tool surface.
/btw threads seed that sub-session from the current main-session branch while filtering out BTW-visible notes from the parent context/btw:tangent starts the same BTW UI in a contextless mode with no inherited main-session conversation/btw:model and /btw:thinking/btw:summarize uses the current effective BTW model but keeps thinking off/btw:inject and /btw:summarize) read from the BTW sub-session thread rather than maintaining a separate manual transcript modelInside the BTW modal composer, slash handling is split at the BTW/session boundary:
/btw:new, /btw:tangent, /btw:clear, /btw:model, /btw:thinking, /btw:inject, and /btw:summarize stay owned by BTW because they control BTW lifecycle, configuration, or handoff behaviorprompt() path/help are handled by the sub-session instead of being rejected by a modal-only fallbackThis keeps BTW-owned lifecycle commands explicit while giving the side conversation the same slash-command surface as the underlying sub-session.
BTW exchanges are persisted in the session as hidden custom entries so they:
/btw thread or a contextless /btw:tangentIf you use --save, that one BTW exchange is also written as a visible custom message in the session transcript.
Sometimes you want to:
This package also ships a small btw skill so pi can better recognize when a side-conversation workflow is appropriate.
It helps with discoverability and guidance, but it is not required for the extension itself to work.
The extension entrypoint is:
extensions/btw.tsThe included skill is:
skills/btw/SKILL.mdTo use it without installing:
pi -e /path/to/pi-btw
MIT
TypeScript
100.0%