{"record":{"id":"a04927ab60892eab","repo":"deepseek-ai/deepseek-harness","slug":"skill-filesystem-failed-to-close-watcher-error","errorCode":null,"errorMessage":"skill-filesystem: failed to close watcher: ${errorMessage(error)}","messagePattern":"skill-filesystem: failed to close watcher: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/skill/skill-filesystem/src/index.ts","lineNumber":594,"sourceCode":"    })()\n  }\n\n  private queueInvalidation(): void {\n    if (this.closing || this.invalidationQueued) return\n    this.invalidationQueued = true\n    queueMicrotask(() => {\n      this.invalidationQueued = false\n      /* v8 ignore next -- Effect teardown can win this queued microtask before provider disposal emits. */\n      if (this.closing) return\n      this.invalidate()\n    })\n  }\n\n  private async closeWatcher(watcher: WatchHandle): Promise<void> {\n    try {\n      await watcher.close()\n    } catch (error) {\n      this.ctx.logger.warn(`skill-filesystem: failed to close watcher: ${errorMessage(error)}`)\n    }\n  }\n}\n\nasync function settleWatcherOpening(opening: Promise<void> | undefined): Promise<void> {\n  if (opening === undefined) return\n  try {\n    await opening\n  } catch {\n    // Watch startup already logged the underlying failure; teardown only contains it.\n  }\n}\n\nfunction resolveWatchConfig(config: Config): ResolvedWatchConfig {\n  const stabilityThresholdMs = config.watchStabilityThresholdMs ?? DEFAULT_WATCH_STABILITY_THRESHOLD_MS\n  const pollIntervalMs = config.watchPollIntervalMs ?? DEFAULT_WATCH_POLL_INTERVAL_MS\n  const maxProjects = config.watchMaxProjects ?? DEFAULT_WATCH_MAX_PROJECTS\n  assertPositiveInteger('watchStabilityThresholdMs', stabilityThresholdMs)","sourceCodeStart":576,"sourceCodeEnd":612,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/skill/skill-filesystem/src/index.ts#L576-L612","documentation":"Error \"skill-filesystem: failed to close watcher: ${errorMessage(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/skill/skill-filesystem/src/index.ts:594 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the watcher close error; it is logged during teardown and usually safe to ignore unless it repeats."],"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"}