ppi — Ping Pong Interactive
A zero-daemon local message bus for orchestrating CLI coding agents (Claude Code, OpenAI Codex) and a human operator in Zellij.
ppi turns Zellij panes into a multi-agent workspace: AI coding agents collaborate side-by-side with human-in-the-loop oversight, all in one Bash script.
- Zero infrastructure: Pure Bash,
jq, and zellij. No background service. State lives in /tmp/ppi-<uid>/<session>.
- Safe to leave installed: Outside a
ppi session, the plugin hooks find no PPI_BIN and exit 0 immediately.
- Built-in loop guard: Caps agent-to-agent traffic at 20 messages until the human operator sends again. Over-limit sends are refused and logged as
blocked; messages to the operator always pass.
- Prompt-injection aware: The injected contract tells each agent that a message from another agent is a request, never the user's approval: it cannot approve a permission prompt or authorize new work.
Requirements: Zellij 0.44+, jq, and Bash 3.2+. Runs on macOS, Linux, and Windows via WSL2.
Install
Review bin/ppi first, then symlink it onto your PATH:
git clone https://github.com/bartolli/ppi.git /path/to/ppi
ln -s /path/to/ppi/bin/ppi ~/.local/bin/ppi
Claude Code Plugin
claude plugin marketplace add /path/to/ppi
claude plugin install ppi@ppi
Pre-approve ppi in ~/.claude/settings.json so agent sends don't pause for confirmation:
{
"permissions": {
"allow": ["Bash(ppi send:*)", "Bash(ppi who)"]
}
}
OpenAI Codex Plugin
codex plugin marketplace add /path/to/ppi
codex plugin add ppi@ppi
Codex prompts you to trust the plugin and its hooks on first use. Accept, then restart Codex. Changed hooks are marked for review again.
Quick Start
Create ppi.config.json
Place a config file in your project root, or globally at ~/.config/ppi/config.json:
{
"arms": [
{ "name": "claude", "runtime": "claude", "model": "haiku" },
{ "name": "codex", "runtime": "codex", "model": "gpt-6-luna", "profile": "supervisor" },
{ "name": "planner", "runtime": "claude", "command": ["claude", "--model", "opus", "--permission-mode", "plan"] }
]
}
Launch the Workspace
cd ~/your-project
ppi up # uses ./ppi.config.json or ~/.config/ppi/config.json
ppi up custom.json # or pass an explicit config file
The panes start in the directory ppi up runs from, so that directory is the agents' workspace.
Orchestrate from the Operator Console
ppi up opens your agents side-by-side on top and focuses the Operator Console across the bottom:
operator> @claude Ask @codex to review your changes in src/auth.ts
operator> /who
operator> /release codex
operator> /quit
| Console Command | Action |
|---|
@<agent> <message> | Send an instruction to an agent (resets the 20/20 agent-to-agent message counter). |
/who | Show message count (X/20), participant pane IDs, states (starting, idle, busy), and queue depths. |
/release <agent> | Recover a stuck agent sitting at its prompt (delivers queued messages or marks it idle). |
/quit | Exit the operator console. |
| (incoming) | Messages agents send to operator print in the console as they arrive, as [ppi from=<agent> to=operator id=<id>] <msg>. |
Alt f (Zellij key) | Toggle the floating Bus Monitor log. Hide it with Alt f—do not close it, as it also delivers messages for sandboxed agents. |
Configuration Rules
Each entry in "arms" defines one agent pane:
claude preset: Supports optional "model".
codex preset: Supports optional "model" and "profile". Launches with -s workspace-write and a one-line startup prompt so Codex initializes its session hooks.
- Custom
"command": An array of strings executed directly (["claude", "--model", "opus"]). No shell expansion (~ or $VAR) or preset defaults are applied. Optional "runtime" sets PPI_RUNTIME for hooks; "model" and "profile" are not allowed alongside "command".
Models are not checked: a wrong model fails inside its pane after Zellij starts, and /who shows the arm stuck at starting.
CLI Reference