{"record":{"id":"62ff160e078bb4f0","repo":"deepseek-ai/deepseek-harness","slug":"subprocess-e2b-environment-entries-require-non-em","errorCode":null,"errorMessage":"subprocess-e2b: environment entries require non-empty NUL-free names without = and NUL-free values","messagePattern":"subprocess-e2b: environment entries require non-empty NUL-free names without = and NUL-free values","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/e2b/subprocess-e2b/src/environment.ts","lineNumber":97,"sourceCode":"    if (name.startsWith('DSH_') || SENSITIVE_ENV_PATTERN.test(name)) environment[name] = ''\n  }\n  return environment\n}\n\n/**\n * Overlay explicit entries and serialize one validated E2B environment.\n * @param raw - The complete NUL-delimited remote environment.\n * @param explicit - Deliberate caller overrides applied after ambient scrubbing; an `undefined` tombstone removes an ambient entry.\n * @returns NUL-delimited `name=value` entries accepted by `env -i`.\n */\nexport function serializeRemoteEnvironment(\n  raw: string,\n  explicit: Readonly<NodeJS.ProcessEnv> | undefined,\n): string {\n  const environment = scrubRemoteEnvironment(raw)\n  for (const [name, value] of Object.entries(explicit ?? {})) {\n    if (name.length === 0 || name.includes('=') || name.includes('\\0') || value?.includes('\\0') === true) {\n      throw new Error('subprocess-e2b: environment entries require non-empty NUL-free names without = and NUL-free values')\n    }\n    // An explicit undefined is the seam's tombstone: remove the ambient entry.\n    if (value === undefined) environment.delete(name)\n    else environment.set(name, value)\n  }\n  return [...environment].map(([name, value]) => `${name}=${value}\\0`).join('')\n}\n","sourceCodeStart":79,"sourceCodeEnd":105,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/e2b/subprocess-e2b/src/environment.ts#L79-L105","documentation":"Error \"subprocess-e2b: environment entries require non-empty NUL-free names without = and NUL-free values\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/e2b/subprocess-e2b/src/environment.ts:97 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}