ποΈ Supervise multiple AI coding agents in parallel β organized workspaces, instant switching, desktop notifications π
Quick Start Β· Supervisor Pattern Β· Features Β· Ecosystem Β· Installation Β· Usage Β· How It Works Β· Troubleshooting
Install with one command:
curl -fsSL https://raw.githubusercontent.com/tsilva/agentpong/main/install.sh | bashThe installer will:
- Install AeroSpace, terminal-notifier, and jq (if needed)
- Deploy AeroSpace config with workspace keybindings
- Install scripts for window organization and notification handling
- Configure AI agent hooks (Claude Code, Codex CLI, OpenCode)
- Optionally install Alfred workflow and sandbox support
The Pain: Running one AI coding agent session is straightforward. Running several in parallel β each working on a different project β quickly becomes chaos. Which task finished? Which window was that? You keep switching tabs to check, or worse, you miss a permission prompt and an agent sits idle for minutes.
The Solution: agentpong turns you into a supervisor of AI coding agents. Your Cursor windows get organized into numbered workspaces by priority. When an agent finishes or needs permission, you get a desktop notification. One click (or alt+n) jumps you directly to the right window β even across workspaces.
The Result: Zero tab-switching. Zero missed prompts. Organized workspaces. Instead of babysitting one session, you delegate tasks, switch away, and return when notified. This is the supervisor pattern.
| β‘ Setup | π― Focus | π₯οΈ Workspaces | π€ Tools |
|---|---|---|---|
| 30 seconds | 1-click or alt+n | Cross-workspace | Claude Code Β· Codex CLI Β· OpenCode Β· claude-sandbox |
graph LR
subgraph You["You (Supervisor)"]
Review["Review & Direct"]
end
subgraph Agents["AI Coding Agents"]
A1["Project A"]
A2["Project B"]
A3["Project C"]
end
Review -->|"Alt+2"| A1
Review -->|"Alt+3"| A2
Review -->|"Alt+4"| A3
A1 -->|"Done!"| Review
A2 -->|"Needs input"| Review
A3 -->|"Working..."| Review
- Delegate β Give your AI agent a task and switch away (
alt+3to Project B) - Multiplex β Work on another project while the first one runs
- Get notified β Desktop alert when Claude finishes or needs permission
- Context switch β Click notification or press
alt+2to jump back instantly - Review & repeat β Check output, give next task, switch to another project
This turns waiting time into productive time. While an agent thinks through a complex refactor in Project A, you're reviewing changes in Project B and delegating tests in Project C.
Workspaces are virtual desktops managed by AeroSpace, a tiling window manager for macOS. They're similar to macOS Spaces but with key differences:
- Instant switching β No slide animations; workspaces change immediately
- Keyboard-driven β
alt+1throughalt+9switches directly to any workspace - One app per workspace β Each AI agent instance gets its own dedicated space
- Fullscreen by default β Every window is maximized, zero distractions
This is what makes the supervisor pattern practical β switching between projects takes milliseconds, not seconds.
| Workspace | Keybinding | Purpose |
|---|---|---|
| 1 | alt+1 |
Browser, notes, documentation |
| 2-9 | alt+2 - alt+9 |
One Cursor window per workspace (each running an AI coding agent) |
High-priority projects get lower numbers for faster access.
- π₯οΈ Workspace management β AeroSpace-powered numbered workspaces with
alt+1..9switching - π Window organization β Press
alt+sto sort Cursor windows into numbered workspaces - π Smart notifications β Alerts when AI agents finish tasks or need permission
- π― Cross-workspace focus β Click notification or press
alt+nto jump to the right window - π Project switcher β Alfred workflow (
alt+p) to search and switch between projects - β‘ Performance tuning β Optional macOS animation disabling for snappier workspace switching
- π€ Multi-tool support β Claude Code, Codex CLI, OpenCode, and claude-sandbox containers
Supervising three projects in parallel:
alt+2β Open my-api-backend: "Add pagination to the /users endpoint"alt+3β Switch to my-web-frontend: "Update the user list component to handle paginated responses"alt+4β Switch to my-mobile-app: "Write unit tests for the login flow"- Desktop notification: "my-api-backend β Ready for input" β click to jump back
alt+2β Review the pagination changes, then: "Now add rate limiting to that endpoint"alt+nβ Another notification pending β jump to my-mobile-app to review tests- Repeat β delegate, switch, review, delegate
agentpong is the core of a broader workflow. These companion projects enhance the supervisor pattern:
| Project | Description |
|---|---|
| claudebox | Sandboxed Claude Code execution β full autonomy, no permission prompts |
| Project | Description |
|---|---|
| capture | Instant thought capture to Gmail β dump ideas without breaking flow |
| claudebridge | OpenAI-compatible API bridge for Claude Max subscriptions |
- macOS (Sequoia 15.x supported)
- Homebrew for installing dependencies
- Cursor for the full workspace-management flow
- A terminal with Claude Code, Codex CLI, or OpenCode for notification-only workflows
- AeroSpace β Tiling window manager for workspace management and cross-workspace focus (core requirement)
- terminal-notifier β macOS desktop notifications
- jq β JSON processor for settings configuration
- Alfred β Project switcher workflow (detected automatically, never required)
curl -fsSL https://raw.githubusercontent.com/tsilva/agentpong/main/install.sh | bashSecurity-conscious? Download first to inspect:
curl -fsSL -o install-agentpong.sh https://raw.githubusercontent.com/tsilva/agentpong/main/install.sh
# Review the script...
bash install-agentpong.shgit clone https://github.com/tsilva/agentpong.git
cd agentpong
./install.sh--dry-run Preview all changes without applying them
--update Only update changed files, skip all prompts
--force, -f Force reinstall even if already up to date
--quiet, -q Minimal output (for CI/automation)
--verbose, -v Maximum output with debug logging
--wizard, -w Interactive TUI configuration mode
--health-check Run post-install verification only
--uninstall Remove agentpong completely
Run the install command again. The installer is idempotent β it skips unchanged files and only updates what's needed.
Force a complete reinstall:
curl -fsSL https://raw.githubusercontent.com/tsilva/agentpong/main/install.sh | bash -s -- --force- AeroSpace should start automatically (configured with
start-at-login = true) - Grant Accessibility permissions when prompted
- Press
alt+sto organize your Cursor windows
| Shortcut | Action |
|---|---|
alt+1..9 |
Switch to workspace 1-9 |
alt+shift+1..9 |
Move window to workspace 1-9 |
alt+s |
Sort/organize Cursor windows |
alt+n |
Focus next pending notification |
alt+p |
Open project switcher (Alfred) |
alt+f |
Toggle fullscreen |
alt+left/right |
Previous/next workspace |
Notifications fire automatically after installation. Start a new Claude Code session and you'll receive alerts when:
- The agent finishes a task and is ready for input
- The agent needs permission to proceed
Click the notification to focus the Cursor window.
The OpenCode plugin hooks into session.idle and permission-request events with no extra configuration after install. Notifications appear with the "OpenCode" prefix.
The Codex CLI plugin handles agent-turn-complete events via a Python script. After installation, add the notification hook to your Codex config:
# ~/.codex/config.toml
notify = ["python3", "~/.codex/agentpong.py"]Notifications appear with "Codex" prefix. Codex CLI currently only supports task-completion notifications (no permission hooks).
Press alt+p to open the project switcher. It shows:
- Open projects first, sorted by workspace number
- Unopened repos alphabetically, with option to open in Cursor
Set AGENTPONG_REPOS_DIR to customize the repo scan path (default: ~/repos).
Claude Code hooks don't fire in standalone terminals. Set up iTerm Triggers instead:
- Open iTerm > Settings > Profiles > Advanced > Triggers > Edit
- Add a new trigger:
- Regex:
^[[:space:]]*> - Action: Run Command...
- Parameters:
~/.claude/notify.sh "Ready for input" - Instant: checked
- Regex:
βββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
β Claude Code ββββββΆβ notify.sh ββββββΆβ terminal-notifierβ
β Stop Hook β β β β β
βββββββββββββββββββ ββββββββββββββββββββ ββββββββββ¬ββββββββββ
β
βββββββββββββββββββ ββββββββββββββββββββ β click
β Codex CLI ββββββΆβ agentpong.py β βΌ
β notify hook β β (plugin) β βββββββββββββββββββ
βββββββββββββββββββ ββββββββββββββββββββ β focus-window.sh β
ββββββββββ¬βββββββββ
βββββββββββββββββββ ββββββββββββββββββββ β
β OpenCode ββββββΆβ agentpong.ts β βΌ
β session.idle β β (plugin) β βββββββββββββββββββ
βββββββββββββββββββ ββββββββββββββββββββ β AeroSpace β
β (focus window) β
βββββββββββββββββββ
- Hook fires (
Stop/PermissionRequestfor Claude Code;agent-turn-completefor Codex CLI;session.idleplus permission-request events for OpenCode) notify.shsends a notification viaterminal-notifierwith the project workspace name- Clicking the notification executes
focus-window.sh - The focus script finds and focuses the correct IDE window via AeroSpace
aerospace.tomldefines keybindings and auto-assigns apps to workspacesalt+striggerssort-workspaces.shwhich:- Unminimizes all Cursor windows
- Moves windows to numbered workspaces (starting at 2)
macOS Sequoia 15.x broke traditional window management APIs:
| Approach | Problem |
|---|---|
Hammerspoon hs.spaces.gotoSpace() |
No longer works on Sequoia |
AppleScript AXRaise |
Can't switch between Spaces |
URL schemes (cursor://, vscode://) |
Don't switch workspaces |
| AeroSpace | Works reliably without disabling SIP |
AeroSpace uses its own virtual workspace abstraction that bypasses these limitations.
If you run Claude Code inside claudebox, notifications can still reach your macOS desktop via TCP.
During installation, select "yes" when asked about sandbox support. This installs:
- A launchd service that listens on port
19223and requires a local shared token - A container-compatible notify script that connects via
host.docker.internal - Hooks configured in
~/.claude-sandbox/claude-config/settings.json
Container Host (macOS)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Agent hook fires
β
βΌ
notify.sh connects via ββββββββββββββΊ launchd TCP listener
host.docker.internal:19223 β
βΌ
terminal-notifier
+ focus-window.sh
One-line uninstall:
curl -fsSL https://raw.githubusercontent.com/tsilva/agentpong/main/uninstall.sh | bashOr if you have the repo cloned locally:
./uninstall.shThis removes:
- Notification scripts and hooks
- AeroSpace scripts from
~/.config/aerospace/ ~/.aerospace.toml(with prompt, since you may have customized it)- Alfred workflow (if installed)
- Re-enables macOS animations
- OpenCode plugin, Codex CLI plugin, and sandbox support (if installed)
AeroSpace itself is not removed. To uninstall it: brew uninstall aerospace
To fully remove other dependencies:
brew uninstall terminal-notifier- Check that
terminal-notifieris installed:which terminal-notifier - Verify the hook is configured:
cat ~/.claude/settings.json | grep Stop - Test manually:
~/.claude/notify.sh "Test"
- Check AeroSpace is installed:
which aerospaceorls /opt/homebrew/bin/aerospace - Check AeroSpace is running:
pgrep -x AeroSpace - Check Accessibility permissions: System Settings > Privacy & Security > Accessibility
- Test window listing:
aerospace list-windows --all | grep Cursor - Test focus script:
~/.claude/focus-window.sh "your-project-name"
- Check scripts are installed:
ls ~/.config/aerospace/sort-workspaces.sh - Check AeroSpace config is loaded:
aerospace reload-config
Claude Code and OpenCode hooks are supported in Cursor. Codex CLI hooks work in any terminal. For standalone terminals running Claude Code, use the iTerm Triggers workaround described in Usage.
./install.sh --health-checkContributions welcome! Feel free to open an issue or submit a pull request.
Found this useful? β Star the repo to help others discover it!