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
- Workflow Execution: Workflows load and execute properly
- Claude Integration: Claude CLI instances are spawned correctly
- Stream-JSON Output: Proper flags are passed (
--print --output-format stream-json --verbose) - Permission Handling:
--dangerously-skip-permissionsflag added for automated execution - 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
- The workflow executor spawns Claude CLI instances with the correct flags
- Each task is assigned to a Claude instance with its specific prompt
- Claude executes in non-interactive mode with stream-json output
- 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:
- Spawns Claude with:
claude --print --output-format stream-json --verbose --dangerously-skip-permissions "[prompt]" - Captures stdout/stderr from each Claude instance
- Parses JSON events and forwards them with agent context
- But the spawned Claude instances' actual work output isn't being captured/displayed
Recommendation
For true non-interactive automation with visible progress, consider:
- Using simulation mode (without --claude flag) for testing workflows
- Running Claude in interactive mode to see actual execution
- Implementing better stdout capture from spawned Claude processes
- Adding file system monitoring to verify task completion
Testing
To verify Claude is actually working (even if output isn't visible):
- Check if files are created after workflow completion
- Monitor process activity during execution
- 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.