deepseek-ai/deepseek-harness · error · Error

subprocess-e2b: environment entries require non-empty NUL-fr

Error message

subprocess-e2b: environment entries require non-empty NUL-free names without = and NUL-free values

What it means

Error "subprocess-e2b: environment entries require non-empty NUL-free names without = and NUL-free values" thrown in deepseek-ai/deepseek-harness.

Source

Thrown at packages/e2b/subprocess-e2b/src/environment.ts:97

    if (name.startsWith('DSH_') || SENSITIVE_ENV_PATTERN.test(name)) environment[name] = ''
  }
  return environment
}

/**
 * Overlay explicit entries and serialize one validated E2B environment.
 * @param raw - The complete NUL-delimited remote environment.
 * @param explicit - Deliberate caller overrides applied after ambient scrubbing; an `undefined` tombstone removes an ambient entry.
 * @returns NUL-delimited `name=value` entries accepted by `env -i`.
 */
export function serializeRemoteEnvironment(
  raw: string,
  explicit: Readonly<NodeJS.ProcessEnv> | undefined,
): string {
  const environment = scrubRemoteEnvironment(raw)
  for (const [name, value] of Object.entries(explicit ?? {})) {
    if (name.length === 0 || name.includes('=') || name.includes('\0') || value?.includes('\0') === true) {
      throw new Error('subprocess-e2b: environment entries require non-empty NUL-free names without = and NUL-free values')
    }
    // An explicit undefined is the seam's tombstone: remove the ambient entry.
    if (value === undefined) environment.delete(name)
    else environment.set(name, value)
  }
  return [...environment].map(([name, value]) => `${name}=${value}\0`).join('')
}

View on GitHub (pinned to b150a551b8)

When it happens

Trigger: Thrown at packages/e2b/subprocess-e2b/src/environment.ts:97 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24). Data as JSON: /api/errors/62ff160e078bb4f0. Report an issue: GitHub.