{"record":{"id":"7b1425e7fd97450b","repo":"thedotmack/claude-mem","slug":"transcript-watch-config-not-found-resolvedpath","errorCode":null,"errorMessage":"Transcript watch config not found: ${resolvedPath}","messagePattern":"Transcript watch config not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/services/transcripts/config.ts","lineNumber":67,"sourceCode":"      ...config,\n      watches,\n    },\n    removed: config.watches.length - watches.length,\n  };\n}\n\nexport function expandHomePath(inputPath: string): string {\n  if (!inputPath) return inputPath;\n  if (inputPath.startsWith('~')) {\n    return join(homedir(), inputPath.slice(1));\n  }\n  return inputPath;\n}\n\nexport function loadTranscriptWatchConfig(path = DEFAULT_CONFIG_PATH): TranscriptWatchConfig {\n  const resolvedPath = expandHomePath(path);\n  if (!existsSync(resolvedPath)) {\n    throw new Error(`Transcript watch config not found: ${resolvedPath}`);\n  }\n  const raw = readFileSync(resolvedPath, 'utf-8');\n  const parsed = JSON.parse(raw) as TranscriptWatchConfig;\n  if (!parsed.version || !parsed.watches) {\n    throw new Error(`Invalid transcript watch config: ${resolvedPath}`);\n  }\n  if (!parsed.stateFile) {\n    parsed.stateFile = DEFAULT_STATE_PATH;\n  }\n  return parsed;\n}\n\nexport function writeSampleConfig(path = DEFAULT_CONFIG_PATH): void {\n  const resolvedPath = expandHomePath(path);\n  const dir = dirname(resolvedPath);\n  if (!existsSync(dir)) {\n    mkdirSync(dir, { recursive: true });\n  }","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d768ba364302d12b76e69e4f021f0bb1d2d50ed6/src/services/transcripts/config.ts#L49-L85","documentation":"Thrown by loadTranscriptWatchConfig when the transcript watch config file does not exist at the resolved path (after ~ expansion). The loader refuses to proceed without a config file rather than silently using defaults, so transcript ingestion cannot start until a config is present.","triggerScenarios":"loadTranscriptWatchConfig(path) calls existsSync(resolvedPath) and it returns false. The default path comes from paths.transcriptsConfig(); a custom path may be passed. ~ is expanded via expandHomePath before the check.","commonSituations":"First run before onboarding has written the config, the config file deleted/moved, a custom path argument that points nowhere, or HOME not set so ~ expansion resolves oddly. Common right after install if the sample config bootstrap was skipped.","solutions":["Generate the sample config by calling writeSampleConfig() (or the CLI equivalent) to create the file at the resolved path.","Verify the resolved path printed in the message and ensure its parent directory exists and is writable.","If using a custom path, confirm it is absolute or correctly ~-prefixed and points to an existing file.","Re-run onboarding / setup which writes the default transcript watch config."],"exampleFix":"// before: loadTranscriptWatchConfig()  // file absent -> throws\n// after:  if (!existsSync(resolved)) writeSampleConfig(); loadTranscriptWatchConfig();","handlingStrategy":"validation","validationCode":"import { existsSync } from 'fs';\nimport { loadTranscriptWatchConfig, writeSampleConfig, expandHomePath, DEFAULT_CONFIG_PATH } from './config';\nfunction loadOrInitConfig(path = DEFAULT_CONFIG_PATH) {\n  const resolved = expandHomePath(path);\n  if (!existsSync(resolved)) writeSampleConfig(resolved);\n  return loadTranscriptWatchConfig(resolved);\n}","typeGuard":null,"tryCatchPattern":"try { config = loadTranscriptWatchConfig(path); }\ncatch (e) {\n  if (e instanceof Error && e.message.startsWith('Transcript watch config not found')) {\n    writeSampleConfig(path); // bootstrap then retry\n    config = loadTranscriptWatchConfig(path);\n    return;\n  }\n  throw e;\n}","preventionTips":["Run the onboarding step that writes the sample config before starting the watcher.","Store the config under a stable path (paths.transcriptsConfig()) and back it up.","Check existsSync before loadTranscriptWatchConfig and auto-bootstrap if absent."],"tags":["transcripts","config","filesystem","startup","onboarding"],"backgroundTag":null,"analyzedSha":"d768ba364302d12b76e69e4f021f0bb1d2d50ed6","analyzedAt":"2026-08-12T23:52:55.241Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}