{"record":{"id":"c6a3f557e7868e91","repo":"deepseek-ai/deepseek-harness","slug":"invalid-argument-c6a3f5","errorCode":"INVALID_ARGUMENT","errorMessage":"agent() requires a non-empty prompt string","messagePattern":"agent\\(\\) requires a non-empty prompt string","errorType":"exception","errorClass":"WorkflowError","httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/runtime.ts","lineNumber":253,"sourceCode":"          this.activeSlots += 1\n          resolve()\n        },\n        reject,\n      })\n    })\n  }\n\n  private releaseSlot(): void {\n    this.activeSlots -= 1\n    const next = this.slotWaiters.shift()\n    if (next) next.resolve()\n  }\n\n  /** The `agent(prompt, opts)` hook. */\n  private async agent(rawPrompt: unknown, rawOpts: unknown): Promise<unknown> {\n    this.throwIfCancelled()\n    if (typeof rawPrompt !== 'string' || rawPrompt.length === 0) {\n      throw new WorkflowError('agent() requires a non-empty prompt string', 'INVALID_ARGUMENT')\n    }\n    const opts = this.readAgentOptions(rawOpts)\n    if (this.started >= this.limits.maxTotalAgents) {\n      throw new WorkflowError(\n        `this run reached its total agent cap (${this.limits.maxTotalAgents}) — a runaway-loop backstop; raise the applicable maxTotalAgents limit if the scale is intentional`,\n        'AGENT_CAP',\n      )\n    }\n    this.started += 1\n    const seq = this.started\n    const label = opts.label ?? defaultLabel(rawPrompt)\n    const phase = opts.phase ?? this.currentPhase\n\n    await this.acquireSlot()\n    try {\n      // Re-check after the acquire: the await yields at least one microtask\n      // tick even when a slot is free, and a queued waiter resumes a tick\n      // after its release — a cancel() landing in either window must not","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/runtime.ts#L235-L271","documentation":"Error \"agent() requires a non-empty prompt string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/runtime.ts:253 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a non-empty prompt string to agent() inside the workflow script."],"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"}