🌊 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
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/swarm.js
rUv8c120b91f038
diff --git a/.claude/checkpoints/task-1755010934.json b/.claude/checkpoints/task-1755010934.jsonnew file mode 100644index 0000000000..d5f2229a04--- /dev/null+++ b/.claude/checkpoints/task-1755010934.json@@ -0,0 +1 @@+{"checkpoint": "task-20250812-150213", "task": "is ./claude-flow swarm "test" also injecting he prompt? ", "timestamp": "2025-08-12T15:02:14Z", "commit": "ee986183495948e65d62f63ef00f386547e94eee", "github_release": "true"}diff --git a/src/cli/simple-commands/swarm.js b/src/cli/simple-commands/swarm.jsindex baddbbc44f..675c347031 100644--- a/src/cli/simple-commands/swarm.js+++ b/src/cli/simple-commands/swarm.js@@ -893,10 +893,17 @@ The swarm should be self-documenting - use memory_store to save all important in// Continue with the default swarm behavior if not using --claude flag- // Pass the prompt directly as an argument to claude- const claudeArgs = [swarmPrompt];+ // Build arguments in correct order: flags first, then prompt+ const claudeArgs = [];- // Add auto-permission flag by default for swarm mode (unless explicitly disabled)+ // Add non-interactive flags FIRST if needed+ if (isNonInteractive) {+ claudeArgs.push('-p'); // Print mode+ claudeArgs.push('--output-format', 'stream-json'); // JSON streaming+ claudeArgs.push('--verbose'); // Verbose output+ }++ // Add auto-permission flag BEFORE the promptif (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) {claudeArgs.push('--dangerously-skip-permissions');if (!isNonInteractive) {@@ -906,14 +913,10 @@ The swarm should be self-documenting - use memory_store to save all important in}}- // 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- }+ // Add the prompt as the LAST argument+ claudeArgs.push(swarmPrompt);- // Spawn claude with the prompt as the first argument+ // Spawn claude with properly ordered argumentsconst claudeProcess = spawn('claude', claudeArgs, {stdio: 'inherit',shell: false,