{"record":{"id":"ec94a005a25780d2","repo":"deepseek-ai/deepseek-harness","slug":"skill-filesystem-watcher-for-state-root-path-f","errorCode":null,"errorMessage":"skill-filesystem: watcher for ${state.root.path} failed: ${errorMessage(error)}","messagePattern":"skill-filesystem: watcher for (.+?) failed: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/skill/skill-filesystem/src/index.ts","lineNumber":559,"sourceCode":"\n  private handleWatchEvent(\n    state: RootWatchState,\n    mode: Extract<RootWatchMode, { kind: 'root' }>,\n    event: SkillWatchEvent,\n    path: string,\n  ): void {\n    const target = resolve(path)\n    if (this.closing || !isRelevantWatchEvent({ ...state.root, path: mode.anchor }, event, target)) return\n    this.queueInvalidation()\n    if (target === mode.anchor && event === 'unlinkDir') {\n      state.unhealthy = true\n      this.scheduleRewatch(state)\n    }\n  }\n\n  private handleWatcherError(state: RootWatchState, error: unknown): void {\n    if (this.closing) return\n    this.ctx.logger.warn(`skill-filesystem: watcher for ${state.root.path} failed: ${errorMessage(error)}`)\n    state.unhealthy = true\n    this.queueInvalidation()\n    this.scheduleRewatch(state)\n  }\n\n  private scheduleRewatch(state: RootWatchState): void {\n    const currentOpening = state.opening ?? Promise.resolve()\n    void (async () => {\n      await settleWatcherOpening(currentOpening)\n      try {\n        await this.ensureWatcher(state)\n      } catch {\n        // Watch startup logged the retry failure; the next incomplete discovery retries it again.\n        return\n      }\n      this.queueInvalidation()\n    })()\n  }","sourceCodeStart":541,"sourceCodeEnd":577,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/skill/skill-filesystem/src/index.ts#L541-L577","documentation":"Error \"skill-filesystem: watcher for ${state.root.path} failed: ${errorMessage(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/skill/skill-filesystem/src/index.ts:559 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the watcher error for the skill root; fix filesystem watcher support or permissions."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}