parallel-processing
Run multiple tasks in parallel using tmux windows
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Parallel Processing
Use tmux for background tasks and parallel work.
Recommended: Use Subagents for Context Efficiency
For simple parallel commands, launch multiple tmux-runner subagents in parallel:
# Launch all three in parallel (single message with multiple Task calls)
Task(subagent_type="tmux-runner", description="Run tests",
prompt="Run 'npm test' and return results", model="haiku")
Task(subagent_type="tmux-runner", description="Run lint",
prompt="Run 'npm run lint' and return results", model="haiku")
Task(subagent_type="tmux-runner", description="Run build",
prompt="Run 'npm run build' and return results", model="haiku")
This saves context in the main conversation - you only see the results, not all the intermediate tmux operations.
Pattern: Background Task (Direct)
For long-running servers you need to monitor:
# Start background task
window_id = tmux_new_window(command="npm run dev", name="dev-server")
# Continue working...
# Check later
output = tmux_capture(target=window_id, lines=50)
# Clean up
tmux_kill(target=window_id)
Pattern: With Notification
window_id = tmux_new_window(command="npm run build", name="build")
status = tmux_wait_idle(target=window_id, timeout=300)
notify(title="Build Complete", message=f"Status: {status}")
Pattern: Multiple Parallel (Direct)
When you need to manage windows yourself:
test_win = tmux_new_window(command="npm test", name="tests")
lint_win = tmux_new_window(command="npm run lint", name="lint")
build_win = tmux_new_window(command="npm run build", name="build")
for w in [test_win, lint_win, build_win]:
tmux_wait_idle(target=w, timeout=120)
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!