A visibility layer for Claude Code on Windows — see what your AI agent does in real-time
This is a fork of amirlehmam/wmux with workspace-scoped Pi session syncing, resumable terminal restore, improved sidebar organization, and browser/link workflow refinements.
Built on Electron + xterm.js. Originally forked from cmux.
- Workspace-scoped Pi sessions — each wmux workspace uses its own Pi session bucket, with sync from matching outside-wmux project threads.
- Resumable terminal restore — restores running terminal commands after restart, with Pi-aware resume behavior.
- Sidebar organization — folders, archive flow, workspace reordering, shell-aware tab labels, and better metadata handling.
- Browser/link workflow — normal click opens in the wmux browser, Ctrl+Click opens the default system browser.
- Focus + scrolling fixes — better pane/workspace focus restore and improved terminal scrolling stability when switching workspaces.
- Scriptable -- Named pipe server (
\\.\pipe\wmux) with a JSON-RPC API. Create workspaces, split panes, send keystrokes, read terminal content, control the browser via CDP, and spawn sub-agent terminals programmatically. - Windows native -- ConPTY for proper terminal emulation, Windows toast notifications, taskbar flash on alerts, native title bar overlay.
- Windows Terminal + Ghostty compatible -- Import your themes, fonts, and colors from Windows Terminal
settings.jsonor~/.config/ghostty/config. Ships with 450+ bundled Ghostty themes. - GPU-accelerated -- xterm.js with WebGL rendering for smooth terminal output at any speed.
Download wmux-0.4.0-win-x64.zip from GitHub Releases, extract anywhere, and run wmux.exe. No installer, no code signing, no admin required.
git clone https://github.com/amirlehmam/wmux.git
cd wmux
npm install
npm run build:main
npm run devI run a lot of Claude Code sessions in parallel. On macOS there is cmux, and it is exactly what I needed -- vertical tabs with live metadata, notification rings when agents need attention, a scriptable browser, and a socket API for automation. But I work on Windows, and nothing like it existed.
Windows Terminal has tabs but no notification system. You have to manually check each tab to see if an agent finished or is waiting for input. tmux works in WSL but loses all Windows integration. Electron terminals exist but none focus on the AI agent workflow.
So I built wmux — a visibility layer for AI coding agents. It doesn't replace Claude Code or change how it works. It passively observes and shows you what's happening. A CDP proxy on localhost:9222 lets Claude Code's native browser tools control the wmux browser panel — you watch every page load, click, and form fill in real-time. Auto-configured hooks in settings.json report tool usage and agent activity to the sidebar. When a command finishes or is interrupted, the sidebar dot changes color and you get a notification.
The sidebar shows exactly what each agent is doing -- the git branch it is on, the PR it opened, the ports it is listening on, how many sub-agents it spawned, and whether it needs your attention. When an agent finishes a task or hits a question, the pane gets a blue notification ring, the sidebar badge increments, and a Windows toast fires.
Shell integration scripts inject themselves into PowerShell, CMD, and WSL sessions. They report CWD changes, git branch switches, shell state, and PR status back to the sidebar via a named pipe in real time.
On first launch, wmux auto-configures itself as an observer: it injects a minimal informational block into ~/.claude/CLAUDE.md (so Claude Code knows the user can see its browser activity), adds a PostToolUse hook to ~/.claude/settings.json (for agent/tool visibility in the sidebar), and starts a CDP proxy on localhost:9222 (so chrome-devtools-mcp controls the wmux browser panel natively). No API keys needed — everything runs through the user's existing Claude Code session. Claude Code's behavior is unchanged.
Everything is automatable through the wmux CLI or the named pipe directly. The protocol matches cmux, so tools built for one work with the other.
wmux automatically injects integration scripts into your shells:
- PowerShell -- Overrides the
promptfunction. Reports CWD, git branch, dirty state, and shell state (working/done/interrupted) viaNamedPipeClientStream. Preexec hook via PSReadLine detects when commands start. Background job pollsgh pr viewevery 45 seconds. - CMD -- Embeds OSC 9 escape sequences in the
PROMPTvariable for CWD reporting. Git branch detected via filesystem watcher on.git/HEAD. - WSL (Bash/Zsh) --
PROMPT_COMMAND/precmd+preexechooks. Detects interrupts via exit code 130. Communicates via temp file bridge.
Environment variables available in all shells:
| Variable | Description |
|---|---|
WMUX |
Always 1 inside wmux |
WMUX_CLI |
Path to the wmux CLI script (use with node "$WMUX_CLI") |
WMUX_SURFACE_ID |
Current surface ID |
WMUX_PIPE |
Named pipe path (\\.\pipe\wmux) |
All shortcuts are rebindable via Settings (Ctrl+,).
| Shortcut | Action |
|---|---|
| Ctrl+N | New workspace |
| Ctrl+1-8 | Jump to workspace 1-8 |
| Ctrl+9 | Jump to last workspace |
| Ctrl+PageDown | Next workspace |
| Ctrl+PageUp | Previous workspace |
| Ctrl+Shift+W | Close workspace |
| Ctrl+Shift+R | Rename workspace |
| Ctrl+B | Toggle sidebar |
| Shortcut | Action |
|---|---|
| Ctrl+T | New surface |
| Ctrl+Shift+] | Next surface |
| Ctrl+Shift+[ | Previous surface |
| Alt+1-8 | Jump to surface 1-8 |
| Ctrl+W | Close surface |
| Shortcut | Action |
|---|---|
| Ctrl+D | Split right |
| Ctrl+Shift+D | Split down |
| Ctrl+Alt+Arrow | Focus pane directionally |
| Ctrl+Shift+Enter | Toggle pane zoom |
| Ctrl+Shift+H | Flash focused panel |
| Shortcut | Action |
|---|---|
| Ctrl+Shift+I | Toggle browser panel |
| Ctrl+Alt+I | Toggle Developer Tools |
| Ctrl+Alt+C | Show JavaScript Console |
| Shortcut | Action |
|---|---|
| Ctrl+Alt+N | Toggle notification panel |
| Ctrl+Shift+U | Jump to latest unread |
| Ctrl+Shift+H | Flash focused pane |
| Shortcut | Action |
|---|---|
| Ctrl+F | Find |
| Enter / Shift+Enter | Find next / previous |
| Escape | Close find bar |
| Shortcut | Action |
|---|---|
| Ctrl+Shift+C | Copy |
| Ctrl+Shift+V | Paste |
| Ctrl+V | Paste (text or screenshot image) |
| Ctrl+C | Copy (with selection) / interrupt (without) |
| Ctrl+= / Ctrl+- | Increase / decrease font size |
| Ctrl+0 | Reset font size |
| Shortcut | Action |
|---|---|
| Ctrl+Shift+N | New window |
| Ctrl+, | Settings |
| Ctrl+Shift+P | Command palette |
The wmux CLI communicates with the running app over the named pipe.
wmux ping # Check if wmux is running
wmux notify "Build complete" # Send a notification
wmux new-workspace --title "API" # Create a workspace
wmux list-workspaces # List all workspaces
wmux split --right # Split focused pane
wmux send "npm test" # Send text to terminal
wmux send-key Enter --ctrl # Send keystroke
wmux read-screen --lines 50 # Read terminal content
# Browser (CDP-powered)
wmux browser open http://localhost:3000
wmux browser snapshot # Accessibility tree with @eN refs
wmux browser click @e5 # Click element by ref
wmux browser type @e3 "hello" # Type into input by ref
wmux browser fill @e3 "value" # Set input value directly
wmux browser screenshot # Base64 PNG screenshot
wmux browser get-text @e2 # Get element text content
wmux browser eval "document.title" # Run JavaScript
# Sub-agent spawning
wmux agent spawn --cmd "claude --resume abc" --label "Research"
wmux agent spawn-batch --json '[{"cmd":"claude","label":"Agent 1"},{"cmd":"claude","label":"Agent 2"}]'
wmux agent list # List all agents
wmux agent status <agent-id> # Check agent status
wmux agent kill <agent-id> # Kill an agent
wmux tree # Workspace/pane/surface hierarchyConnect to \\.\pipe\wmux for programmatic control. Two protocols supported:
V1 (text, used by shell integration):
report_pwd <surface_id> <path>
report_git_branch <surface_id> <branch> [dirty]
report_shell_state <surface_id> idle|running|interrupted
notify <surface_id> <text>
ping
V2 (JSON-RPC, used by CLI and automation):
{"method": "workspace.create", "params": {"title": "Agent 1"}}
{"method": "workspace.list", "params": {}}
{"method": "surface.send_text", "params": {"id": "surf-...", "text": "npm test\n"}}
{"method": "surface.read_text", "params": {"id": "surf-...", "lines": 50}}
// Browser control (CDP-powered)
{"method": "browser.navigate", "params": {"url": "http://localhost:3000"}}
{"method": "browser.snapshot", "params": {}}
{"method": "browser.click", "params": {"ref": "@e5"}}
{"method": "browser.type", "params": {"ref": "@e3", "text": "hello"}}
{"method": "browser.fill", "params": {"ref": "@e3", "value": "hello"}}
{"method": "browser.screenshot", "params": {"fullPage": true}}
{"method": "browser.get_text", "params": {"ref": "@e2"}}
{"method": "browser.eval", "params": {"js": "document.title"}}
{"method": "browser.batch", "params": {"commands": [...]}}
// Sub-agent spawning
{"method": "agent.spawn", "params": {"cmd": "claude --resume abc", "label": "Research"}}
{"method": "agent.spawn_batch", "params": {"agents": [...], "strategy": "distribute"}}
{"method": "agent.list", "params": {}}
{"method": "agent.status", "params": {"agentId": "agent-..."}}
{"method": "agent.kill", "params": {"agentId": "agent-..."}}
{"method": "system.tree", "params": {}}On relaunch, wmux restores:
- Window position and size
- Workspace layout (titles, colors, pin state)
- Split pane structure (directions and ratios)
- Working directory per terminal
- Browser panel URLs
- Active workspace and pane selection
wmux does not restore live process state. Active Claude Code, tmux, or vim sessions are not resumed after restart. Shells are respawned fresh in the saved working directories.
wmux reads configuration from two sources:
- Windows Terminal --
%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_...\LocalState\settings.json - Ghostty --
~/.config/ghostty/config
Import either via Settings > Terminal > Import. Extracts font family, font size, color scheme, and palette. Default theme is Monokai. 450+ Ghostty themes bundled.
Two-process Electron model. Main process manages PTY spawning (node-pty/ConPTY), named pipe server, CDP browser bridge, port scanning, git/PR polling, notifications, Claude Code context injection, session persistence, and multi-window lifecycle. Renderer process runs React/Zustand with xterm.js (WebGL), recursive split pane layout, and the sidebar.
src/
main/ # Electron main process
renderer/ # React app (sidebar, splits, terminals, browser)
preload/ # contextBridge API
cli/ # wmux CLI tool
shared/ # Types shared between main and renderer
shell-integration/ # PowerShell, CMD, WSL scripts
wmux is a Windows reimplementation of cmux, the macOS terminal for multitasking. Same design, same socket protocol, same philosophy. Tools built for cmux's API work with wmux.
- Original wmux project: amirlehmam/wmux
- Original inspiration: manaflow-ai/cmux
- Pi source repository: badlogic/pi-mono
- GitHub Issues -- bug reports and feature requests
- GitHub Discussions -- questions and ideas
wmux is open source under the same MIT license as the source project.