π 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
rUve332f69033cd
diff --git a/.claude/checkpoints/task-1754223869.json b/.claude/checkpoints/task-1754223869.jsonnew file mode 100644index 0000000000..ef64c4ea09--- /dev/null+++ b/.claude/checkpoints/task-1754223869.json@@ -0,0 +1 @@+{"checkpoint": "task-20250803-122429", "task": "{{user_prompt}} ", "timestamp": "2025-08-03T12:24:29Z", "commit": "43604c8db507b4e393a4132d1942035b14a29b8e", "github_release": "true"}diff --git a/src/cli/simple-commands/swarm.js b/src/cli/simple-commands/swarm.jsindex c649f6bded..74745a3d6f 100644--- a/src/cli/simple-commands/swarm.js+++ b/src/cli/simple-commands/swarm.js@@ -768,15 +768,6 @@ The swarm should be self-documenting - use memory_store to save all important in// If --claude flag is used, force Claude Code even if CLI not availableif (flags && flags.claude) {- // Check if claude command exists- let claudeAvailable = false;- try {- execSync('which claude', { stdio: 'ignore' });- claudeAvailable = true;- } catch {- claudeAvailable = false;- }-console.log('π Launching Claude Flow Swarm System...');console.log(`π Objective: ${objective}`);console.log(`π― Strategy: ${strategy}`);@@ -801,7 +792,7 @@ The swarm should be self-documenting - use memory_store to save all important inconsole.log('π Using --dangerously-skip-permissions by default for seamless swarm execution');}- // Spawn claude with the prompt as the first argument+ // Spawn claude with the prompt as the first argument (exactly like hive-mind does)const claudeProcess = spawn('claude', claudeArgs, {stdio: 'inherit',shell: false,@@ -841,21 +832,19 @@ The swarm should be self-documenting - use memory_store to save all important inprocess.exit(code || 0);});- return;- } else {- // Claude CLI not available, provide instructions- console.log('β οΈ Claude CLI not found. Please install Claude Code:');- console.log(' https://claude.ai/download');- console.log('\nπ Once installed, copy this prompt into Claude Code:\n');- console.log('β'.repeat(80));- console.log(swarmPrompt);- console.log('β'.repeat(80));+ // Handle spawn errors (e.g., claude not found)+ claudeProcess.on('error', (err) => {+ if (err.code === 'ENOENT') {+ console.error('\nβ Claude Code CLI not found. Please install Claude Code:');+ console.error(' https://claude.ai/download');+ console.error('\nπ Swarm prompt saved to:', promptFile);+ console.error(' You can copy the prompt from the file and paste it into Claude Code.');+ } else {+ console.error('\nβ Failed to launch Claude Code:', err.message);+ }+ process.exit(1);+ });- // Save prompt to file for easy access- const promptFile = path.join(process.cwd(), '.claude-flow', `swarm-prompt-${Date.now()}.txt`);- await mkdirAsync(path.dirname(promptFile));- await writeTextFile(promptFile, swarmPrompt);- console.log(`\nπΎ Prompt saved to: ${promptFile}`);return;}