mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
Claude Code's `--mcp-config <configs...>` flag is variadic, so passing it as two argv tokens lets a later positional argument — the hive-mind prompt itself — get slurped as a second config file path. Once the prompt grows past PATH_MAX (4000+ chars is normal for hive-mind), `open(prompt)` fails with `ENAMETOOLONG: name too long`, the worker never spawns, and `ruflo hive-mind spawn --claude` exits 1. Use `=`-syntax (`--mcp-config=<path>`) so the flag stays attached to its single value and the prompt is parsed as the prompt. Closes #1780.
This commit is contained in:
1 file changed
+6
-1
@@ -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.');
|
||||
|
||||
Reference in new issue
Block a user