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

🔖 Checkpoint: Edit /workspaces/claude-code-flow/src/cli/simple-commands/stream-chain.js

rUve444d8b48d10
diff --git a/.claude/checkpoints/1755024563.json b/.claude/checkpoints/1755024563.json
new file mode 100644
index 0000000000..b771c86189
--- /dev/null
+++ b/.claude/checkpoints/1755024563.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250812-184923", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/stream-chain.js", "timestamp": "2025-08-12T18:49:23Z", "type": "pre-edit", "original_branch": "alpha-89"}
diff --git a/.claude/checkpoints/1755024565.json b/.claude/checkpoints/1755024565.json
new file mode 100644
index 0000000000..e907b49961
--- /dev/null
+++ b/.claude/checkpoints/1755024565.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250812-184925", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/stream-chain.js", "timestamp": "2025-08-12T18:49:25Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 490 ++++++++++++++++++++++++++++--- .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1755024546.json | 1 + .claude/checkpoints/1755024548.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/stream-chain.js | 39 ++- 7 files changed, 499 insertions(+), 40 deletions(-) "}
diff --git a/src/cli/simple-commands/stream-chain.js b/src/cli/simple-commands/stream-chain.js
index d40f665e62..2201a7e991 100644
--- a/src/cli/simple-commands/stream-chain.js
+++ b/src/cli/simple-commands/stream-chain.js
@@ -390,24 +390,21 @@ async function executeStreamStep(prompt, inputStream, isLast, flags = {}) {
console.log(` Debug: Executing: claude ${args.join(' ')}`);
}
- // Try exec instead of spawn for better compatibility
+ // Use exec with built-in timeout for better reliability
const command = `claude ${args.join(' ')}`;
exec(command, {
timeout: stepTimeout,
maxBuffer: 1024 * 1024 * 10 // 10MB buffer
}, (error, stdout, stderr) => {
- clearTimeout(timeoutId);
-
- if (timedOut) {
- return; // Already handled by timeout
+ if (resolved) {
+ return; // Already resolved
}
const duration = Date.now() - startTime;
if (error && error.code === 'TIMEOUT') {
// Handle timeout via exec
- timedOut = true;
console.log('⚠️ Claude CLI timed out, falling back to mock mode...');
mockStreamStep(prompt, inputStream, isLast, { ...flags, mock: true }, safeResolve, Date.now());
return;