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: File edits

rUv5202bfdf9f99
diff --git a/v3/@claude-flow/cli/src/mcp-server.ts b/v3/@claude-flow/cli/src/mcp-server.ts
index 63b29e6d9f..fa20d01750 100644
--- a/v3/@claude-flow/cli/src/mcp-server.ts
+++ b/v3/@claude-flow/cli/src/mcp-server.ts
@@ -242,11 +242,17 @@ export class MCPServerManager extends EventEmitter {
metrics?: Record<string, number>;
}> {
if (this.options.transport === 'stdio') {
- // For stdio, just check if process is running
+ // For stdio, check if process is running
const pid = await this.readPidFile();
- return {
- healthy: pid !== null && this.isProcessRunning(pid),
- };
+ if (pid === null) {
+ return { healthy: false, error: 'No PID file found' };
+ }
+ if (!this.isProcessRunning(pid)) {
+ // Clean up stale PID file
+ await this.removePidFile();
+ return { healthy: false, error: 'Process not running (cleaned up stale PID)' };
+ }
+ return { healthy: true };
}
// For HTTP/WebSocket, make health check request