π 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/automation-executor.js
rUv221b28c47490
diff --git a/.claude/checkpoints/task-1754345020.json b/.claude/checkpoints/task-1754345020.jsonnew file mode 100644index 0000000000..08830500ca--- /dev/null+++ b/.claude/checkpoints/task-1754345020.json@@ -0,0 +1 @@+{"checkpoint": "task-20250804-220339", "task": "{{user_prompt}} ", "timestamp": "2025-08-04T22:03:40Z", "commit": "9fe524af2f1159c94e540e5600d1ddfdbc17590d", "github_release": "true"}diff --git a/src/cli/simple-commands/automation-executor.js b/src/cli/simple-commands/automation-executor.jsindex f79dd78181..7b9073bb5e 100644--- a/src/cli/simple-commands/automation-executor.js+++ b/src/cli/simple-commands/automation-executor.js@@ -139,53 +139,56 @@ export class WorkflowExecutor {if (!agents || agents.length === 0) {return;}-- console.log(`π€ Initializing ${agents.length} Claude CLI instances...`);- // In non-interactive mode, agents are spawned per task instead+ // Check if Claude CLI is available+ if (!await this.isClaudeAvailable()) {+ throw new Error('Claude CLI not found. Please install Claude Code: https://claude.ai/code');+ }+if (this.options.nonInteractive) {- console.log(`π Note: In non-interactive mode, Claude instances are spawned per task`);- console.log(`π Each task will launch its own Claude process with the specific prompt`);+ // Non-interactive mode: agents are spawned per task instead+ console.log(`π€ Non-interactive mode: Claude instances will be spawned per task`);+ console.log(`π Each task will launch its own Claude process with specific prompts`);return;- }-- for (const agent of agents) {+ } else {+ // Interactive mode: spawn single Claude instance with master coordination prompt+ console.log(`π€ Interactive mode: Initializing single Claude instance for workflow coordination...`);+try {- // Check if Claude CLI is available- if (!await this.isClaudeAvailable()) {- throw new Error('Claude CLI not found. Please install Claude Code: https://claude.ai/code');- }-- // Create agent-specific prompt- const agentPrompt = this.createAgentPrompt(agent);+ // Create master coordination prompt for all agents and workflow+ const masterPrompt = this.createMasterCoordinationPrompt(agents);- // Spawn Claude instance for this agent- const claudeProcess = await this.spawnClaudeInstance(agent, agentPrompt);+ // Spawn single Claude instance for workflow coordination+ const claudeProcess = await this.spawnClaudeInstance({+ id: 'master-coordinator',+ name: 'Workflow Coordinator',+ type: 'coordinator'+ }, masterPrompt);- this.claudeInstances.set(agent.id, {+ // Store as master coordinator+ this.claudeInstances.set('master-coordinator', {process: claudeProcess,- agent: agent,+ agent: { id: 'master-coordinator', name: 'Workflow Coordinator', type: 'coordinator' },status: 'active',- startTime: Date.now()+ startTime: Date.now(),+ agents: agents // Store agent definitions for reference});- console.log(` β ${agent.name} (${agent.type}) - PID: ${claudeProcess.pid}`);+ console.log(` β Master Workflow Coordinator (PID: ${claudeProcess.pid})`);+ console.log(` π― Coordinating ${agents.length} sub-agents via concurrent streams`);+ console.log(` π Agents: ${agents.map(a => a.name).join(', ')}`);} catch (error) {- console.error(` β Failed to initialize ${agent.name}: ${error.message}`);+ console.error(` β Failed to initialize master coordinator: ${error.message}`);this.errors.push({- type: 'agent_initialization',- agent: agent.id,+ type: 'master_coordinator_initialization',error: error.message,timestamp: new Date()});}++ console.log();}-- if (this.claudeInstances.size > 0) {- console.log(`β ${this.claudeInstances.size} Claude instances active`);- }- console.log();}/**