-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Labels
bugSomething isn't workingSomething isn't workingpriority: P1High - Core featuresHigh - Core features
Description
Bug Description
When using CLAUDE_OUTPUT_FORMAT="text" in .ralphrc combined with --live or --monitor flags, Ralph fails with:
stdbuf: unrecognized option '--verbose'
Root Cause
In ralph_loop.sh lines 1047-1057, build_claude_command() is only called when CLAUDE_OUTPUT_FORMAT="json":
if [[ "$CLAUDE_OUTPUT_FORMAT" == "json" ]]; then
if build_claude_command "$PROMPT_FILE" "$loop_context" "$session_id"; then
use_modern_cli=true
fi
else
log_status "INFO" "Using legacy CLI mode (text output)"
fi
However, when LIVE_OUTPUT=true (lines 1065+), the code still tries to use CLAUDE_CMD_ARGS which is empty/uninitialized for text mode. This results in stdbuf -oL receiving --verbose as its first argument instead of the claude command.
Steps to Reproduce
Set .ralphrc: CLAUDE_OUTPUT_FORMAT="text"
Run: ralph --live or ralph --monitor
Observe error: stdbuf: unrecognized option '--verbose'
Expected Behavior
Either:
Call build_claude_command() for text mode too, OR
Disable live/monitor mode when text format is used, OR
Build LIVE_CMD_ARGS independently for text mode
Environment
Ralph version: v0.11.4
macOS with GNU coreutils
Claude Code CLI: 2.1.32Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority: P1High - Core featuresHigh - Core features