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

Merge branch 'pr-3497' into feat/release-3.56.0-batch

r27ed89b06de4
diff --cc v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts
index 321ef1a3ee,134355a751..73d454a8f9
--- a/v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts
+++ b/v3/@claude-flow/cli/src/mcp-tools/agent-execute-core.ts
@@@ -642,9 -627,10 +642,11 @@@ export async function executeAgentTask(
// the next-cheapest candidate that clears the quality bar. Budget is
// bounded by CLAUDE_FLOW_ROUTER_FALLBACK_MAX_RETRIES (default 1) so
// upstream outages don't cause retry storms.
- const fallbackBudget = Math.max(0, parseInt(process.env.CLAUDE_FLOW_ROUTER_FALLBACK_MAX_RETRIES ?? '1', 10) || 1);
+ const configuredFallbackBudget = parseInt(process.env.CLAUDE_FLOW_ROUTER_FALLBACK_MAX_RETRIES ?? '1', 10);
+ const fallbackBudget = Number.isNaN(configuredFallbackBudget) ? 1 : Math.max(0, configuredFallbackBudget);
const fallbackHistory: Array<{ modelId: string; error: string }> = [];
+ // Keep feedback for each completed attempt before switching model identity.
+ const failedAttempts: Array<{ model: ClaudeModel; modelId: string }> = [];
if (!result.success && agent.modelId && fallbackBudget > 0) {
const isRetryable = /\b(429|500|502|503|504|timeout|ECONNRESET|ETIMEDOUT)\b/i.test(result.error ?? '');
if (isRetryable) {