{"record":{"id":"22cb47b85de6c42a","repo":"deepseek-ai/deepseek-harness","slug":"script-parse","errorCode":"SCRIPT_PARSE","errorMessage":"workflow meta rides the `meta` request field, not the script: remove the `export const meta = {...}` statement from the body","messagePattern":"workflow meta rides the `meta` request field, not the script: remove the `export const meta = (.+?)` statement from the body","errorType":"exception","errorClass":"WorkflowError","httpStatus":null,"severity":"error","filePath":"packages/workflow/workflow-worker-thread/src/index.ts","lineNumber":66,"sourceCode":"  disposeGraceMs?: number\n}\n\ntype ResolvedConfig = Required<Config>\n\n/** A body that still carries the Claude Code-style meta header (meta rides the seam as data here). */\nconst META_STATEMENT = /^\\s*export\\s+const\\s+meta\\b/\n\n/**\n * Parse-check the body with the SAME wrapper the worker-side runtime\n * compiles, so `start()` keeps the seam's synchronous `SCRIPT_PARSE` throw\n * (the worker's own compile happens a thread away, after `start()` returned).\n * One redundant parse per run, bought deliberately for the contract. A body\n * opening with `export const meta` gets a pointed message instead of the\n * 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  }","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workflow/workflow-worker-thread/src/index.ts#L48-L84","documentation":"Error \"workflow meta rides the `meta` request field, not the script: remove the `export const meta = {...}` statement from the body\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workflow/workflow-worker-thread/src/index.ts:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the `export const meta = {...}` statement from the script body and pass meta through the request's meta field instead."],"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"}