diff --git a/.claude/checkpoints/1755010995.json b/.claude/checkpoints/1755010995.json new file mode 100644 index 0000000000..bd7705b338 --- /dev/null +++ b/.claude/checkpoints/1755010995.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250812-150315", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/swarm.js", "timestamp": "2025-08-12T15:03:15Z", "type": "pre-edit", "original_branch": "alpha-89"} diff --git a/.claude/checkpoints/1755010997.json b/.claude/checkpoints/1755010997.json new file mode 100644 index 0000000000..180cb01719 --- /dev/null +++ b/.claude/checkpoints/1755010997.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250812-150316", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/swarm.js", "timestamp": "2025-08-12T15:03:17Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 ++++++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +++--- .claude/checkpoints/task-1755010934.json | 1 + src/cli/simple-commands/swarm.js | 23 +++++++++++++---------- 5 files changed, 42 insertions(+), 14 deletions(-) "} diff --git a/src/cli/simple-commands/swarm.js b/src/cli/simple-commands/swarm.js index 675c347031..56327e916e 100644 --- a/src/cli/simple-commands/swarm.js +++ b/src/cli/simple-commands/swarm.js @@ -778,18 +778,21 @@ The swarm should be self-documenting - use memory_store to save all important in console.log('🚀 Launching Claude Code with Swarm Coordination'); console.log('─'.repeat(60)); - // Pass the prompt directly as an argument to claude - const claudeArgs = [swarmPrompt]; + // Build arguments properly: for interactive mode, prompt can be first + const claudeArgs = []; - // Add auto-permission flag by default for swarm mode (unless explicitly disabled) + // Add auto-permission flag first if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) { claudeArgs.push('--dangerously-skip-permissions'); console.log('🔓 Using --dangerously-skip-permissions by default for seamless swarm execution'); } + // Add the prompt (for interactive mode, position doesn't matter as much) + claudeArgs.push(swarmPrompt); + // --claude flag means interactive mode, so don't add non-interactive flags - // Spawn claude with the prompt as the first argument (exactly like hive-mind does) + // Spawn claude with properly ordered arguments const claudeProcess = spawn('claude', claudeArgs, { stdio: 'inherit', shell: false,