Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

πŸ”– Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/hive-mind.js

rUve91bb60db10a
diff --git a/.claude/checkpoints/task-1754486851.json b/.claude/checkpoints/task-1754486851.json
new file mode 100644
index 0000000000..39813640e3
--- /dev/null
+++ b/.claude/checkpoints/task-1754486851.json
@@ -0,0 +1 @@
+{"checkpoint": "task-20250806-132730", "task": "swarm works, but hive-mind non-interactive still opens interactive mode when running ./claude-flow h", "timestamp": "2025-08-06T13:27:31Z", "commit": "2c98d7b2982ccc38d532426eacbdd742daad4208", "github_release": "true"}
diff --git a/src/cli/simple-commands/hive-mind.js b/src/cli/simple-commands/hive-mind.js
index efe763f737..6a0c219266 100644
--- a/src/cli/simple-commands/hive-mind.js
+++ b/src/cli/simple-commands/hive-mind.js
@@ -2000,22 +2000,34 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers,
}
if (claudeAvailable && !flags.dryRun) {
+ // Check if we should run in non-interactive mode
+ // --claude flag forces interactive mode, otherwise respect --non-interactive
+ const isNonInteractive = !flags.claude && (flags['non-interactive'] || flags.nonInteractive);
+
// Pass the prompt directly as an argument to claude
- // Remove --print to allow interactive session
const claudeArgs = [hiveMindPrompt];
// Add auto-permission flag by default for hive-mind mode (unless explicitly disabled)
if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) {
claudeArgs.push('--dangerously-skip-permissions');
- console.log(
- chalk.yellow(
- 'πŸ”“ Using --dangerously-skip-permissions by default for seamless hive-mind execution',
- ),
- );
+ if (!isNonInteractive) {
+ console.log(
+ chalk.yellow(
+ 'πŸ”“ Using --dangerously-skip-permissions by default for seamless hive-mind execution',
+ ),
+ );
+ }
+ }
+
+ // Add non-interactive flags if needed
+ if (isNonInteractive) {
+ claudeArgs.push('-p'); // Print mode
+ claudeArgs.push('--output-format', 'stream-json'); // JSON streaming
+ claudeArgs.push('--verbose'); // Verbose output
+ console.log(chalk.cyan('πŸ€– Running in non-interactive mode'));
}
// Spawn claude with the prompt as the first argument
- // Use 'inherit' to allow interactive session
const claudeProcess = childSpawn('claude', claudeArgs, {
stdio: 'inherit',
shell: false,