{"record":{"id":"ef6be0b1b825ef5a","repo":"tinyhumansai/openhuman","slug":"daemonlifecycle-max-reconnection-attempts-reache","errorCode":null,"errorMessage":"[DaemonLifecycle] Max reconnection attempts reached","messagePattern":"\\[DaemonLifecycle\\] Max reconnection attempts reached","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/hooks/useDaemonLifecycle.ts","lineNumber":108,"sourceCode":"        console.error('[DaemonLifecycle] Auto-start error:', error);\n        incrementConnectionAttempts(uid);\n      } finally {\n        setIsRecovering(uid, false);\n      }\n    }\n  }, []);\n\n  // Retry connection with exponential backoff\n  const scheduleRetry = useCallback(() => {\n    const { connectionAttempts, status, isRecovering } = latestLifecycleRef.current;\n\n    if (!isTauri() || !isMountedRef.current || isRecovering) {\n      return;\n    }\n\n    // Don't retry if we've exceeded max attempts\n    if (connectionAttempts >= MAX_RECONNECTION_ATTEMPTS) {\n      console.warn('[DaemonLifecycle] Max reconnection attempts reached');\n      return;\n    }\n\n    // Don't retry if daemon is already running or starting\n    if (status === 'running' || status === 'starting') {\n      return;\n    }\n\n    const retryDelay = calculateRetryDelay(connectionAttempts + 1);\n    console.log(\n      `[DaemonLifecycle] Scheduling retry attempt ${connectionAttempts + 1} in ${retryDelay}ms`\n    );\n\n    // Clear existing timeout\n    if (retryTimeoutRef.current) {\n      clearTimeout(retryTimeoutRef.current);\n    }\n","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/hooks/useDaemonLifecycle.ts#L90-L126","documentation":"The daemon lifecycle hook's retry budget is exhausted: connectionAttempts reached MAX_RECONNECTION_ATTEMPTS, so scheduleRetry stops scheduling further exponential-backoff retries. The daemon remains disconnected and no automatic recovery will occur — the UI continues to show the disconnected state until the user manually restarts (or the app remounts the hook, resetting attempts).","triggerScenarios":"Thrown at app/src/hooks/useDaemonLifecycle.ts:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the UI's manual restart/connect action for the daemon","Check why every retry failed — core/daemon logs at the retry timestamps carry the underlying errors","Resolve the root cause (port conflict, crashed service, permissions) before restarting, or the budget exhausts again","Restarting the app resets connection attempts and re-runs auto-start"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}