{"record":{"id":"42c0b1253b10fc93","repo":"thedotmack/claude-mem","slug":"chroma-mcp-uvx-prewarm-failed","errorCode":null,"errorMessage":"chroma-mcp uvx prewarm failed","messagePattern":"chroma-mcp uvx prewarm failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/sync/ChromaMcpManager.ts","lineNumber":714,"sourceCode":"        timeoutMs\n      );\n    });\n\n    try {\n      await Promise.race([exitPromise, timeoutPromise]);\n      this.assertConnectionNotCancelled(connectionGeneration);\n      logger.debug('CHROMA_MCP', 'chroma-mcp uvx prewarm completed');\n    } catch (error) {\n      if (error instanceof ChromaMcpConnectionCancelledError) {\n        logger.debug('CHROMA_MCP', 'chroma-mcp uvx prewarm cancelled during shutdown');\n        throw error;\n      }\n      this.assertConnectionNotCancelled(connectionGeneration);\n      const errorMessage = error instanceof Error ? error.message : String(error);\n      const pid = child.pid;\n      const stdout = stdoutTail();\n      const stderr = stderrTail();\n      logger.warn('CHROMA_MCP', 'chroma-mcp uvx prewarm failed', {\n        command,\n        args: args.join(' '),\n        timeoutMs,\n        ...(pid ? { pid } : {}),\n        error: errorMessage,\n        ...(stdout ? { stdoutTail: stdout } : {}),\n        ...(stderr ? { stderrTail: stderr } : {})\n      });\n\n      if (pid) {\n        try {\n          // Token from spawn time: by here the prewarm may already have exited\n          // (that is often WHY we are in this branch), so self-capture would\n          // read a replacement rather than the child we spawned.\n          await killProcessTree(pid, { expectedStartToken: prewarmTracked?.startToken ?? null });\n        } catch (killError) {\n          logger.debug('CHROMA_MCP', 'prewarm process tree kill finished (best-effort)', {\n            pid,","sourceCodeStart":696,"sourceCodeEnd":732,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/8bc631a71a487424b866756e43a6efa4574cc66b/src/services/sync/ChromaMcpManager.ts#L696-L732","documentation":"A best-effort background prewarm spawns uvx to resolve and warm the chroma-mcp package before first use. On failure it logs the command, args, timeout, pid, and stdout/stderr tails, tree-kills the child, and lets the normal first-use connection proceed. Cost is a slower first search, not lost functionality.","triggerScenarios":"prewarm timeoutMs exceeded during a cold PyPI download; uvx not found; package resolution error; the child exiting non-zero. A shutdown race is logged at debug level instead, so a warn here is a genuine spawn/run failure.","commonSituations":"First run on a slow or offline machine; restricted CI networks; corrupted uv cache.","solutions":["Inspect the stdoutTail/stderrTail fields in the log entry for the underlying failure","Run uvx chroma-mcp --help once interactively to populate the package cache","Verify uv is installed and reachable on the service environment's PATH","If timeouts dominate, increase the prewarm timeout or delay prewarm until the network is up"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Warm the uvx cache during install or deploy, not at runtime","Treat prewarm warnings as diagnostics — the first-use connect path is authoritative for availability","Keep uv on PATH so prewarm does not fail on spawn"],"tags":["chroma","uvx","prewarm","subprocess"],"backgroundTag":"subprocess-spawn-failed","analyzedSha":"8bc631a71a487424b866756e43a6efa4574cc66b","analyzedAt":"2026-08-20T23:58:13.836Z","contentChangedAt":"2026-08-20T23:58:13.836Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}