{"record":{"id":"cdc7205fdfee27f2","repo":"deepseek-ai/deepseek-harness","slug":"subprocess-e2b-command-json-stringify-command","errorCode":null,"errorMessage":"subprocess-e2b: command ${JSON.stringify(command)} is a relative path; use an absolute path or a bare PATH name","messagePattern":"subprocess-e2b: command (.+?) is a relative path; use an absolute path or a bare PATH name","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/e2b/subprocess-e2b/src/index.ts","lineNumber":120,"sourceCode":"  /** @inheritdoc */\n  async resolveExecutable(\n    command: string,\n    env?: Readonly<Record<string, string>>,\n    signal?: AbortSignal,\n  ): Promise<string> {\n    if (command.length === 0) throw new Error('subprocess-e2b: executable name must be non-empty')\n    signal?.throwIfAborted()\n    const sandbox = await this.ctx.e2b.getSandbox()\n    if (posix.isAbsolute(command)) {\n      await sandbox.commands.run(\n        `test -f ${quoteE2BShellArg(command)} -a -x ${quoteE2BShellArg(command)}`,\n        { envs: e2bControlEnvs(), ...signalOpts(signal) },\n      )\n      signal?.throwIfAborted()\n      return command\n    }\n    if (command.includes('/')) {\n      throw new Error(\n        `subprocess-e2b: command ${JSON.stringify(command)} is a relative path; use an absolute path or a bare PATH name`,\n      )\n    }\n    const path = env?.PATH\n    const prefix = path === undefined ? '' : `PATH=${quoteE2BShellArg(path)} `\n    const result = await sandbox.commands.run(\n      `${prefix}command -v -- ${quoteE2BShellArg(command)}`,\n      { cwd: this.ctx.e2b.cwd, envs: e2bControlEnvs(), ...signalOpts(signal) },\n    )\n    signal?.throwIfAborted()\n    const executable = result.stdout.trim()\n    if (executable.includes('\\n') || (!posix.isAbsolute(executable) && !executable.includes('/'))) {\n      throw new Error(`subprocess-e2b: executable ${JSON.stringify(command)} did not resolve to one absolute path`)\n    }\n    // A relative result comes from a relative PATH entry; the lookup ran with the shared cwd.\n    return posix.resolve(this.ctx.e2b.cwd, executable)\n  }\n","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/e2b/subprocess-e2b/src/index.ts#L102-L138","documentation":"Error \"subprocess-e2b: command ${JSON.stringify(command)} is a relative path; use an absolute path or a bare PATH name\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/e2b/subprocess-e2b/src/index.ts:120 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"}