{"record":{"id":"6200ceba80cb94f4","repo":"ruvnet/ruflo","slug":"mcp-flow-failed-falling-back-to-default-endpoin","errorCode":null,"errorMessage":"[mcp] flow failed, falling back to default endpoint","messagePattern":"\\[mcp\\] flow failed, falling back to default endpoint","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts","lineNumber":824,"sourceCode":"\t\t\t\t{ length: lastAssistantContent.length, loop },\n\t\t\t\t\"[mcp] final answer emitted (no tool_calls)\"\n\t\t\t);\n\t\t\treturn \"completed\";\n\t\t}\n\t\tlogger.warn({}, \"[mcp] exceeded tool-followup loops; falling back\");\n\t} catch (err) {\n\t\tconst msg = String(err ?? \"\");\n\t\tconst isAbort =\n\t\t\t(abortSignal && abortSignal.aborted) ||\n\t\t\tmsg.includes(\"AbortError\") ||\n\t\t\tmsg.includes(\"APIUserAbortError\") ||\n\t\t\tmsg.includes(\"Request was aborted\");\n\t\tif (isAbort) {\n\t\t\t// Expected on user stop; keep logs quiet and do not treat as error\n\t\t\tlogger.debug({}, \"[mcp] aborted by user\");\n\t\t\treturn \"aborted\";\n\t\t}\n\t\tlogger.warn({ err: msg }, \"[mcp] flow failed, falling back to default endpoint\");\n\t} finally {\n\t\t// ensure MCP clients are closed after the turn\n\t\tawait drainPool();\n\t}\n\n\treturn \"not_applicable\";\n}\n","sourceCodeStart":806,"sourceCodeEnd":832,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts#L806-L832","documentation":"Log warning in runMcpFlow: an exception escaped the MCP generation loop (and was not a user abort); the flow is abandoned and generation falls back to the default (non-MCP) endpoint.","triggerScenarios":"Thrown at ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/runMcpFlow.ts:824 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying MCP flow error logged before this message; fix the MCP server connection, tool listing, or model response causing the flow to fail."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}