@siddr/pi-cmux-status
cmux sidebar status extension for pi
Package details
Install @siddr/pi-cmux-status from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@siddr/pi-cmux-status- Package
@siddr/pi-cmux-status- Version
0.1.3- Published
- Apr 24, 2026
- Downloads
- 367/mo · 158/wk
- Author
- siddr
- License
- MIT
- Types
- extension
- Size
- 68.7 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
cmux-status extension
Sets cmux sidebar status entries for pi when running inside cmux (CMUX_WORKSPACE_ID is set).
Keys:
- all sessions:
pi-cmux-status:<owner>
<owner> is derived from the current cmux surface and panel ids, so each pi instance manages its own deterministic sidebar entry. If cmux does not expose an owner id for the current process, the extension does nothing.
The status text is:
π <name>: <status>for named sessionsπ - <status>for unnamed sessions
Status values:
ReadyWorkingWaitingError
Behavior:
Readywhen idleWorkingwhile the agent is running, with an animated textual spinner prefixWaitingwhile another extension emitspi:waiting-for-user-inputwith{ waiting: true }, with a dedicated icon and a one-shot waiting notificationErrorafter a tool finishes with an error, until the next session or new agent run, with a dedicated icon- named and unnamed sessions both show
Readyagain once the session returns to idle
Multiple pi instances in the same cmux workspace do not share a sidebar key anymore: each instance writes to its own surface/panel-specific key and clears only that key on disable/shutdown.
This extension does not render any TUI widget or footer content, and it does not use the cmux progress bar.
Install
pi install npm:@siddr/pi-cmux-status
Or symlink it locally into ~/.pi/agent/extensions/cmux-status and run /reload.
Usage
The extension manages the session-specific cmux sidebar status entry through the cmux socket API by default.
- Sidebar status updates use the socket first and fall back to the
cmuxCLI if the socket is unavailable or rejects the request. - Waiting notifications also use the socket first, with the same CLI fallback behavior.
- The socket address defaults to
/tmp/cmux.sockand can be overridden withCMUX_SOCKET_PATH. Remotecmux sshsessions may expose this as a relay address like127.0.0.1:<port>. - cmux socket access is also affected by cmux's access mode settings, including
CMUX_SOCKET_MODE.
Notes:
Readyuses acheckmarkicon.Waitinguses anhourglassicon.Erroruses anexclamationmark.triangle.fillicon.Workingdoes not use a cmux icon; it animates with the same braille-style textual spinner frames pi uses, such as⠋.
For Waiting, cooperating extensions can emit the shared inter-extension event:
pi.events.emit("pi:waiting-for-user-input", {
source: "my-extension",
id: "some-stable-id",
waiting: true,
});
pi.events.emit("pi:waiting-for-user-input", {
source: "my-extension",
id: "some-stable-id",
waiting: false,
});
Toggle the behavior with /custom-cmux-status.
Tests
bun test cmux-status/tests/utils.test.ts
bun test cmux-status/tests/cmux.test.ts
bun test cmux-status/tests/index.test.ts