deepseek-ai/deepseek-harness · error · UserQuestionError

DUPLICATE_PROVIDER

DUPLICATE_PROVIDER

Error message

a user-questions provider is already registered

What it means

Error "a user-questions provider is already registered" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/interaction/user-questions/src/index.ts:67

/** `ctx.userQuestions`: one active UI provider plus an `ask()` API. */
export class UserQuestionService extends Service {
  private provider: UserQuestionProvider | undefined

  constructor(ctx: Context) {
    super(ctx, 'userQuestions')
  }

  /**
   * Register the UI provider. Only one provider may be active in a context.
   *
   * @param provider UI-side implementation that collects answers.
   * @returns Disposer that unregisters this provider.
   */
  registerProvider(provider: UserQuestionProvider): () => void {
    const dispose = this.ctx.effect(function* (this: UserQuestionService) {
      if (this.provider !== undefined) {
        throw new UserQuestionError('a user-questions provider is already registered', 'DUPLICATE_PROVIDER')
      }
      this.provider = provider
      yield () => {
        this.provider = undefined
      }
    }.bind(this), 'userInteraction.registerProvider()')
    return () => void dispose()
  }

  /**
   * Ask the active UI provider and wait for the user's answer.
   *
   * When a caller supplies an agent, human interaction is valid only for the
   * exact live runtime root. Runtime ownership, not durable session lineage,
   * decides this boundary: an owned child has no human answerer and would
   * block forever, while a lineage-bearing session resumed as a new runtime
   * root may ask normally.
   *

View on GitHub (pinned to b150a551b8)

Solutions

  1. Register the user-questions provider only once; reuse or dispose the existing registration instead of registering again.

When it happens

Trigger: Thrown at packages/interaction/user-questions/src/index.ts:67 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/605960c012acb8e7. Report an issue: GitHub.