{"record":{"id":"605960c012acb8e7","repo":"deepseek-ai/deepseek-harness","slug":"duplicate-provider","errorCode":"DUPLICATE_PROVIDER","errorMessage":"a user-questions provider is already registered","messagePattern":"a user-questions provider is already registered","errorType":"error_code","errorClass":"UserQuestionError","httpStatus":null,"severity":"error","filePath":"packages/interaction/user-questions/src/index.ts","lineNumber":67,"sourceCode":"\n/** `ctx.userQuestions`: one active UI provider plus an `ask()` API. */\nexport class UserQuestionService extends Service {\n  private provider: UserQuestionProvider | undefined\n\n  constructor(ctx: Context) {\n    super(ctx, 'userQuestions')\n  }\n\n  /**\n   * Register the UI provider. Only one provider may be active in a context.\n   *\n   * @param provider UI-side implementation that collects answers.\n   * @returns Disposer that unregisters this provider.\n   */\n  registerProvider(provider: UserQuestionProvider): () => void {\n    const dispose = this.ctx.effect(function* (this: UserQuestionService) {\n      if (this.provider !== undefined) {\n        throw new UserQuestionError('a user-questions provider is already registered', 'DUPLICATE_PROVIDER')\n      }\n      this.provider = provider\n      yield () => {\n        this.provider = undefined\n      }\n    }.bind(this), 'userInteraction.registerProvider()')\n    return () => void dispose()\n  }\n\n  /**\n   * Ask the active UI provider and wait for the user's answer.\n   *\n   * When a caller supplies an agent, human interaction is valid only for the\n   * exact live runtime root. Runtime ownership, not durable session lineage,\n   * decides this boundary: an owned child has no human answerer and would\n   * block forever, while a lineage-bearing session resumed as a new runtime\n   * root may ask normally.\n   *","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/interaction/user-questions/src/index.ts#L49-L85","documentation":"Error \"a user-questions provider is already registered\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/interaction/user-questions/src/index.ts:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register the user-questions provider only once; reuse or dispose the existing registration instead of registering again."],"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"}