Reach for your shell tool
- Short one-shot commands:
ls,git status, a quickgrep. - A long non-interactive job in a fresh environment, with no human needed — your harness's background execution already does this well.
An Agent-Computer Interface for terminals
pairmux gives AI coding agents a real, persistent terminal — REPLs, TUIs, ssh, [y/N] prompts — and hands the same live terminal to a human the moment a prompt needs a password or a judgment call.
The agent runs ssh in a pairmux terminal named deploy. The server asks for a password. pairmux reports awaiting-input and tells the agent not to guess secrets. The agent waits for a human, who can run pairmux attach deploy, type the password, and hand the terminal back. Press “Type the password” to take over: the wait returns, and the agent finishes the deploy.
Deploy the build to staging.
I'll open a persistent terminal and ssh in.
pairmux --json new --name deploy
status: createdpairmux --json run deploy "ssh deploy@staging.internal"
status: awaiting-inputnext: do NOT guess or type secretsnext: pairmux wait deploy --human --notifyThe server wants a password. I won't guess it — handing off to you.
pairmux --json wait deploy --human --notify --timeout 5m
Waiting for a human…
a human can take over: pairmux attach deploy
01 — The problem
Most agent shell tools run a command without a terminal. That is fine for ls. It is not fine for the rest.
python, psql, ssh, git rebase -i, pagers and TUIs need a PTY. Without one they are not awkward — they are impossible.
$ python
>>> A password prompt leaves an agent with two bad options: guess, or give up. pairmux adds a third: hand the live terminal to a person.
Password: source venv/bin/activate, export, nvm use evaporate after every call, so they get re-composed into every command. A real shell keeps them.
$ source .venv/bin/activate
(.venv) $ 02 — How it works
pairmux --json new --name deployStatus: createdOne persistent shell. Its state survives between commands.
pairmux --json run deploy "ssh deploy@staging.internal"Status: awaiting-inputrun blocks until the command finishes, a recognized prompt appears, or the timeout expires. A secret-shaped prompt comes back with do NOT guess or type secrets.
pairmux --json wait deploy --human --notify --timeout 5mStep: waitingThe agent parks on a resumable checkpoint and the human gets a best-effort desktop notification.
pairmux attach deployStep: attachedThe human steps into the same live terminal, answers the prompt, and detaches. Optionally: pairmux --json note deploy "entered the staging password".
wait returnsStatus: human-doneThe wait ends the moment the prompt is answered. A note explains what the human did; it is never required to resume.
Only one writer per terminal. Reads are lock-free. Every byte is journaled and retrievable with log.
03 — Fit
ls, git status, a quick grep.[y/N], ssh, sudo.nvm use.tail -f that a person may also watch.pairmux earns its place where a terminal, its state, or a human is part of the work.
04 — Works with
Install the embedded Agent Skill once; the agent learns the new → run → wait loop and the safety rules.
pairmux skill install --target allAgent Skills guideA stdio MCP server exposes new, run, peek, wait, send, log, ls, kill, note and doctor as typed tools.
pairmux mcp serveCLI referencePlain CLI. Add --json for a versioned pairmux.v1 envelope with status, output, recovery hints and ordered next steps.
pairmux --json run deploy "ssh deploy@staging.internal"Human collaboration guide05 — Install
macOS / Linux
uv tool install pairmuxthen pairmux doctor
Needs uv and Python 3.9+ for the tool environment. tmux is optional: when it is on your PATH pairmux uses it (3.2 or newer); otherwise the built-in multiplexer takes over.
Or let the installer set up uv:
curl -fsSL https://pairmux.treeleaves30760.com/install.sh | bashWindows
irm https://pairmux.treeleaves30760.com/install.ps1 | iexRuns natively on Windows 10 1809+ and 11 (x86-64 and ARM64) from v1.0.0; no tmux or WSL needed. Prefer WSL? Set PAIRMUX_INSTALL_TARGET=wsl before running the installer.
pairmux doctorpairmux updateHomebrew, pipx, release archives and details are in the install guide.