Two approaches
Trellis supports two ways to run multiple agents:| Approach | Description | Isolation |
|---|---|---|
| Multi-Agent | Multiple agents in the same directory | Shared files, can conflict |
| Multi-Session | Each agent in separate Git worktree | Fully isolated, no conflicts |
Why Multi-Session
Some tasks are independent. Adding a login page doesn’t affect adding a settings page. With separate worktrees, agents can’t interfere with each other.Configuration
Before starting, createworktree.yaml in your project root:
id: Unique identifierbranch: Git branch nameprd: Requirements for this task
Starting parallel sessions
Use the/trellis:parallel command in Claude Code. It reads worktree.yaml and:
- Creates worktrees for each task
- Spawns Claude Code sessions
- Sets up branches
Monitoring progress
Check status with:Session pipeline
Each session follows phases:- Plan - Understand requirements, identify files to modify
- Implement - Write the code
- Check - Review against specs, self-fix issues
- PR - Create pull request
When to use this
Good for:- Independent features
- Parallel bug fixes
- Generating variations (different approaches to same problem)
- Features that depend on each other
- Work that touches the same files
- When you need to iterate with the AI
Cleanup
When done, clean up worktrees:Platform support
| Feature | Claude Code | Cursor |
|---|---|---|
| Multi-Agent (same dir) | ✅ Full | ⚠️ Limited |
| Multi-Session (worktree) | ✅ Full | ❌ Not supported |