deepseek-ai/deepseek-harness · error · WorkflowError

INVALID_ARGUMENT

INVALID_ARGUMENT

Error message

agent() requires a non-empty prompt string

What it means

Error "agent() requires a non-empty prompt string" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/workflow/workflow-worker-thread/src/runtime.ts:253

          this.activeSlots += 1
          resolve()
        },
        reject,
      })
    })
  }

  private releaseSlot(): void {
    this.activeSlots -= 1
    const next = this.slotWaiters.shift()
    if (next) next.resolve()
  }

  /** The `agent(prompt, opts)` hook. */
  private async agent(rawPrompt: unknown, rawOpts: unknown): Promise<unknown> {
    this.throwIfCancelled()
    if (typeof rawPrompt !== 'string' || rawPrompt.length === 0) {
      throw new WorkflowError('agent() requires a non-empty prompt string', 'INVALID_ARGUMENT')
    }
    const opts = this.readAgentOptions(rawOpts)
    if (this.started >= this.limits.maxTotalAgents) {
      throw new WorkflowError(
        `this run reached its total agent cap (${this.limits.maxTotalAgents}) — a runaway-loop backstop; raise the applicable maxTotalAgents limit if the scale is intentional`,
        'AGENT_CAP',
      )
    }
    this.started += 1
    const seq = this.started
    const label = opts.label ?? defaultLabel(rawPrompt)
    const phase = opts.phase ?? this.currentPhase

    await this.acquireSlot()
    try {
      // Re-check after the acquire: the await yields at least one microtask
      // tick even when a slot is free, and a queued waiter resumes a tick
      // after its release — a cancel() landing in either window must not

View on GitHub (pinned to b150a551b8)

Solutions

  1. Pass a non-empty prompt string to agent() inside the workflow script.

When it happens

Trigger: Thrown at packages/workflow/workflow-worker-thread/src/runtime.ts:253 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/c6a3f557e7868e91. Report an issue: GitHub.