{"record":{"id":"7336acecd21aa8d0","repo":"thedotmack/claude-mem","slug":"uvx-executable-not-found-for-chroma-mcp-uvxspawncommand","errorCode":null,"errorMessage":"uvx executable not found for chroma-mcp (${uvxSpawnCommand})","messagePattern":"uvx executable not found for chroma-mcp \\((.+?)\\)","errorType":"exception","errorClass":"ChromaUnavailableError","httpStatus":null,"severity":"error","filePath":"src/services/sync/ChromaMcpManager.ts","lineNumber":230,"sourceCode":"    this.assertConnectionNotCancelled(connectionGeneration);\n\n    const localChromaDataDir = this.getLocalPersistentChromaDataDir();\n    const commandArgs = this.buildCommandArgs(localChromaDataDir);\n    const uvxPreflightEnv = ChromaMcpManager.getUvxPreflightEnv();\n    getSupervisor().assertCanSpawn('chroma mcp');\n\n    // Spawn uvx DIRECTLY (no `cmd.exe` shell wrapper). On Windows, routing through\n    // cmd.exe makes it parse the `>`/`<` in the dep-override specs as shell\n    // redirection before uvx sees them; a shell-less spawn passes them literally.\n    // resolveUvxCommand returns the absolute uvx.exe path on Windows (Node won't\n    // PATHEXT-resolve a bare `uvx`) and bare `uvx` elsewhere (#2696).\n    const uvxSpawnCommand = ChromaMcpManager.resolveUvxCommand();\n    const uvxSpawnArgs = commandArgs;\n\n    if (!ChromaMcpManager.isUvxAvailable(uvxSpawnCommand, uvxPreflightEnv, process.platform)) {\n      const message = `uvx executable not found for chroma-mcp (${uvxSpawnCommand})`;\n      recordUvxVectorSearchUnavailable(message);\n      throw new ChromaUnavailableError(message);\n    }\n\n    const spawnEnvironment = this.getSpawnEnv(uvxPreflightEnv);\n\n    await this.prewarmChromaMcp(uvxSpawnCommand, uvxSpawnArgs, spawnEnvironment, connectionGeneration);\n    this.assertConnectionNotCancelled(connectionGeneration);\n\n    clearDependencyStatus('uvx');\n\n    logger.info('CHROMA_MCP', 'Connecting to chroma-mcp via MCP stdio', {\n      command: uvxSpawnCommand,\n      args: uvxSpawnArgs.join(' ')\n    });\n\n    try {\n      if (localChromaDataDir) {\n        this.acquireChromaWriterLock(localChromaDataDir);\n      }","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/services/sync/ChromaMcpManager.ts#L212-L248","documentation":"During connectInternal, the manager preflights the uvx command (resolved via resolveUvxCommand, typically 'uvx' or an absolute path). If isUvxAvailable reports the executable cannot be run on the current platform/env, it records vector-search unavailability and throws ChromaUnavailableError naming the resolved command.","triggerScenarios":"Starting a chroma-mcp connection when uvx (from the uv toolchain) is not installed, is not on PATH, the resolved path no longer exists, or the preflight environment (custom PATH/env) hides it.","commonSituations":"Fresh machines or CI containers without uv installed; Claude-mem's auto-installer skipped or failed; running the app under a daemon/systemd unit whose PATH differs from the interactive shell; CLAUDE_MEM_CHROMA_MODE pointing at remote/local variants that still need uvx.","solutions":["Install uv (e.g. curl -LsSf https://astral.sh/uv/install.sh | sh) so uvx is on PATH.","Ensure the process's PATH includes the uv install dir (~/.local/bin) or set the resolved uvx path in settings.","Verify with `which uvx` in the same environment the app runs in (daemons often have a different PATH).","If vector search is not needed, disable the Chroma/remote-sync feature so connection is never attempted."],"exampleFix":"// before (daemon unit)\nExecStart=/usr/bin/node server.js\n// after\nEnvironment=\"PATH=/home/user/.local/bin:/usr/bin:/bin\"\nExecStart=/usr/bin/node server.js","handlingStrategy":"fallback","validationCode":"import { execFileSync } from 'child_process';\nfunction uvxAvailable(): boolean {\n  try { execFileSync('uvx', ['--version'], { stdio: 'ignore' }); return true; }\n  catch { return false; }\n}\nif (!uvxAvailable()) skipVectorSync();","typeGuard":null,"tryCatchPattern":"try {\n  await manager.ensureConnected();\n} catch (e) {\n  if (e instanceof ChromaUnavailableError && e.message.includes('uvx executable not found')) {\n    logger.error('Install uv/uvx or disable Chroma vector search');\n    disableVectorSearchLocally();\n  } else throw e;\n}","preventionTips":["Install uv (providing uvx) as part of setup/CI images.","Ensure daemon/systemd services inherit a PATH containing the uv install directory.","Add a startup healthcheck that verifies uvx before enabling vector sync."],"tags":["chroma","dependency","path","uvx"],"backgroundTag":"missing-dependency","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}