Options Reference

Complete reference for all Ralph TUI configuration options with types, defaults, and constraints.

Configuration Options Reference

This page documents every configuration option available in Ralph TUI. Options can be set in config files (TOML) or via CLI flags.

INFO

Most options have sensible defaults. You typically only need to configure the agent and tracker for your project.

Core Settings

These control basic execution behavior.

OptionTypeDefaultDescription
agentstring-Agent plugin to use (e.g., "claude", "opencode")
commandstring-Custom command/executable for the agent (e.g., "ccr code")
trackerstring-Tracker plugin to use (e.g., "beads-bv", "json")
maxIterationsnumber10Maximum iterations per session (0 = unlimited, max 1000)
iterationDelaynumber1000Delay between iterations in milliseconds (max 300000)
outputDirstring.ralph-tui/iterationsDirectory for iteration log files
progressFilestring.ralph-tui/progress.mdProgress file for cross-iteration context
autoCommitbooleanfalseEnsures a git commit after each successful task. When true, ralph-tui stages and commits all uncommitted changes after task completion. When false, no automatic commit is made by ralph-tui, though the agent may still commit on its own if instructed by templates or CLAUDE.md.
prompt_templatestring-Custom Handlebars template path
subagentTracingDetailstring"off"Subagent visibility level
skills_dirstring-Directory containing custom PRD skills

subagentTracingDetail Values

Controls how much information about subagent activity is displayed:

ValueDescription
"off"No tracing, show raw agent output only
"minimal"Show start/complete events
"moderate"Show events with description and duration
"full"Show events with nested output and hierarchy

Agent Options

Shorthand Configuration

The simplest way to configure an agent:

TOML
agent = "claude"
 
[agentOptions]
model = "claude-sonnet-4-20250514"
OptionTypeDefaultDescription
agentstring-Agent plugin name
commandstring-Custom command/executable path (see below)
agentOptionsobject{}Plugin-specific options

Custom Command

The command option lets you specify a custom binary or wrapper for your agent. This is useful for:

  • AI routing tools like Claude Code Router (CCR) that proxy to different providers
  • Custom wrappers that add logging, authentication, or other behavior
  • Alternative binary locations when the default isn't in PATH
TOML
agent = "claude"
command = "ccr code"

This uses the Claude agent plugin but routes requests through CCR, which can proxy to OpenRouter, DeepSeek, Ollama, Gemini, or other providers.

Precedence

The command follows this precedence (highest to lowest):

  1. Agent-specific: command field in [[agents]] array
  2. Top-level: command field (this option)
  3. Plugin default: e.g., "claude" for the Claude plugin
INFO

For security, the command field cannot contain shell metacharacters (;, &, |, `, $, (, )). If you need complex command logic, create a wrapper script.

Full Agent Configuration

For advanced setups with multiple agents:

TOML
[[agents]]
name = "my-agent"
plugin = "claude"
default = true
command = "claude"
defaultFlags = ["--no-confirm"]
timeout = 300000
 
  [agents.options]
  model = "claude-sonnet-4-20250514"
 
  [agents.rateLimitHandling]
  enabled = true
  maxRetries = 3
OptionTypeDefaultDescription
namestringrequiredUnique identifier for this agent config
pluginstringrequiredPlugin type ("claude", "opencode")
defaultbooleanfalseUse as default agent
commandstring(from plugin)Override executable command
defaultFlagsstring[][]Additional CLI flags
timeoutnumber0Execution timeout (ms, 0 = no timeout)
optionsobject{}Plugin-specific options
fallbackAgentsstring[][]Agents to try on rate limit
rateLimitHandlingobject-Rate limit configuration
envExcludestring[][]Additional env var patterns to exclude
envPassthroughstring[][]Env vars to allow through despite exclusion patterns

Tracker Options

Shorthand Configuration

TOML
tracker = "beads-bv"
 
[trackerOptions]
epicId = "beads-001"
OptionTypeDefaultDescription
trackerstring-Tracker plugin name
trackerOptionsobject{}Plugin-specific options

Full Tracker Configuration

TOML
[[trackers]]
name = "my-tracker"
plugin = "beads-bv"
default = true
 
  [trackers.options]
  epicId = "beads-001"
OptionTypeDefaultDescription
namestringrequiredUnique identifier
pluginstringrequiredPlugin type ("json", "beads-bv", "beads")
defaultbooleanfalseUse as default tracker
optionsobject{}Plugin-specific options

Tracker Plugin Options

Each tracker plugin accepts specific options:

JSON Tracker

For prd.json task files:

OptionTypeDescription
pathstringPath to prd.json file

Beads-BV Tracker

For Beads issues with BV triage:

OptionTypeDescription
epicIdstringEpic ID to filter tasks

Beads Tracker

For basic Beads integration:

OptionTypeDescription
epicIdstringEpic ID to filter tasks

Error Handling

Controls how Ralph responds to task failures.

TOML
[errorHandling]
strategy = "skip"
maxRetries = 3
retryDelayMs = 5000
continueOnNonZeroExit = false
OptionTypeDefaultDescription
strategystring"skip"Error handling strategy
maxRetriesnumber3Max retry attempts (0-10)
retryDelayMsnumber5000Delay between retries (0-300000 ms)
continueOnNonZeroExitbooleanfalseContinue if agent exits non-zero

Strategy Values

ValueDescription
"retry"Retry the task up to maxRetries times
"skip"Skip the failed task and continue to next
"abort"Stop execution immediately on failure
INFO

Use "abort" for CI pipelines where any failure should stop the build. Use "skip" for development where you want to see all issues.

Rate Limit Handling

Controls fallback behavior when the primary agent hits API rate limits.

TOML
fallbackAgents = ["opencode"]
 
[rateLimitHandling]
enabled = true
maxRetries = 3
baseBackoffMs = 5000
recoverPrimaryBetweenIterations = true
OptionTypeDefaultDescription
fallbackAgentsstring[][]Ordered list of fallback agents
rateLimitHandling.enabledbooleantrueEnable rate limit handling
rateLimitHandling.maxRetriesnumber3Retries before fallback (0-10)
rateLimitHandling.baseBackoffMsnumber5000Base backoff time (0-300000 ms)
rateLimitHandling.recoverPrimaryBetweenIterationsbooleantrueTry primary between iterations

Environment Variable Exclusion

Controls which environment variables are passed to agent subprocesses. This is essential when your shell environment contains API keys that conflict with the agent's authentication method.

The Problem

When you run ralph-tui from a directory containing a .env or .env.local file, runtimes like Bun or tools like direnv and dotenv-cli may automatically load these variables into your shell environment. If one of these variables is an API key (e.g., ANTHROPIC_API_KEY), the agent CLI will use it instead of your intended authentication method (like a Max subscription), causing unexpected billing.

Default Exclusion Patterns

Ralph TUI automatically excludes environment variables matching these patterns from agent subprocesses:

  • *_API_KEY — blocks ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.
  • *_SECRET_KEY — blocks AWS_SECRET_KEY, etc.
  • *_SECRET — blocks DB_SECRET, JWT_SECRET, etc.

These defaults are always active, even without any configuration. You'll see which variables are blocked (and which are allowed through) in the startup output of ralph-tui run, ralph-tui prime, ralph-tui doctor, and ralph-tui info.

INFO

The defaults protect against the most common accidental credential leakage. If no environment variables match these patterns, you'll see a message confirming the filter is active but found nothing to block.

envPassthrough: Allowing Specific Variables

If you need a blocked variable to reach the agent (e.g., when the agent genuinely needs the API key), use envPassthrough to override the exclusion:

TOML
# Allow ANTHROPIC_API_KEY through despite matching *_API_KEY
envPassthrough = ["ANTHROPIC_API_KEY"]

Passthrough supports glob patterns:

TOML
# Allow all *_API_KEY variables through
envPassthrough = ["*_API_KEY"]

envExclude: Additional Exclusions

The envExclude option adds patterns on top of the defaults. Use it to block variables not covered by the default patterns:

TOML
# Block tokens and passwords in addition to defaults
envExclude = ["*_TOKEN", "*_PASSWORD"]

Three-Layer Filtering

Environment variables are filtered through three layers (in order):

  1. Default patterns*_API_KEY, *_SECRET_KEY, *_SECRET (always applied)
  2. User envExclude — additional patterns you configure (stacked on defaults)
  3. envPassthrough — overrides both defaults and user excludes
process.env variables
  │
  ├─ Matches default pattern? ──── BLOCKED (unless in passthrough)
  ├─ Matches envExclude?      ──── BLOCKED (unless in passthrough)
  ├─ Matches envPassthrough?  ──── ALLOWED (overrides exclusion)
  └─ No pattern match         ──── ALLOWED (passed through)

Shorthand Configuration

Apply to the default agent with top-level settings:

TOML
agent = "claude"
envExclude = ["*_TOKEN"]
envPassthrough = ["ANTHROPIC_API_KEY"]

Per-Agent Configuration

Apply to specific agents in the [[agents]] array:

TOML
[[agents]]
name = "claude-max"
plugin = "claude"
# Uses defaults - ANTHROPIC_API_KEY is blocked
 
[[agents]]
name = "claude-api"
plugin = "claude"
envPassthrough = ["ANTHROPIC_API_KEY"]
# Explicitly allows the API key through for API-based auth

Glob Pattern Syntax

Both envExclude and envPassthrough patterns support glob-style wildcards:

PatternMatches
ANTHROPIC_API_KEYExact match only
*_API_KEYANTHROPIC_API_KEY, OPENAI_API_KEY, etc.
*_SECRETDB_SECRET, JWT_SECRET, etc.
AWS_*All AWS environment variables
*TOKEN*Any variable containing "TOKEN"

Common Use Cases

Use Max subscription (default behavior, no config needed):

TOML
# ANTHROPIC_API_KEY is blocked by default
agent = "claude"

Explicitly use API key authentication:

TOML
agent = "claude"
envPassthrough = ["ANTHROPIC_API_KEY"]

Block additional sensitive variables:

TOML
envExclude = ["*_TOKEN", "*_PASSWORD", "DATABASE_URL"]

Multiple agents with different auth methods:

TOML
[[agents]]
name = "claude-max"
plugin = "claude"
# Default: ANTHROPIC_API_KEY blocked, uses Max subscription
 
[[agents]]
name = "claude-api"
plugin = "claude"
envPassthrough = ["ANTHROPIC_API_KEY"]
# Uses API key from environment

Diagnostics

Run ralph-tui doctor to see which variables are blocked vs. allowed:

Env filter:
  Blocked:     ANTHROPIC_API_KEY, OPENAI_API_KEY
  Passthrough: (none)

Or if nothing matches:

Env filter: no vars matched exclusion patterns (*_API_KEY, *_SECRET_KEY, *_SECRET)
INFO

If you're experiencing unexpected API credit usage while using a Max subscription, run ralph-tui doctor to verify that ANTHROPIC_API_KEY is listed under "Blocked". If it's not, check whether Bun is loading it from a .env file.

Notifications

Configure desktop notifications for iteration events.

TOML
[notifications]
enabled = true
sound = "off"
OptionTypeDefaultDescription
enabledbooleantrueEnable desktop notifications
soundstring"off"Notification sound mode

Sound Mode Values

ValueDescription
"off"No sound
"system"Use OS default notification sound
"ralph"Play random Ralph Wiggum sound clips

Parallel Execution

Configure parallel execution behavior.

TOML
[parallel]
mode = "never"
maxWorkers = 3
directMerge = false
OptionTypeDefaultDescription
modestring"never"Execution mode
maxWorkersnumber3Maximum concurrent workers
directMergebooleanfalseMerge directly to current branch (vs session branch)
worktreeDirstring".ralph-tui/worktrees"Directory for git worktrees

Mode Values

ValueDescription
"auto"Analyze task dependencies; use parallel when beneficial
"always"Force parallel execution regardless of dependency analysis
"never"Disable parallel execution; always run sequentially

CLI Flags

FlagDescription
--serial, --sequentialForce sequential (overrides config)
--parallelForce parallel with default workers
--parallel NForce parallel with N workers
--direct-mergeMerge directly to current branch

See the Parallel Execution guide for detailed documentation.

Custom Skills Directory

Configure a skills_dir to use custom PRD skills with the --prd-skill flag:

TOML
skills_dir = "/path/to/my-skills"

Skills Directory Structure

Skills must be folders inside skills_dir containing a SKILL.md file:

my-skills/
├── custom-prd-skill/
│   └── SKILL.md
├── another-skill/
│   └── SKILL.md

Using Custom Skills

Bash
# Use a custom skill with create-prd
ralph-tui create-prd --chat --prd-skill custom-prd-skill
INFO

Using --prd-skill requires skills_dir to be set in your config file. The command will fail with a clear error if skills_dir is not configured.

PRD Format Requirements for Custom Skills

Custom skills must generate PRDs compatible with task creation. Required format:

Markdown
# Feature Name
 
## Quality Gates (optional but recommended)
 
These commands must pass for every user story:
- `bun run typecheck`
- `bun run lint`
 
## User Stories
 
### US-001: Story Title
 
**As a** [user type]
**I want** [capability]
**So that** [benefit]
 
#### Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
 
### US-002: Another Story
...
INFO

If a custom skill generates a PRD without user stories matching ### US-XXX: pattern, task creation will fail with a clear error message.

CLI Flag Reference

These flags override config file settings. Use with any execution command.

Execution Options

FlagShortTypeDescription
--iterations <n>-nnumberMax iterations
--delay <ms>numberIteration delay
--output-dir <path>stringOutput directory
--progress-file <path>stringProgress file path
--headlessbooleanRun without TUI
--no-setupbooleanSkip setup check

Agent Options

FlagShortTypeDescription
--agent <name>-astringAgent to use
--model <model>-mstringModel override

Tracker Options

FlagShortTypeDescription
--tracker <name>-tstringTracker to use
--epic <id>-estringEpic ID (beads trackers)
--prd <path>-pstringPRD file path (json tracker)

Error Handling Options

FlagTypeDescription
--on-error <strategy>stringError strategy (retry/skip/abort)
--max-retries <n>numberMax retry attempts

Prompt Options

FlagTypeDescription
--prompt <path>stringCustom prompt template

Prompt Template Precedence

Ralph TUI resolves prompt templates in this order (first match wins):

PrioritySourceDescription
1CLI or config path--prompt <path> flag or prompt_template in config
2Project template.ralph-tui-prompt.hbs or path in .ralph-tui/config.toml
3User template~/.config/ralph-tui/prompt.md or prompt-{tracker}.md
4Built-in defaultBundled fallback template for the tracker type
INFO

Use ralph-tui template show to see which template would be used, and ralph-tui template init to scaffold a custom template at the appropriate location.

Notification Options

FlagTypeDescription
--notifybooleanEnable notifications
--no-notifybooleanDisable notifications

Validation Constraints

All numeric options have validation constraints:

OptionMinMax
maxIterations01000
iterationDelay0300000
errorHandling.maxRetries010
errorHandling.retryDelayMs0300000
rateLimitHandling.maxRetries010
rateLimitHandling.baseBackoffMs0300000

Environment Variables

Ralph TUI respects these environment variables:

VariableDescription
XDG_CONFIG_HOMEOverride global config location (default: ~/.config)

Environment Variable Filtering

Ralph TUI automatically excludes variables matching *_API_KEY, *_SECRET_KEY, and *_SECRET from agent subprocesses. Use envPassthrough to allow specific variables through, or envExclude to block additional patterns:

TOML
# Allow a specific key through (overrides default block)
envPassthrough = ["ANTHROPIC_API_KEY"]
 
# Block additional patterns beyond defaults
envExclude = ["*_TOKEN", "DATABASE_URL"]

See Environment Variable Exclusion for the full three-layer filtering details.

Next Steps