A pi extension package for integrating pi with cmux.
- Shows cmux status while pi is working:
Workingwhen a turn/tool startsReadywhen an agent turn completes
- Sends a cmux notification when pi finishes a task.
- Clears cmux status/progress/log state on session start and shutdown.
- Adds commands for forking the current pi session into a new cmux tab:
/fork-cmux/cmux-fork
From GitHub:
pi install git:github.com/amknight/pi-cmuxFor local development:
pi install /path/to/pi-cmuxThen reload pi:
/reload
Open an interactive picker of the current pi session tree and choose a human message or text agent reply to fork from. Tool messages and tool-only assistant turns are intentionally hidden in the picker.
The extension creates a new session JSONL file, opens a new cmux terminal tab, and runs:
cd <current-cwd> && pi --session <new-session-file>Fork from the current leaf without opening the picker.
Alias for current, falling back to the last visible human/agent message if needed.
Fork from a specific human/agent message by exact id or unique id prefix.
Alias for /fork-cmux.
- The fork picker shows only human messages and assistant replies with real text. It does not display tool-result messages or assistant turns that only contain tool calls.
- Selecting a user message matches
/treesemantics: the new session starts before that message and restores the selected prompt into the editor in the new cmux tab. - Selecting an assistant message creates the new session through that assistant reply, ready to continue from there.
- The extension is safe to load outside cmux: status hooks silently no-op if
cmuxis unavailable. Fork commands requirecmuxto be installed and reachable.
npm install
npm run check
pi --no-extensions -e ./extensions/cmux.ts --list-modelsMIT