Skip to content

v0.1.5 · macOS · Rust · tmux-compatible commands · C ABI · Node

Run 1000 agents
without a PTY.

zeropty is the session engine for AI agents. Read their screens, send them keys and wait until they finish, with tmux's commands and a fraction of its CPU and memory.

Architecture

Your agents

claude
codex
sh / zsh / bash
any program
run
zeroptyone server · a socketpair per session · no PTY
drive

Your host

CLItmux commands
Socketany language
EmbeddedC ABI · Node

How a session gets a terminal →

In action

Start a session, wait for the answer, read the screen

Terminal demo: start a session with zeropty and send keys; wait-pane catches done: 42 after 1.01 seconds, and capture-pane reads the screen
wait-pane returns the moment done: 42 appears, with no polling
14.1~15.6×less CPU than tmux, 400 claude jobs
12.0~12.2×less memory than tmux, 400 claude jobs
128~159×faster send-keys from Node, embedded
1000sessions verified, no PTY limit

Measured against tmux 3.7c on an Apple M1, interleaved. Every number and how it was measured →

Scale

Thousands of sessions

No PTY means no PTY limit. tmux stops at 511 (999 at most); zeropty runs 1000 replaying real claude work in 4.65MB.

Speed

One call per command

send-keys is 0.06~0.07ms embedded and 0.24~0.26ms over the socket, where running tmux per command takes 9.03~9.56ms.

Waiting

wait-pane

Returns the moment the text appears on the screen: p50 1ms, no polling. No capture-pane loop arriving 86~96ms late.

Search

grep-panes

Finds which of 1000 sessions is waiting for input in 16~32ms, without capturing every screen.

Upgrades

restart-server

Upgrade the server while it keeps the running sessions. Restarting tmux ends them.

Embedding

Inside your program

Link the C ABI or load the Node module and drive sessions with no server process and no socket.

Platform support

macOS 11+Apple silicon · IntelCLI · socketC ABI · Rust · Node.jsLinux · Windowsnot supported
Install and platform support →

Quick start

$ git clone https://github.com/CreatiCoding/zeropty && cd zeropty && ./build.sh
$ export PATH="$PWD/dist:$PATH"
$ zeropty new-session -d -s demo -x 80 -y 6 sh
$ {
  "zeropty send-keys -t demo -l 'echo \"done": "$((6 * 7))\"'"
}
$ zeropty send-keys -t demo Enter
$ {
  "zeropty wait-pane -t demo -m 'done": "42' -T 10000"
}
$ zeropty capture-pane -p -t demo
Read the guide

Released under the MIT or Apache-2.0 license.