Troubleshooting
Common issues with parallel execution — orphaned worktrees, merge failures, disk space, and recovery procedures.
Troubleshooting
Common issues and solutions for parallel execution.
Orphaned Worktrees
Symptom: Directories remain in .ralph-tui/worktrees/ after ralph exits.
Cause: Ralph was force-killed (Ctrl+C ×2) or crashed before cleanup.
Fix:
Ralph automatically detects and cleans up orphaned worktrees on the next run. Manual cleanup is only needed if you want to reclaim disk space immediately.
Stale Branches
Symptom: git branch shows ralph-parallel/* branches after execution.
Cause: Branches weren't cleaned up after merge or failure.
Fix:
Merge Failures
Symptom: Merge fails with conflicts that AI cannot resolve.
Cause: Tasks modified the same files in incompatible ways.
Fix:
- Ralph automatically rolls back the failed merge
- The conflicting task is re-queued to run sequentially
- If re-queue also fails, the task is marked as failed
Prevention:
- Structure tasks to touch different files/directories
- Use explicit
dependsOnrelationships for tasks that share files - Lower
maxWorkersto reduce concurrent file changes
Disk Space Issues
Symptom: Worktree creation fails with "insufficient disk space" error.
Cause: Not enough free disk space for worktree checkouts.
Fix:
Estimate: Each worktree uses roughly the same disk space as your source files (excluding .git/, node_modules/). With 3 workers, expect ~3x your source directory size.
Lock Conflicts
Symptom: "Lock file exists" error when starting parallel execution.
Cause: A previous ralph session didn't clean up its lock file.
Fix:
Session Recovery
Symptom: Ralph restarts and finds a previous parallel session.
Behavior: Ralph checks for existing parallel session state:
- Detects orphaned worktrees and checks for uncommitted work
- Completed-but-unmerged worktrees resume merge
- In-progress worktrees are abandoned (tasks reset to open)
- Remaining tasks are re-analyzed for parallel groups
Session state is stored in .ralph-tui/parallel-session.json.
Backup Tags
Ralph creates backup tags for rollback safety. To clean them up:
FAQ
Can I use parallel execution with all trackers?
Yes. The tracker plugin runs in the main process only — workers don't directly access the tracker. This works with beads, beads-rust, JSON, and all other tracker plugins.
Does parallel execution work with sandboxing?
Yes. Each worker inherits the sandbox configuration. Worktrees are added to the sandbox allow list automatically.
Can I mix parallel and sequential tasks?
Yes. Tasks with cyclic dependencies run sequentially after all parallel groups complete. You can also use --serial to force sequential mode when needed.
How many workers should I use?
Start with the default of 3. Increase if:
- You have many independent tasks
- Your machine has ample CPU and RAM
- Tasks are I/O-bound (waiting for APIs)
Decrease if:
- Disk space is limited
- Tasks are CPU-intensive
- You're experiencing merge conflicts frequently
What happens if I Ctrl+C during parallel execution?
First Ctrl+C initiates graceful shutdown:
- Stops all workers
- Waits for current agent calls to finish
- Merges any completed work
- Cleans up worktrees
Second Ctrl+C force-kills immediately (may leave orphaned worktrees).