{"record":{"id":"3da086e75d92406f","repo":"thedotmack/claude-mem","slug":"health-check-failed","errorCode":null,"errorMessage":"Health check failed","messagePattern":"Health check failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/sync/ChromaMcpManager.ts","lineNumber":877,"sourceCode":"    this.mutationTail = run.then(() => undefined, () => undefined);\n\n    try {\n      return await run;\n    } finally {\n      this.pendingMutationCalls -= 1;\n    }\n  }\n\n  private static isMutationTool(toolName: string): boolean {\n    return CHROMA_MUTATION_TOOL_PATTERN.test(toolName);\n  }\n\n  async isHealthy(): Promise<boolean> {\n    try {\n      await this.callTool('chroma_list_collections', { limit: 1 });\n      return true;\n    } catch (error) {\n      logger.warn('CHROMA_MCP', 'Health check failed', {\n        error: error instanceof Error ? error.message : String(error)\n      });\n      return false;\n    }\n  }\n\n  async probeSemanticSearch(): Promise<{\n    ok: boolean;\n    stage: 'connect' | 'list' | 'query' | 'done';\n    error?: string;\n    collections?: number;\n    queryLatencyMs?: number;\n  }> {\n    let collections: number | undefined;\n\n    try {\n      const listResult: any = await this.callTool('chroma_list_collections', { limit: 100 });\n      if (Array.isArray(listResult)) {","sourceCodeStart":859,"sourceCodeEnd":895,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/8bc631a71a487424b866756e43a6efa4574cc66b/src/services/sync/ChromaMcpManager.ts#L859-L895","documentation":"isHealthy() pings Chroma with chroma_list_collections {limit:1}; any throw is logged and reported as false. It is a cheap gate used to decide whether vector search may be used — false means 'degraded, do not use Chroma now', not a fatal state.","triggerScenarios":"Chroma subprocess not started or connectable, MCP handshake failure, a tool-level error during the list call, or the manager being disposed while the check runs.","commonSituations":"Immediately after startup before first connect; after a chroma-mcp crash; monitoring dashboards polling during shutdown windows.","solutions":["Follow up with probeSemanticSearch() for a staged diagnosis (connect, list, query) when false","Check the chroma-mcp subprocess, uv environment, and recent CHROMA_MCP warnings","Retry after reconnect; treat persistent false as degraded mode and rely on FTS/LIKE fallbacks"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!(await chromaManager.isHealthy())) {\n  // skip the vector path now; use FTS/LIKE search\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate every vector-search feature on isHealthy() at call time, not once at boot","When false persists, escalate to probeSemanticSearch() for the failing stage","Monitor chroma-mcp subprocess liveness alongside this check"],"tags":["chroma","health-check","diagnostics"],"backgroundTag":"health-check-failed","analyzedSha":"8bc631a71a487424b866756e43a6efa4574cc66b","analyzedAt":"2026-08-20T23:58:13.836Z","contentChangedAt":"2026-08-20T23:58:13.836Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}