deepseek-ai/deepseek-harness · error · TypeError

prompt section "${section.name}" order must be a finite numb

Error message

prompt section "${section.name}" order must be a finite number

What it means

Error "prompt section "${section.name}" order must be a finite number" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/core/system-prompt/src/index.ts:383

      name: PERSONA_SECTION,
      order: PERSONA_ORDER,
      // The fallback narrows the optional input type; the schema already defaults it.
      text: config.persona ?? '',
    })
    if (!(config.includeRuntimeContext ?? true)) this.suppressRuntimeContext()
  }

  /**
   * Register an ordered prompt section in the calling context's scope. A scoped
   * section shadows a global section with the same name; duplicates within one
   * layer and non-finite orders throw. Registration and disposal emit
   * `system-prompt/change`.
   * @param section - the section to register.
   * @returns the exact Cordis effect disposer.
   */
  section(section: PromptSection): () => void {
    if (!Number.isFinite(section.order)) {
      throw new TypeError(`prompt section "${section.name}" order must be a finite number`)
    }
    return this.layers.effect(
      this.ctx,
      layer => layer.sections.insert(section.name, section),
      { label: 'systemPrompt.section()' },
    )
  }

  /**
   * Register ordered dynamic context in the calling context's scope. Scoped
   * entries shadow global entries with the same name.
   * @param context - the context contribution to register.
   * @returns the exact Cordis effect disposer.
   */
  context(context: PromptContext): () => void {
    if (!Number.isFinite(context.order)) {
      throw new TypeError(`prompt context "${context.name}" order must be a finite number`)
    }

View on GitHub (pinned to b150a551b8)

When it happens

Trigger: Thrown at packages/core/system-prompt/src/index.ts:383 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/16ea4cfd93c0c532. Report an issue: GitHub.