🌊 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
rUv5a90cc032b1d
diff --git a/.claude/checkpoints/1755117141.json b/.claude/checkpoints/1755117141.jsonnew file mode 100644index 0000000000..607b74302e--- /dev/null+++ b/.claude/checkpoints/1755117141.json@@ -0,0 +1 @@+{"branch": "checkpoint/pre-edit-20250813-203221", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/claude-telemetry.js", "timestamp": "2025-08-13T20:32:21Z", "type": "pre-edit", "original_branch": "alpha-89"}diff --git a/.claude/checkpoints/1755117143.json b/.claude/checkpoints/1755117143.jsonnew file mode 100644index 0000000000..ceae8261c6--- /dev/null+++ b/.claude/checkpoints/1755117143.json@@ -0,0 +1 @@+{"tag": "checkpoint-20250813-203223", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/claude-telemetry.js", "timestamp": "2025-08-13T20:32:23Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 1952 ++------------------------- .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/task-1755116945.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/claude-telemetry.js | 308 +++++ 6 files changed, 437 insertions(+), 1832 deletions(-) "}diff --git a/src/cli/simple-commands/swarm.js b/src/cli/simple-commands/swarm.jsindex 56327e916e..fea8a23a07 100644--- a/src/cli/simple-commands/swarm.js+++ b/src/cli/simple-commands/swarm.js@@ -792,11 +792,27 @@ The swarm should be self-documenting - use memory_store to save all important in// --claude flag means interactive mode, so don't add non-interactive flags- // Spawn claude with properly ordered arguments- const claudeProcess = spawn('claude', claudeArgs, {- stdio: 'inherit',- shell: false,- });+ // Spawn claude with telemetry tracking if enabled+ const useWrapper = process.env.CLAUDE_CODE_ENABLE_TELEMETRY === '1';++ if (useWrapper) {+ // Use telemetry wrapper to track tokens+ const { runClaudeWithTelemetry } = await import('./claude-telemetry.js');+ console.log(`📊 Telemetry enabled - tracking token usage...`);++ const result = await runClaudeWithTelemetry(claudeArgs, {+ sessionId: `swarm-${Date.now()}`,+ agentType: 'swarm-claude',+ });++ console.log('\n✓ Claude Code session completed with telemetry!');+ process.exit(result.code);+ } else {+ const claudeProcess = spawn('claude', claudeArgs, {+ stdio: 'inherit',+ shell: false,+ });+ }console.log('\n✓ Claude Code launched with swarm coordination prompt!');console.log(' The swarm coordinator will orchestrate all agent tasks');