{"record":{"id":"c25b4ee6c80e2f12","repo":"thedotmack/claude-mem","slug":"missing-schema-for-watch","errorCode":null,"errorMessage":"Missing schema for watch","messagePattern":"Missing schema for watch","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/transcripts/watcher.ts","lineNumber":137,"sourceCode":"      await this.setupWatch(watch);\n    }\n  }\n\n  stop(): void {\n    for (const tailer of this.tailers.values()) {\n      tailer.close();\n    }\n    this.tailers.clear();\n    for (const watcher of this.rootWatchers) {\n      watcher.close();\n    }\n    this.rootWatchers = [];\n  }\n\n  private async setupWatch(watch: WatchTarget): Promise<void> {\n    const schema = this.resolveSchema(watch);\n    if (!schema) {\n      logger.warn('TRANSCRIPT', 'Missing schema for watch', { watch: watch.name });\n      return;\n    }\n\n    const resolvedPath = expandHomePath(watch.path);\n    const files = this.resolveWatchFiles(resolvedPath);\n\n    for (const filePath of files) {\n      await this.addTailer(filePath, watch, schema);\n    }\n\n    const watchRoot = this.deepestNonGlobAncestor(resolvedPath);\n    if (!watchRoot || !existsSync(watchRoot)) {\n      logger.debug('TRANSCRIPT', 'Watch root does not exist, skipping fs.watch', { watch: watch.name, watchRoot });\n      return;\n    }\n\n    try {\n      const watcher = fsWatch(watchRoot, { recursive: true, persistent: true }, (event, name) => {","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/services/transcripts/watcher.ts#L119-L155","documentation":"The transcript watcher could not resolve a schema for the configured WatchTarget (resolveSchema returned null), so it skips setting up that watch entirely. The watch is silently (warn-level) not started, and no files are tailed for it.","triggerScenarios":"start -> setupWatch with a watch whose name/type has no registered schema — e.g. a custom watch entry in the transcript config JSON for an unsupported tool, or a typo in the watch name.","commonSituations":"User hand-edits the transcript watch config adding a watch for an unrecognized tool; new claude-mem version renamed/dropped a schema while an old config still references it; config file copied between machines with different supported watch types.","solutions":["Check watch.name against the schemas the watcher supports and fix the typo/name.","Remove the unsupported watch entry from the transcript watch config.","Upgrade claude-mem if the schema exists in a newer release.","If adding a custom tool, implement/register its schema before configuring the watch."],"exampleFix":"// before (config)\n{ \"name\": \"cluade\", \"path\": \"~/.claude/projects\" }\n// after\n{ \"name\": \"claude\", \"path\": \"~/.claude/projects\" }","handlingStrategy":"validation","validationCode":"const SUPPORTED_SCHEMAS = ['claude','codex','gemini'];\nif (!SUPPORTED_SCHEMAS.includes(watch.name)) {\n  console.error(`Unsupported watch: ${watch.name}`);\n}","typeGuard":"function hasSchema(watch: WatchTarget): boolean {\n  return resolveSchema(watch) !== null;\n}","tryCatchPattern":null,"preventionTips":["Validate the transcript watch config against supported watch names before saving","Copy configs only between installs of the same version","Check changelogs for renamed/dropped watch schemas when upgrading"],"tags":["config","transcripts","watcher"],"backgroundTag":"schema-validation-failed","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"}