Files
ruflo/non-interactive-summary.md
T

2.7 KiB

Claude-Flow Non-Interactive Mode Summary

Current Status

The --claude --non-interactive mode for automation workflows has been implemented with the following features:

✅ What's Working

  1. Workflow Execution: Workflows load and execute properly
  2. Claude Integration: Claude CLI instances are spawned correctly
  3. Stream-JSON Output: Proper flags are passed (--print --output-format stream-json --verbose)
  4. Permission Handling: --dangerously-skip-permissions flag added for automated execution
  5. Process Management: Claude instances are tracked and cleaned up properly

🔍 What's Happening

When you run:

npx claude-flow automation run-workflow hello-world-test.json --claude --non-interactive
  1. The workflow executor spawns Claude CLI instances with the correct flags
  2. Each task is assigned to a Claude instance with its specific prompt
  3. Claude executes in non-interactive mode with stream-json output
  4. The processes run but the actual Claude output (tool uses, file creation) isn't visible in the console

📊 Output Format

The system correctly generates stream-json events:

  • System initialization events
  • Agent spawn events
  • Task execution events
  • Agent completion events

However, the actual Claude assistant messages and tool uses within each spawned instance aren't being surfaced to the main console output.

🎯 Expected vs Actual

Expected: See Claude's tool uses (Bash, Write, etc.) in the stream-json output Actual: Only see workflow orchestration events, not the actual work being done

Technical Details

The automation executor:

  1. Spawns Claude with: claude --print --output-format stream-json --verbose --dangerously-skip-permissions "[prompt]"
  2. Captures stdout/stderr from each Claude instance
  3. Parses JSON events and forwards them with agent context
  4. But the spawned Claude instances' actual work output isn't being captured/displayed

Recommendation

For true non-interactive automation with visible progress, consider:

  1. Using simulation mode (without --claude flag) for testing workflows
  2. Running Claude in interactive mode to see actual execution
  3. Implementing better stdout capture from spawned Claude processes
  4. Adding file system monitoring to verify task completion

Testing

To verify Claude is actually working (even if output isn't visible):

  1. Check if files are created after workflow completion
  2. Monitor process activity during execution
  3. Use shorter timeouts to avoid long waits

The framework is correctly set up for non-interactive execution, but the output streaming from spawned Claude instances needs enhancement for full visibility into the automation process.