Configuration
All parallel execution configuration options — config file settings, CLI flags, and default values.
Parallel Configuration
Parallel execution can be configured through the config file, CLI flags, or both. CLI flags take precedence over config file settings.
Config File
Add a [parallel] section to your .ralph-tui/config.toml:
Options
| Option | Type | Default | Description |
|---|---|---|---|
mode | string | "never" | Execution mode: auto analyzes dependencies, always forces parallel, never disables |
maxWorkers | number | 3 | Maximum concurrent workers (worktrees) |
directMerge | boolean | false | If true, merge directly to current branch; if false (default), create a session branch |
worktreeDir | string | ".ralph-tui/worktrees" | Directory for git worktrees (relative to project root) |
Mode Behavior
| Mode | Behavior |
|---|---|
auto | Analyze task dependencies; use parallel when beneficial, fall back to sequential otherwise |
always | Force parallel execution regardless of dependency analysis (may cause more merge conflicts) |
never | Disable parallel execution entirely; always run sequentially |
CLI Flags
Override configuration with command-line flags:
Flag Reference
| Flag | Description |
|---|---|
--serial, --sequential | Force sequential execution (overrides config) |
--parallel | Force parallel execution with default worker count |
--parallel N | Force parallel execution with N workers |
--direct-merge | Merge directly to current branch instead of creating a session branch |
--epic <id> | Select an epic. This option can be repeated for multi-epic hierarchy tracker runs. |
--epics <ids> | Select comma-separated epics for hierarchy tracker runs. |
When both --serial and --parallel are specified, --serial takes precedence.
Multi-epic selection is currently a runtime option, not a config-file setting. Use repeated --epic or --epics so each session records the exact selected epic set.
Precedence
Configuration is resolved in this order (highest priority first):
- CLI flags —
--serialor--parallel N - Config file —
[parallel]section in.ralph-tui/config.toml - Built-in default —
mode = "never"(sequential execution)
Examples
Minimal Config
No parallel config means sequential-by-default execution:
To enable automatic parallel detection:
High-Parallelism Setup
For large projects with many independent tasks:
CI/Headless Mode
For CI pipelines where you want deterministic behavior:
Conservative Mode
If you want to opt in to parallel execution only via CLI:
Multi-Epic Hierarchy Tracker Run
For Beads-style hierarchy trackers, select more than one epic at runtime:
Ralph preserves the first ID as epicId for compatibility and stores the full selected set as epicIds in session state. Worker count remains global across all selected epics.
Smart Parallelism Heuristics
Ralph TUI automatically adjusts the recommended worker count based on task characteristics. This helps prevent merge conflicts when tasks are likely to touch overlapping files.
How It Works
The heuristic analyzes:
- Task titles and labels — Looking for keywords like "test", "refactor", etc.
- File overlap — Using the
affectsmetadata field if available
Heuristic Rules
| Pattern | Effect | Reasoning |
|---|---|---|
>50% test tasks | Full parallelism | Test files rarely conflict with each other |
>50% refactor tasks | Reduce to 2 workers | Refactoring often touches many files |
| High file overlap | Reduce parallelism | Overlapping files cause merge conflicts |
Example
If your task list contains:
The heuristic detects >50% test-related tasks and recommends full parallelism since test files typically don't conflict.
Conversely, if your tasks are:
The heuristic reduces parallelism to 2 workers to minimize merge conflicts.
Overriding Heuristics
You can always override the recommendation with explicit flags: