Dynamically spin off side agents in their own tmux windows and git worktrees
TypeScript
193
134 commits
updated Sep 21, 2026
GitHub repository · npm package
Code in sprints (using agents asynchronously), not in a marathon (sequential task-by-task flow).
Instead of waiting for one backlog item to finish before starting the next, spin tasks out into single-use child agents as soon as they occur to you. Each child runs in its own tmux window and git worktree, so you can keep shipping in parallel while maintaining isolation and control (asynchronous does not mean autonomous). Each child is a one-off and lives and dies with its short topic branch and tmux window—no "teams of long-running agents messaging each other" or "role-based subagents" complexity. The workflow is unified, simple, and deterministic.
The most advanced users of AI coding agents have worked like this for a while, but the setup has been a bit daunting. This extension automates the full tmux/worktree/merge lifecycle for you and takes just a few seconds to set up. Plus, side agents can also be spawned and controlled by another agent to orchestrate its own flock of subagents.
Warning: You will build a lot more, which means you may run out of context windows and need to take better care of your wellbeing between sprints. Also, for the community's sake, please don't max out Claude subscriptions with Pi—use a Codex model (or APIs) by default.
/agent [-model ...] <task> to spawn a background child Pi agent./agents to inspect current agents and clean up stale state./agent-resume to pick a previously /quit side-agent session and reopen it (conversation + branch) in a worktree/tmux window.agent-setup to scaffold project-specific lifecycle scripts (flexible worktree initialization and merge process).agent-start, agent-check, agent-wait-any, agent-sendpi install npm:pi-side-agents
This registers the extension and skill with Pi. Restart Pi after installing.
/skill:agent-setup
/agent wait, why is weirdMethod doing something-weird?/agent -model gpt-5.3-codex add regression tests for auth/agent, but you can also use it only for ad hoc side questions./agents to get a detailed overview of what's being done right now.commit your work when done in your AGENTS.md. (You can always tell the agent to amend.)git show, fg to go back to the baby agent's Pi./quit and move on.
/quit before work is merged, the branch will stay around./agent-resume: it lists past child sessions from this project's worktrees, then reopens the chosen session with its branch (in place if the worktree is untouched, else preferring the session's original slot, else any free slot; a pruned no-commits branch is recreated from HEAD). When the session ends up in a different directory than it originally ran in, a prominent directory-change notice is appended to the child's conversation so it stops targeting the old paths.
tmuxRun tests:
npm run test:unit
npm run test:integration
docs/architecture.mddocs/recovery.mddocs/todo.mdTypeScript
51.9%
JavaScript
48.1%
Dynamically spin off side agents in their own tmux windows and git worktrees
TypeScript
193
134 commits
updated Sep 21, 2026
GitHub repository · npm package
Code in sprints (using agents asynchronously), not in a marathon (sequential task-by-task flow).
Instead of waiting for one backlog item to finish before starting the next, spin tasks out into single-use child agents as soon as they occur to you. Each child runs in its own tmux window and git worktree, so you can keep shipping in parallel while maintaining isolation and control (asynchronous does not mean autonomous). Each child is a one-off and lives and dies with its short topic branch and tmux window—no "teams of long-running agents messaging each other" or "role-based subagents" complexity. The workflow is unified, simple, and deterministic.
The most advanced users of AI coding agents have worked like this for a while, but the setup has been a bit daunting. This extension automates the full tmux/worktree/merge lifecycle for you and takes just a few seconds to set up. Plus, side agents can also be spawned and controlled by another agent to orchestrate its own flock of subagents.
Warning: You will build a lot more, which means you may run out of context windows and need to take better care of your wellbeing between sprints. Also, for the community's sake, please don't max out Claude subscriptions with Pi—use a Codex model (or APIs) by default.
/agent [-model ...] <task> to spawn a background child Pi agent./agents to inspect current agents and clean up stale state./agent-resume to pick a previously /quit side-agent session and reopen it (conversation + branch) in a worktree/tmux window.agent-setup to scaffold project-specific lifecycle scripts (flexible worktree initialization and merge process).agent-start, agent-check, agent-wait-any, agent-sendpi install npm:pi-side-agents
This registers the extension and skill with Pi. Restart Pi after installing.
/skill:agent-setup
/agent wait, why is weirdMethod doing something-weird?/agent -model gpt-5.3-codex add regression tests for auth/agent, but you can also use it only for ad hoc side questions./agents to get a detailed overview of what's being done right now.commit your work when done in your AGENTS.md. (You can always tell the agent to amend.)git show, fg to go back to the baby agent's Pi./quit and move on.
/quit before work is merged, the branch will stay around./agent-resume: it lists past child sessions from this project's worktrees, then reopens the chosen session with its branch (in place if the worktree is untouched, else preferring the session's original slot, else any free slot; a pruned no-commits branch is recreated from HEAD). When the session ends up in a different directory than it originally ran in, a prominent directory-change notice is appended to the child's conversation so it stops targeting the old paths.
tmuxRun tests:
npm run test:unit
npm run test:integration
docs/architecture.mddocs/recovery.mddocs/todo.mdTypeScript
51.9%
JavaScript
48.1%