{"record":{"id":"968a8eb8d382830a","repo":"deepseek-ai/deepseek-harness","slug":"invalid-argument","errorCode":"INVALID_ARGUMENT","errorMessage":"workflow subagentProvider must be a non-empty normalized string","messagePattern":"workflow subagentProvider must be a non-empty normalized string","errorType":"exception","errorClass":"WorkflowError","httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/index.ts","lineNumber":80,"sourceCode":" * wrapper's bare SyntaxError — the model's likeliest authoring slip.\n */\nfunction assertBodyParses(body: string, name: string): void {\n  if (META_STATEMENT.test(body)) {\n    throw new WorkflowError('workflow meta rides the `meta` request field, not the script: remove the `export const meta = {...}` statement from the body', 'SCRIPT_PARSE')\n  }\n  try {\n    // Parse only — the script object is discarded, nothing executes.\n    void new vm.Script(`(async () => {\\n${body}\\n})()`, { filename: `workflow:${name}`, lineOffset: -1 })\n  } catch (error: unknown) {\n    throw new WorkflowError(`workflow script does not parse: ${String(error)}`, 'SCRIPT_PARSE', { cause: error })\n  }\n}\n\n/** Resolve one run's provider route before publishing work. */\nfunction resolveSubagentProvider(ctx: Context, configured: string, override: string | undefined): string {\n  const provider = override ?? configured\n  if (provider.length === 0 || provider !== provider.trim()) {\n    throw new WorkflowError(\n      'workflow subagentProvider must be a non-empty normalized string',\n      'INVALID_ARGUMENT',\n    )\n  }\n  if (ctx.subagents.getProvider(provider) === undefined) {\n    throw new WorkflowError(`no subagent provider registered for \"${provider}\"`, 'AGENT_START')\n  }\n  return provider\n}\n\n/** Resolve one run's total-child cap against the engine deployment ceiling. */\nfunction resolveMaxTotalAgents(requested: number | undefined, ceiling: number): number {\n  if (requested === undefined) return ceiling\n  if (!Number.isSafeInteger(requested) || requested < 1) {\n    throw new WorkflowError('workflow maxTotalAgents must be a positive safe integer', 'INVALID_ARGUMENT')\n  }\n  if (requested > ceiling) {\n    throw new WorkflowError(","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/index.ts#L62-L98","documentation":"Error \"workflow subagentProvider must be a non-empty normalized string\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/index.ts:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set subagentProvider to a non-empty normalized string in the workflow engine config or request."],"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"}