Queue Up a Clear So You Can Queue Up Work - tmux Sessions and Git Worktrees
Queue Up a Clear So You Can Queue Up Work
The trick to running multiple AI agents productively is not about the agents - it is about the workspace. One tmux session per agent, each pointing at its own git worktree, means you can queue up work without agents stepping on each other.
One Session, One Agent, One Worktree
Each tmux session gets its own git worktree on a separate branch. Agent A works on feature-auth in one directory. Agent B works on feature-dashboard in another. They share the same repository but cannot see each other's uncommitted changes.
git worktree add ../project-auth -b feature/auth
git worktree add ../project-dash -b feature/dashboard
tmux new-session -s agent-auth -c ../project-auth
tmux new-session -s agent-dash -c ../project-dash
This is the minimum viable isolation for parallel agent work. Without it, agents modify the same files, create merge conflicts mid-task, and waste tokens reasoning about changes they did not make.
Clearing Before Queuing
Before assigning the next task to an agent, clear its workspace. Commit or stash any pending changes, ensure the branch is clean, and reset the agent's context. This prevents task bleed - where context from the previous task influences the next one.
The pattern is: finish task, commit, clear context, load next task. Each task starts fresh. The agent does not carry assumptions from the previous task.
Why This Beats Alternatives
IDE-based multi-agent setups share a single working directory and rely on the agents to coordinate. This fails when agents are not aware of each other. Container-based isolation is heavier than needed for most development work.
tmux plus worktrees gives you lightweight isolation with standard tools. No custom orchestration framework. No Docker overhead. Just git and tmux doing what they already do well.
The bottleneck in multi-agent workflows is not agent intelligence. It is workspace management.
Fazm is an open source macOS AI agent. Open source on GitHub.