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(statusline): remove Windows-breaking 2>/dev/null from CLI delegation

ruve803cb279513
diff --git a/.claude/helpers/statusline.cjs b/.claude/helpers/statusline.cjs
old mode 100644
new mode 100755
index 5751c656f4..7fa9bde679
--- a/.claude/helpers/statusline.cjs
+++ b/.claude/helpers/statusline.cjs
@@ -199,9 +199,19 @@ function getStatuslineData() {
// back to `npx --prefer-offline @claude-flow/cli` (no @latest); an existing
// but broken install (e.g. a stale marketplace checkout missing a bundled
// workspace dep) must not block trying the next one.
+ //
+ // No `2>/dev/null` here (deliberately) β€” the execSync call below already
+ // sets stdio: ['pipe','pipe','pipe'], which captures/discards stderr at the
+ // Node level regardless of shell. The redirect was redundant on POSIX and
+ // actively broke every candidate on Windows: cmd.exe (execSync's default
+ // shell there) doesn't understand /dev/null, so the CLI delegation always
+ // failed, silently degrading every render to buildLocalFallback() β€” 0%
+ // intelligence and an empty promo row (the memo cache that keeps the row
+ // populated across CLI hiccups is only ever written from a SUCCESSFUL
+ // delegation, so it could never get seeded on Windows either).
const cmds = resolveCliBinCandidates()
- .map((bin) => '"' + process.execPath + '" "' + bin + '" hooks statusline --json 2>/dev/null')
- .concat(['npx --prefer-offline @claude-flow/cli hooks statusline --json 2>/dev/null']);
+ .map((bin) => '"' + process.execPath + '" "' + bin + '" hooks statusline --json')
+ .concat(['npx --prefer-offline @claude-flow/cli hooks statusline --json']);
for (const cmd of cmds) {
try {
const raw = execSync(
diff --git a/v3/@claude-flow/cli/.claude/helpers/helpers.manifest.json b/v3/@claude-flow/cli/.claude/helpers/helpers.manifest.json
index 139886c50e..c5ca847b41 100644
--- a/v3/@claude-flow/cli/.claude/helpers/helpers.manifest.json
+++ b/v3/@claude-flow/cli/.claude/helpers/helpers.manifest.json
@@ -1,13 +1,12 @@
{
"manifest": {
- "version": "3.25.6",
+ "version": "3.23.0",
"files": {
"auto-memory-hook.mjs": "68be7e9a9eba7bf9c4e8a230db7bf61a243b965639f8504842799d6c6ca28762",
- "hook-handler.cjs": "887e99fbeb64f5ff64c85b74da3fbd9adc6b39907fd6a1044d4626db6fc4c042",
- "intelligence.cjs": "bd1f8e4b034944aee1df0391dc47ac2e8cc4b3aa542c65407a59d49620bbf76b",
- "statusline.cjs": "765f1af97a78f1c8ebf60ca63e67e490043e3c0322b7d63a438dd213e77e1672"
+ "hook-handler.cjs": "bc4d2d26823d49b3ab1dded2946b66369f1f67bd76b4c30dca9f3b6df3cca8f0",
+ "intelligence.cjs": "760cb82ed2000031abc1ac1fa90a014e7d91d93966e3aa4741b07ab7aff8d066"
}
},
- "signature": "jY9HPQhEBB2azzRSrBBuhFoB9u/Z4OMjJ3CriyEY6nk2XArfpENCYqDzvTc/bqCaYNcb338yZ6yXhw2SHXykBw==",
+ "signature": "of5l9RP68iPcmcC5dckDv+KIOiENJKifWxYKwQTwAiXiyRNNZuMwQ8y8Bd8+wGviTRxIzBfSuxL1nuJ/rX3xDQ==",
"algorithm": "ed25519"
}
diff --git a/v3/@claude-flow/cli/.claude/helpers/statusline.cjs b/v3/@claude-flow/cli/.claude/helpers/statusline.cjs
index 5751c656f4..7fa9bde679 100644
--- a/v3/@claude-flow/cli/.claude/helpers/statusline.cjs
+++ b/v3/@claude-flow/cli/.claude/helpers/statusline.cjs
@@ -199,9 +199,19 @@ function getStatuslineData() {
// back to `npx --prefer-offline @claude-flow/cli` (no @latest); an existing
// but broken install (e.g. a stale marketplace checkout missing a bundled
// workspace dep) must not block trying the next one.
+ //
+ // No `2>/dev/null` here (deliberately) β€” the execSync call below already
+ // sets stdio: ['pipe','pipe','pipe'], which captures/discards stderr at the
+ // Node level regardless of shell. The redirect was redundant on POSIX and
+ // actively broke every candidate on Windows: cmd.exe (execSync's default
+ // shell there) doesn't understand /dev/null, so the CLI delegation always
+ // failed, silently degrading every render to buildLocalFallback() β€” 0%
+ // intelligence and an empty promo row (the memo cache that keeps the row
+ // populated across CLI hiccups is only ever written from a SUCCESSFUL
+ // delegation, so it could never get seeded on Windows either).
const cmds = resolveCliBinCandidates()
- .map((bin) => '"' + process.execPath + '" "' + bin + '" hooks statusline --json 2>/dev/null')
- .concat(['npx --prefer-offline @claude-flow/cli hooks statusline --json 2>/dev/null']);
+ .map((bin) => '"' + process.execPath + '" "' + bin + '" hooks statusline --json')
+ .concat(['npx --prefer-offline @claude-flow/cli hooks statusline --json']);
for (const cmd of cmds) {
try {
const raw = execSync(
diff --git a/v3/@claude-flow/cli/__tests__/statusline-cost-display.test.ts b/v3/@claude-flow/cli/__tests__/statusline-cost-display.test.ts
index 0c5c10cd97..baab3056ee 100644
--- a/v3/@claude-flow/cli/__tests__/statusline-cost-display.test.ts
+++ b/v3/@claude-flow/cli/__tests__/statusline-cost-display.test.ts
@@ -149,3 +149,26 @@ describe('statusline trailing newline β€” breathing room before the input prompt
}
});
});
+
+describe('CLI delegation command is Windows-safe (no POSIX-only shell redirect)', () => {
+ // execSync already sets stdio: ['pipe','pipe','pipe'] on the delegation
+ // call, which captures/discards stderr at the Node level regardless of
+ // shell. A `2>/dev/null` in the command STRING is therefore redundant on
+ // POSIX and actively breaks every delegation candidate on Windows β€” cmd.exe
+ // (execSync's default shell there) doesn't understand /dev/null, so the
+ // CLI call always fails and every render silently degrades to
+ // buildLocalFallback(): 0% intelligence and (once the memo cache β€” which
+ // is only ever seeded by a SUCCESSFUL delegation β€” is empty) no promo row
+ // either. Pre-existing since the #2337 delegation-caching fix (2026-06-10);
+ // fixed here after a real Windows user hit exactly this symptom.
+ it('the node-bin and npx delegation commands carry no POSIX-only redirect', () => {
+ // Match the actual command-template lines, not the surrounding comments
+ // (one of which explains, in prose, that the redirect was removed β€” a
+ // naive whole-function substring check would false-negative on that).
+ const cmdLines = SCRIPT.split('\n').filter(
+ (l) => l.includes('hooks statusline --json') && !l.trim().startsWith('//'),
+ );
+ expect(cmdLines.length).toBeGreaterThanOrEqual(2); // node-bin candidates + npx fallback
+ for (const line of cmdLines) expect(line).not.toContain('2>/dev/null');
+ });
+});
diff --git a/v3/@claude-flow/cli/src/init/statusline-generator.ts b/v3/@claude-flow/cli/src/init/statusline-generator.ts
index de3ee09389..d7aa3aff80 100644
--- a/v3/@claude-flow/cli/src/init/statusline-generator.ts
+++ b/v3/@claude-flow/cli/src/init/statusline-generator.ts
@@ -226,9 +226,19 @@ function getStatuslineData() {
// back to \`npx --prefer-offline @claude-flow/cli\` (no @latest); an existing
// but broken install (e.g. a stale marketplace checkout missing a bundled
// workspace dep) must not block trying the next one.
+ //
+ // No \`2>/dev/null\` here (deliberately) β€” the execSync call below already
+ // sets stdio: ['pipe','pipe','pipe'], which captures/discards stderr at the
+ // Node level regardless of shell. The redirect was redundant on POSIX and
+ // actively broke every candidate on Windows: cmd.exe (execSync's default
+ // shell there) doesn't understand /dev/null, so the CLI delegation always
+ // failed, silently degrading every render to buildLocalFallback() β€” 0%
+ // intelligence and an empty promo row (the memo cache that keeps the row
+ // populated across CLI hiccups is only ever written from a SUCCESSFUL
+ // delegation, so it could never get seeded on Windows either).
const cmds = resolveCliBinCandidates()
- .map((bin) => '"' + process.execPath + '" "' + bin + '" hooks statusline --json 2>/dev/null')
- .concat(['npx --prefer-offline @claude-flow/cli hooks statusline --json 2>/dev/null']);
+ .map((bin) => '"' + process.execPath + '" "' + bin + '" hooks statusline --json')
+ .concat(['npx --prefer-offline @claude-flow/cli hooks statusline --json']);
for (const cmd of cmds) {
try {
const raw = execSync(