{"record":{"id":"32b3f27c39190cc8","repo":"deepseek-ai/deepseek-harness","slug":"item-cap","errorCode":"ITEM_CAP","errorMessage":"${hook} received ${length} items — over the per-call cap (${this.limits.maxItemsPerCall}); split the work or raise maxItemsPerCall in the engine config","messagePattern":"(.+?) received (.+?) items — over the per-call cap \\((.+?)\\); split the work or raise maxItemsPerCall in the engine config","errorType":"exception","errorClass":"WorkflowError","httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/runtime.ts","lineNumber":462,"sourceCode":"      let value: unknown = item\n      try {\n        for (const stage of stages) {\n          value = await stage(value, item, index)\n        }\n        return value\n      } catch (error: unknown) {\n        // An ordinary stage throw drops the ITEM to null and skips its\n        // remaining stages; a fatal WorkflowError (see parallel()) kills the\n        // whole script.\n        if (isFatalWorkflowError(error)) throw error\n        return null\n      }\n    }))\n  }\n\n  private assertItemCap(length: number, hook: string): void {\n    if (length > this.limits.maxItemsPerCall) {\n      throw new WorkflowError(\n        `${hook} received ${length} items — over the per-call cap (${this.limits.maxItemsPerCall}); split the work or raise maxItemsPerCall in the engine config`,\n        'ITEM_CAP',\n      )\n    }\n  }\n\n  /** The `phase(title)` hook: sets the current label for subsequent `agent()` calls and notifies observers. */\n  private phase(title: unknown): void {\n    this.throwIfCancelled()\n    if (typeof title !== 'string' || title.length === 0) {\n      throw new WorkflowError('phase() requires a non-empty title string', 'INVALID_ARGUMENT')\n    }\n    this.currentPhase = title\n    this.observer.phase(title)\n  }\n\n  /** The `log(message)` hook: narration to observers. */\n  private log(message: unknown): void {","sourceCodeStart":444,"sourceCodeEnd":480,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/runtime.ts#L444-L480","documentation":"Error \"${hook} received ${length} items — over the per-call cap (${this.limits.maxItemsPerCall}); split the work or raise maxItemsPerCall in the engine config\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/runtime.ts:462 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Split the hook input into batches under the per-call cap, or raise maxItemsPerCall in the engine config."],"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"}