/ extensions / README.md
README.md
  1  # Extensions
  2  
  3  | Symbol | Meaning |
  4  |--------|-------------------------|
  5  | ● | original |
  6  | ◐ | forked & modified |
  7  | ○ | republished unmodified |
  8  
  9  - ● [`grounded-compaction/`](grounded-compaction/) ([README](./grounded-compaction/README.md))
 10    - Replaces Pi's compaction summarizer with configurable model presets, user-editable prompt contracts, and deterministic files-touched tracking that covers Pi native tools, RepoPrompt, and bash-derived file operations; also augments branch summarization during `/tree` with the same files-touched grounding and optional prompt customization
 11    - Uses the shared collector from [`_shared/files-touched-core.ts`](_shared/files-touched-core.ts); see [Pi compaction docs](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/compaction.md) for background
 12    - ⚠ Hooks `session_before_compact` — incompatible with other extensions that do the same (e.g. `agentic-compaction`); having both active is a race condition
 13  
 14  - ● [`model-aware-compaction/`](model-aware-compaction/) ([README](./model-aware-compaction/README.md))
 15    - Triggers Pi's **built-in auto-compaction** at per-model percent-used thresholds (0-100), configured via `config.json` (keyed by model ID, supports `*` wildcards)
 16    - Nudges Pi's native compaction pipeline rather than calling `ctx.compact()`, preserving the compaction UI and automatic queued-message flush
 17    - Requires `compaction.enabled: true` in settings; see README for `reserveTokens` tuning
 18    - Compatible with compaction-summary extensions (e.g. `agentic-compaction` via `session_before_compact`)
 19  
 20  - ● [`session-ask/`](session-ask/) ([README](./session-ask/README.md))
 21    - `session_ask({ question, sessionPath? })` queries the current (or specified) session JSONL (including pre-compaction history) without bloating the current model context; `/session-ask ...` is a UI wrapper
 22    - `session_lineage({ ... })` returns fork ancestry (parentSession chain)
 23    - Internal `session_shell` uses a read-only just-bash virtual FS (`/conversation.json`, `/transcript.txt`, `/session.meta.json`) for precise extraction with `jq`/`rg`/`awk`/`wc`
 24    - Optional minimal fork-lineage system prompt injection via `injectForkHintSystemPrompt` (see README)
 25    - Configurable model/prompt via `config.json`, optionally pointing at an agent definition under `~/.pi/agent/agents/`
 26  
 27  - ● [`repoprompt-mcp/`](repoprompt-mcp/) ([README](./repoprompt-mcp/README.md))
 28    - Pi-compatible, token-efficient proxy for the RepoPrompt MCP server with:
 29      - Window and tab binding that prevents user/agent or agent/agent clobbering: auto-detects by `cwd`, binds to a blank existing tab or provisions a new background tab if the active tab is dirty, optional persistence and restoration per session, interactive binding resolution in case of multiple windows containing the required root, and manual selection via `/rp bind` (windows) or `/rp tab` (tabs)
 30        - Bindings are branch-safe across navigation of the session DAG via `/tree` and `/fork`ed sessions; forked sessions inherit the parent node's window, tab, and auto-selected context snapshot at fork time and diverge independently from there
 31        - On rewind or session restore, the bound tab for that session tree node is deterministically restored, or a fresh background tab is provisioned if needed
 32      - `/rp status` shows the currently bound tab name with a `[bound, in-focus]` or `[bound, out-of-focus]` label, plus selected file/token counts when available
 33      - `/rp oracle [--mode chat|plan|edit|review] ...` — send a message to RepoPrompt chat using the current selection context
 34      - Output rendering:
 35        - Syntax highlighting for code blocks and codemaps
 36        - Collapsed tool output summaries derived from request metadata for common non-mutating actions (`read_file`, `file_search`, `get_file_tree`, etc.)
 37        - Adaptive diff rendering for `git` and `apply_edits` outputs)
 38        - Token bloat prevented in the context window from outputs of `apply_edits` and `file_actions create/delete`, while their diffs are routed to Pi's `details.diff` so they are still displayed in full in the terminal
 39      - Safety guardrails: blocks deletes unless `allowDelete: true`, optional edit confirmation gate (`confirmEdits`)
 40      - Optional [Gurpartap/pi-readcache](https://github.com/Gurpartap/pi-readcache)-like caching for RepoPrompt `read_file` calls (returns unchanged markers/diffs on repeat reads to save on tokens and prevent context bloat)
 41      - Optional auto-selection (in the RP app, e.g. for use in RP Chat) of slices/files the agent has read; these selections are also branch-safe across `/tree` navigation and `/fork`ed sessions
 42  
 43  - ● [`repoprompt-cli/`](repoprompt-cli/) ⚠ **Deprecated and not supported for Pi versions >0.64.0; use [`repoprompt-mcp/`](repoprompt-mcp/) instead.**
 44    - [RepoPrompt](https://repoprompt.com/docs) bridge for Pi: `rp_bind` + `rp_exec`
 45    - `rp_exec` wraps `rp-cli -e ...` with safe defaults (quiet, fail-fast, timeout, output truncation)
 46    - Safety features: blocks unbound usage, delete-like commands (unless `allowDelete=true`), and in-place workspace switching (unless explicitly allowed)
 47    - Uses just-bash AST parsing (requires `just-bash` >= 2) for command-chain inspection (better handling of quoting/escaping/chaining edge cases)
 48    - Syntax-highlights fenced code blocks; diff blocks use `delta` when installed (honoring the user's global git/delta color config, with graceful fallback)
 49    - Persists the current RepoPrompt window/tab binding across session; bindings are also branch-safe across navigation of the session DAG via `/tree` and across `/fork`ed sessions
 50    - Optional auto-selection (in the RP app, e.g. for use in RP Chat) of slices/files the agent has read; these selections are also branch-safe across `/tree` navigation and `/fork`ed session
 51    - Edit ergonomics: detects no-op edits and fails loudly by default (set `failOnNoopEdits=false` to allow intentional no-ops)
 52    - Includes optional [Gurpartap/pi-readcache](https://github.com/Gurpartap/pi-readcache)-like caching for RepoPrompt `read_file` calls (returns unchanged markers/diffs on repeat reads to save on tokens and prevent context bloat)
 53    - Used by [Pi × RP-CLI AGENTS.md guidance](../AGENTS-rp-cli-prefix.md), [RP-CLI prompts](../skills/repoprompt-tool-guidance-refresh/rp-cli-prompts/), and this [skill](../skills/repoprompt-tool-guidance-refresh/) for keeping it all up-to-date with new RepoPrompt versions
 54  
 55  <p align="center">
 56    <img width="333" alt="repoprompt syntax highlighting example" src="https://github.com/user-attachments/assets/a416af2c-6f8e-4141-8040-abb8492eda7b" />
 57  </p>
 58  
 59  - ● [`rp-native-tools-lock/`](rp-native-tools-lock/)
 60    - Disables Pi native repo-file tools (`read`, `write`, `edit`, `ls`, `find`, `grep`) when RepoPrompt tools are available
 61    - Mode switch: `/rp-tools-lock off|auto`
 62      - `off`: no enforcement
 63      - `auto`: prefer `rp` (RepoPrompt MCP) if available; else `rp_exec` (RepoPrompt CLI); else behaves like `off`
 64    - Advanced modes (`rp-mcp`, `rp-cli`) are supported via config: [`rp-native-tools-lock/rp-native-tools-lock.json`](rp-native-tools-lock/rp-native-tools-lock.json)
 65    - Hotkey: `alt+L` toggles modes (off ↔ auto)
 66    - Footer status indicator while enforced: `RP 🔒`
 67    - Intended to complement the `/tools` extension without mutating `tools/tools.json`
 68  
 69  <p align="center">
 70    <img width="225" alt="rp native tools lock" src="https://github.com/user-attachments/assets/881cb6f1-1258-4bd6-b8f3-532381ac1ab1" />
 71  </p>
 72  
 73  - ● [`anycopy/`](anycopy/) ([README](./anycopy/README.md))
 74    - `/anycopy` mirrors all behaviors of Pi's native `/tree` while adding a live, syntax-highlighted preview of each node's content and the ability to copy any node(s) to the clipboard
 75    - `Enter` navigates to focused node (same semantics as `/tree`, including the summary chooser and `branchSummary.skipPrompt` support)
 76    - `Space` select/unselect for copy, `Shift+C` copy (selected or focused), `Shift+X` clear selection, `Shift+L` label node
 77    - `Shift+Up`/`Down` scroll preview by line, `Shift+PageUp`/`PageDown` page preview
 78    - Single-node copies use just the node's content; role prefixes are only added when copying 2+ nodes
 79    - Multi-selected nodes are auto-sorted chronologically (by tree position)
 80    - Configurable in `anycopy/config.json`: `treeFilterMode` (initial filter mode), `keys` (overlay keybindings)
 81  
 82  <p align="center">
 83    <img width="450" alt="anycopy demo" src="https://raw.githubusercontent.com/w-winter/dot314/main/assets/anycopy-demo.gif" />
 84  </p>
 85  
 86  - ● [`md.ts`](md.ts)
 87    - `/md` exports the current Pi session to a legible Markdown transcript in `~/.pi/agent/pi-sessions-extracted/`; tool calls and thinking blocks are excluded by default
 88    - `/md tc` includes tool calls (invocations + results); `/md tc -<toolname>` (e.g., `/md tc -bash -read`) excludes exact tool name(s); `/md tc +<toolname>` excludes all tool names except for the "whitelisted" exact tool name(s); filters are case-insensitive and require `tc`
 89    - `/md t` includes thinking blocks (also `think`, `thinking`)
 90    - `/md <N>` exports only the last **N turns** (a turn is `[user message → assistant message]`), e.g. `/md 2`, `/md tc t 2`
 91    - `/md all` (or `/md file`) exports the full session file instead of the current `/tree` branch; flags combine freely
 92  
 93  - ● [`fork-from-first.ts`](fork-from-first.ts)
 94    - `/fork-from-first` forks the current session from its first user message and switches into the new fork immediately
 95    - If `rewind/` is installed, it requests rewind's conversation-only fork mode ("keep current files") for that fork
 96  
 97  - ● [`move-session.ts`](move-session.ts)
 98    - `/session-move <targetCwd>` moves the *current session* to a different working directory, intended for when you started pi in one folder but come to find that you need it in another after building up valuable context
 99    - Forks the session JSONL into the target cwd bucket (`SessionManager.forkFrom(...)`), clears the fork header's `parentSession` pointer, then relaunches `pi --session <fork>` with `cwd=<targetCwd>` so the footer + built-in tools resolve relative paths against the new directory
100    - Uses `trash` to delete the old session file (best-effort); if `trash` isn't available, it leaves the old file in place
101    - Supports `~` expansion (e.g. `/session-move ~/code/my-project`)
102  
103  - ● [`roam/`](roam/) ([README](./roam/README.md))
104    - `/roam [window-name]` post-hoc moves the current live Pi session into a dedicated tmux server (`tmux -L pi`) for remote continuation (e.g. Termius over Tailscale) -- convenient if you find yourself wishing you had already started Pi inside tmux
105    - Forks the session, clears the fork header's `parentSession` pointer, starts/joins tmux session `pi`, then best-effort trashes the original session file to avoid `/resume` duplicates
106    - Writes/refreshes tmux config at `~/.config/pi-tmux/tmux.conf` with dual prefixes (`Ctrl+S` + `Ctrl+B`) and mobile-friendly defaults
107    - Optional per-user Tailscale config at `~/.pi/agent/extensions/roam/config.json` (example: [`roam/config.json.example`](./roam/config.json.example)):
108      - `tailscale.account`: run `tailscale switch <account>` before `tailscale up`
109      - `tailscale.binary`: override Tailscale CLI path (default macOS app binary)
110  
111  - ● [`command-center/`](command-center/) ([README](./command-center/README.md))
112    - Scrollable widget above the editor displaying all /commands from extensions, prompts, and skills
113    - Configure keybindings etc. via `config.json`
114  
115  <p align="center">
116    <img width="333" alt="command center demo" src="https://raw.githubusercontent.com/w-winter/dot314/main/assets/command-center-demo.gif" />
117  </p>
118  
119  - ● [`ephemeral-mode.ts`](ephemeral-mode.ts)
120    - `/ephemeral` toggles whether the current session file is deleted on exit (otherwise only possible via pre-committing `pi --no-session`), preventing throwaway sessions from cluttering `/resume`
121    - Shortcut: `alt+e`
122  
123  - ● [`model-sysprompt-appendix/`](model-sysprompt-appendix/)
124    - Appends a per-model appendix to the system prompt (exact match or default), right before the "# Project Context" section that leads into the contents of AGENTS.md.  Helpful, for example, for Claude models with confused identities (e.g. Opus 4.5, without a system prompt guiding it otherwise, assuming itself to be Sonnet 3.5 and low in capability)
125    - `/model-sysprompt-appendix reload|status`
126    - Configurations stored in [`model-sysprompt-appendix/model-sysprompt-appendix.json`](model-sysprompt-appendix/model-sysprompt-appendix.json)
127  
128  - ● [`poly-notify/`](poly-notify/)
129    - Desktop / sound / Pushover notifications (e.g. to smart watch) when an agent turn completes and exceeds a duration threshold
130    - Sound aliases include `random` (randomly picks from configured list of sounds)
131    - Volume modes: `constant` or `timeScaled`
132    - `/notify` interactive menu, plus quick toggles (`/notify on|off|popup|pushover|volume|<seconds>|<sound>`)
133    - Config file lives at `poly-notify/notify.json` (example: [`poly-notify/notify.json.example`](poly-notify/notify.json.example))
134  
135  <p align="center">
136    <img width="270" alt="notify menu" src="https://github.com/user-attachments/assets/474af589-ee3e-423d-a800-4331f2517676" />
137  </p>
138  
139  - ● [`brave-search/`](brave-search/) ([README](./brave-search/README.md))
140    - 🔄 **For general-purpose agent web search, consider [pi-web-access](https://github.com/nicobailon/pi-web-access) instead** (Gemini search, AI-synthesized overview + citations). `brave-search` remains useful when you specifically need individual search results with per-result previews
141    - Token-efficient Brave web search with optional content extraction/clipping for "read the docs / answer from sources" workflows
142    - Manual command: `/ws <query> ... [--content]` (no model turn)
143    - LLM tool: `brave_search({ query, count, country, freshness, fetchContent, format })`
144    - With `fetchContent=true` / `--content`: extracts readable markdown, saves full content to `~/.pi/agent/extensions/brave-search/.clips/`, returns a preview + a `Saved:` path
145    - Direct URL mode: if `query` is a URL (including `raw.githubusercontent.com/...`) and `fetchContent=true`, it fetches and clips directly (no search step)
146    - Optional LLM tool: `brave_grounding({ question, enableResearch, enableCitations, enableEntities, maxAnswerChars })` (requires `BRAVE_API_KEY_AI_GROUNDING`)
147    - Search results are shown to the user but filtered out of LLM context via the `context` hook
148    - **Recommendation:** For general-purpose web search with agents, I now prefer [nicobailon/pi-web-access](https://github.com/nicobailon/pi-web-access) — it uses Gemini search which provides better indexing and returns an AI-synthesized overview alongside citations, which works better for agent workflows. `brave-search` remains useful when you specifically need individual search results with per-result previews
149  
150  - ● [`protect-paths.ts`](protect-paths.ts) - standalone directory/command protection hooks that complement upstream [`@aliou/pi-guardrails`](https://github.com/aliou/pi-guardrails)
151    - 🔄 **Replaces the directory protection and brew prevention hooks from the old `guardrails/` directory.** For `.env` file protection and AST-based dangerous command gates (the other components of the old `guardrails/`), install upstream: `pi install npm:@aliou/pi-guardrails`
152    - Hard blocks: `.git/` and `node_modules/` directory access (file tools + bash command parsing), Homebrew install/upgrade commands
153    - Uses just-bash AST analysis (requires `just-bash` >= 2) to inspect nested command structures (including substitutions/functions/conditionals)
154    - Confirm gates: broad delete commands (`rm`/`rmdir`/`unlink`) and piped shell execution (`... | sh`)
155    - Allowlist for Pi's Homebrew install path in `node_modules/` (read-only)
156  
157  - ● `reverse-thinking.ts` - Adds backward (e.g. 'med' -> 'low') cycling movement through thinking levels via `shift+alt+tab`
158  
159  - ● [`iterm-tab-color.ts`](iterm-tab-color.ts)
160    - Uses iTerm2 OSC tab-color sequences to color each Pi tab's background per two configurable states (`runningColor` and `notRunningColor`, for when the agent is running or not running respectively); gracefully no-ops if another terminal emulator is used
161  
162  - ● [`inline-shell.ts`](inline-shell.ts)
163    - Expands inline `!{command}` snippets in normal messages before submit
164    - Also routes leading `!command` / `!{command}` bash-mode execution through the resolved shell, so aliases from the active shell environment can work there too
165    - Uses the current shell when supported; for zsh it prefers `~/.pi/agent/shell/pi-inline.zsh`, otherwise falls back to interactive zsh and `.zshrc`; unsupported or non-zsh cases fall back to bash
166    - Sets `PI_INLINE_SHELL=1` in the spawned shell so shell startup can skip noisy prompt/plugin setup while still loading aliases/functions
167    - Example starter file: [`../shell/pi-inline.zsh.example`](../shell/pi-inline.zsh.example)
168  
169  - ◐ [`editor-enhancements/`](editor-enhancements/) ([README](./editor-enhancements/README.md))
170    - Composite editor extension that makes multiple `setEditorComponent()`-based UX tweaks simultaneously compatible
171    - Configurable via two sibling files in the extension folder:
172      - `editor-enhancements/config.json` for editor-level behavior such as slash command remapping and `doubleEscapeCommand`
173      - `editor-enhancements/file-picker.json` for file picker behavior such as `tabCompletionMode` (default: `"bestMatch"`)
174    - Includes a merged, single-editor implementation of:
175      - ◐ `file-picker` (upstream: [laulauland/dotfiles](https://github.com/laulauland/dotfiles))
176         - type `@` to open an overlay file browser and insert `@path` refs
177         - This version adds zsh support and enables compatibility with the other two
178         - Search input now uses Pi's shared `Input` editing behavior
179         - `space` queues files or enters directories; `enter` inserts the highlighted item plus queued selections; `esc` at the root inserts queued selections only
180         - `shift+tab` (not `tab`) toggles the options panel
181         - `tab` is configurable via `editor-enhancements/file-picker.json`:
182           - `"segment"`: prefix-only candidate matching, then complete one word-part at a time
183           - `"bestMatch"`: strongest scoped fuzzy match, applied in one step
184         - In options mode, both `←/→` and `↑/↓` move between options
185      - ◐ `shell-completions` (upstream: [laulauland/dotfiles](https://github.com/laulauland/dotfiles))
186        - native shell completions in `!`/`!!` bash mode
187        - This version adds zsh support and enables compatibility with the other two
188      - ◐ `raw-paste` (upstream: [tmustier/pi-extensions](https://github.com/tmustier/pi-extensions))
189        - `/paste` arms raw paste for the next paste operation
190        - This version adds `alt+v` performing both arm + paste directly from the clipboard, preserving newlines and bypassing Pi's large-paste markers (e.g. `[paste #3 +122 lines]`)
191    - When enabled, disable the standalone `shell-completions/`, `file-picker.ts`, and `raw-paste.ts` extensions to avoid editor-component conflicts
192  
193  - ◐ [`rewind/`](rewind/) ([README](./rewind/README.md)) — **Archived.** Session-native rewrite developed in ([`b432676`](https://github.com/w-winter/dot314/commit/b43267682059a4b7c37d557b608e8413ecbd0298)) now adopted upstream into [nicobailon/pi-rewind-hook](https://github.com/nicobailon/pi-rewind-hook).  Install with `pi install npm:pi-rewind-hook`
194  
195  - ◐ [`agentic-compaction/`](agentic-compaction/) ([README](./agentic-compaction/README.md); upstream: [laulauland/dotfiles](https://github.com/laulauland/dotfiles/tree/main/shared/.pi/agent/extensions/file-based-compaction))
196    - Agentic compaction via a virtual filesystem: mounts `/conversation.json` and lets a summarizer model explore it with portable bash/zsh commands
197    - Emphasizes deterministic, tool-result-verified modified-file tracking (native + `rp`), filters likely temp artifacts, supports `/compact <note>`, and can parallelize tool calls via `toolCallConcurrency`
198    - ⚠ Hooks `session_before_compact` — incompatible with other extensions that do the same (e.g. `grounded-compaction`); having both active is a race condition
199  
200  - ◐ [`files-touched.ts`](files-touched.ts) (upstream: [badlogic/pi-mono `.pi/extensions/files.ts`](https://github.com/badlogic/pi-mono/blob/main/.pi/extensions/files.ts))
201    - `/files-touched` shows files read/written/edited in the active session branch and opens the selected file in VS Code
202    - This version extends the upstream original to also detect file reads/edits/writes performed through the tools of `repoprompt-mcp` and `repoprompt-cli` (`rp`, `rp_exec`) and their `read_file` / `file_actions create` / `apply_edits` actions
203    - It also normalizes relative, root-prefixed, and absolute spellings of the same file before rendering, and carries touched paths through tracked file moves
204    - Shared core ([`_shared/files-touched-core.ts`](_shared/files-touched-core.ts)) also tracks bash-level file operations: `sed -i` (edit), `cp`/`rsync` (write destination), `tee`/`touch` (write), `patch` (edit), `curl -o`/`wget -O` (write), and shell output redirections (`>`, `>>`)
205  
206  - ◐ [`branch-out/`](branch-out/) ([README](branch-out/README.md)) (upstream: [davidgasquez/dotfiles](https://github.com/davidgasquez/dotfiles/blob/main/agents/pi/extensions/branch-term.ts))
207    - `/branch [--model <query>] [message]` forks the current session into a new terminal split pane or tab; backend-aware routing across cmux, tmux, iTerm2, Terminal.app, and Ghostty; split direction is config-driven (`left/right/up/down`, or `clockwise`/`counterclockwise` layout policies for cmux/tmux) with comma-separated fallback lists for cross-backend configs; optional `--model` targets a different model in the child; optional `message` prefills the child editor with a 10-second auto-submit countdown
208  
209  - ◐ [`handover/`](handover/) ([README](./handover/README.md))
210    - `/handover [optional purpose]` generates a rich handover / rehydration message, forks from the first user message, and prefills the child editor with the final draft plus an appended files-touched block
211    - Borrows heavily from [pasky/pi-amplike](https://github.com/pasky/pi-amplike) and [damianpdr/pi-handoff](https://github.com/damianpdr/pi-handoff) (both inspired by Amp's /handoff feature), and [mitsuhiko's handoff prompt](https://github.com/mitsuhiko/agent-stuff/blob/main/commands/handoff.md)
212    - Unique to this `handover`:
213      - Draft is generated by the current session agent/model (via `pi.sendUserMessage(...)`) rather than a direct `complete()` call
214      - Forks the session from its first message, creating parent-child lineage that helps with future discovery and tools like `session_lineage` and `session_ask`
215      - Robust correlation: waits for a quiescent session + uses a per-run nonce to extract the correct assistant reply
216      - Uses a more opinionated continuation prompt separating verified status, decisions, surprises, rejected paths, facts vs inferences, mandatory reading, and next steps, with guardrails against exhaustive file-list restatements
217      - Adds prior compaction summaries from the current session JSONL when they exist
218      - Gives the drafting model a deterministic files-touched list derived from [`_shared/files-touched-core.ts`](_shared/files-touched-core.ts) (which covers Pi native tools, RepoPrompt tools, and bash-level file operations) and appends that same list to the child draft
219      - If [`rewind/`](rewind/) is installed, requests a conversation-only fork
220    - Optional auto-submit countdown (typing or `Esc` cancels; `Enter` submits normally)
221    - Plays well with [`session-ask/`](session-ask/) because the preserved fork lineage lets `session_ask` consult parent sessions when needed
222  
223  - ◐ [`extension-stats.ts`](extension-stats.ts)
224    - `/extension-stats` shows rolling 7/30/60/90-day usage metrics from session logs, grouped by extension and tool
225    - Use ↑/↓ to page, press `m` to toggle whether the metric is based on count of tool calls or on tokens attributed to tool calls
226    - Adapted from `session-breakdown.ts` of [mitsuhiko/agent-stuff](https://github.com/mitsuhiko/agent-stuff)
227  
228  <p align="center">
229    <img width="720" alt="extension stats widget" src="https://github.com/user-attachments/assets/b1a2b8eb-0880-44f5-8ae2-2b8aa8221318" />
230  </p>
231  
232  - ◐ [`plan-mode.ts`](plan-mode.ts) (upstream: [pi-mono examples](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent/examples/extensions))
233    - `/plan` (and `ctrl+alt+p`) toggles a read-only sandbox
234    - No todo extraction or step execution prompting (planning stays on the user)
235    - Removes Pi-native write tools from the active Pi tool list, blocks destructive shell commands, and blocks RepoPrompt write operations while leaving other available tools alone
236    - Adds just-bash AST-backed bash command inspection (requires `just-bash` >= 2; regex fallback if parse fails)
237      - Covers `rp_exec`, `rp-cli -e ...`, and `rp` (repoprompt-mcp)
238  
239  - ◐ [`oracle.ts`](oracle.ts) (upstream: [hjanuschka/shitty-extensions](https://github.com/hjanuschka/shitty-extensions/tree/main))
240    - `/oracle` queries an alternate model for a second opinion, with optional file inclusion (`-f`) and injection into the current conversation
241    - This version adds a thinking-level picker and fixes text-overflow crashes (CJK-safe wrapping)
242  
243  - ◐ [`session-switch/`](session-switch/) (upstream: [pi-thread-switcher](https://github.com/damianpdr/pi-thread-switcher))
244    - Session switching via `/switch-session`, or the same picker after interactive startup via `pi --switch-session`, with a live preview of the highlighted session below the picker
245    - `pi --switch-session` is an extension-driven relaunch workaround, not native pre-start `--resume`, so it does not provide native missing-cwd recovery or the normal in-process session-switch lifecycle / shutdown-hook cleanup semantics
246    - `Shift+Up`/`Down` scroll preview by line, `Shift+PageUp`/`PageDown` page preview
247    - Mirrors the native `/resume` picker's layout, behaviors, and keybindings
248  
249  <p align="center">
250    <img width="450" alt="/switch-session demo" src="https://raw.githubusercontent.com/w-winter/dot314/main/assets/switch-session-demo.gif" />
251  </p>
252  
253  - ◐ [`tools/`](tools/) (upstream: [pi-mono examples](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent/examples/extensions))
254    - `/tools` interactive enable/disable UI
255    - This version persists tool enablement globally ([`tools/tools.json`](tools/tools.json)) and per-session via session entries
256  
257  - ◐ [`usage-bar.ts`](usage-bar.ts) (upstream: [hjanuschka/shitty-extensions](https://github.com/hjanuschka/shitty-extensions/tree/main))
258    - `/usage` quota overlay for multiple providers, with provider status polling and reset countdowns
259    - This version:
260      - Supports multiple Codex accounts with automatic workspace deduplication
261      - Displays used percentage with 5-band color scale (0-49% green → 95%+ red) and proper label alignment
262      - Provider status emoji hidden on fetch errors to avoid misleading indicators
263      - Adds `alt+u` shortcut
264  
265  - ◐ [`sandbox/`](sandbox/) - OS-level sandboxing using `@anthropic-ai/sandbox-runtime` with per-project config (upstream: [pi-mono examples](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent/examples/extensions))
266    - Configured in [`sandbox/sandbox.json`](sandbox/sandbox.json)
267    - This version:
268      - Sandboxes LLM `bash` calls via `tool_call` input mutation instead of re-registering `bash`, so it can coexist with renderer-only `bash` overrides such as [`MasuRii/pi-tool-display`](https://github.com/MasuRii/pi-tool-display)
269      - Has a more minimalist statusline indicator
270      - Allows toggling on/off via `/sandbox on` / `/sandbox off`, or `/sandbox` -> menu selection, or the keybinding `alt+S`
271  
272  - ◐ [`cmux/`](cmux/) (upstream: [HazAT/pi-config](https://github.com/HazAT/pi-config/blob/main/extensions/cmux/index.ts))
273    - cmux integration — pushes Pi agent state (model, thinking level, tokens, cost, tool activity) into the cmux sidebar; fire-and-forget, no-op when `CMUX_SOCKET_PATH` is unset
274    - This version adds workspace auto-renaming: on `session_start` and `agent_end`, syncs the cmux workspace name to the Pi session name using `CMUX_WORKSPACE_ID` so concurrent cmux workspaces do not cross-rename (only when the workspace has exactly 1 pane and 1 surface)
275  
276  - ○ [`interactive-shell.ts`](interactive-shell.ts) (upstream: [pi-mono examples](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent/examples/extensions))
277  - ○ [`preset.ts`](preset.ts) (upstream: [pi-mono examples](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent/examples/extensions))
278  - ○ [`status-line.ts`](status-line.ts) (upstream: [pi-mono examples](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent/examples/extensions))
279  - ○ [`titlebar-spinner.ts`](titlebar-spinner.ts) (upstream: [pi-mono examples](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent/examples/extensions))
280  - ○ [`skill-palette/`](skill-palette/) (upstream: [nicobailon/pi-skill-palette](https://github.com/nicobailon/pi-skill-palette))
281  - ○ [`pi-prompt-template-model/`](pi-prompt-template-model/) (upstream: [nicobailon/pi-prompt-template-model](https://github.com/nicobailon/pi-prompt-template-model))
282  - ○ [`code-actions/`](code-actions/) (upstream: [tmustier/pi-extensions](https://github.com/tmustier/pi-extensions))
283    - `/code` to pick code blocks or inline code from recent assistant messages, then copy or insert
284    - `run` now executes snippets in a just-bash OverlayFs sandbox by default on non-Windows (copy-on-write over cwd), with optional fallback to real shell when sandbox commands are unsupported
285    - Type to search; enter to copy, right arrow to insert in the command line
286  - ○ `todos.ts` (upstream: [mitsuhiko/agent-stuff](https://github.com/mitsuhiko/agent-stuff))