Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 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

fix(hive-mind): use --mcp-config=<path> to stop variadic prompt slurp (#1780) (#1800)

rUv23016fdfa544
diff --git a/v3/@claude-flow/cli/src/commands/hive-mind.ts b/v3/@claude-flow/cli/src/commands/hive-mind.ts
index 40cf625241..cc8bdedaa1 100644
--- a/v3/@claude-flow/cli/src/commands/hive-mind.ts
+++ b/v3/@claude-flow/cli/src/commands/hive-mind.ts
@@ -274,7 +274,12 @@ async function spawnClaudeCodeInstance(
}
}
if (mcpConfigPath) {
- claudeArgs.push('--mcp-config', mcpConfigPath);
+ // #1780 — Claude Code's `--mcp-config` is variadic; passing it as two
+ // argv tokens (`--mcp-config`, `<path>`) lets a later positional (the
+ // hive-mind prompt) be slurped as a second config file, producing
+ // `ENAMETOOLONG: name too long, open` once the prompt exceeds PATH_MAX.
+ // Use `=`-syntax so the flag stays attached to its single value.
+ claudeArgs.push(`--mcp-config=${mcpConfigPath}`);
output.printInfo(`Spawned worker MCP config: ${mcpConfigPath}`);
} else {
output.printWarning('No .mcp.json or ~/.claude.json found — spawned worker will not have mcp__ruflo__* tools (#1748 Issue 2). Pass --mcp-config <path> or run "ruflo init" to generate one.');