{"record":{"id":"acc15619e1a9f3c6","repo":"openclaw/openclaw","slug":"label-file-uri-is-not-valid-for-the-sandbox","errorCode":null,"errorMessage":"${label} file URI is not valid for the sandbox: ${error instanceof Error ? error.message : String(error)}","messagePattern":"(.+?) file URI is not valid for the sandbox: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/codex/src/app-server/sandbox-exec-server/path-uri.ts","lineNumber":31,"sourceCode":"      `${label} must be a valid file URI: ${error instanceof Error ? error.message : String(error)}`,\n      { cause: error },\n    );\n  }\n  if (pathUrl.protocol !== \"file:\") {\n    throw new Error(\n      `${label} URI must use the file scheme, received ${pathUrl.protocol.slice(0, -1)}.`,\n    );\n  }\n  if (pathUrl.search || pathUrl.hash) {\n    throw new Error(`${label} file URI must not include a query or fragment.`);\n  }\n  let resolved: string;\n  try {\n    // The URI names the sandbox target, so decode with POSIX rules even when\n    // the Gateway host is Windows. Docker and SSH backends own POSIX workdirs.\n    resolved = fileURLToPath(pathUrl, { windows: false });\n  } catch (error) {\n    throw new Error(\n      `${label} file URI is not valid for the sandbox: ${error instanceof Error ? error.message : String(error)}`,\n      { cause: error },\n    );\n  }\n  if (WINDOWS_DRIVE_PATH_RE.test(resolved)) {\n    // OpenClaw exec-server backends currently expose Docker/SSH POSIX paths.\n    // Reject foreign drive URIs instead of silently rewriting their meaning.\n    throw new Error(`${label} Windows file URI is not supported by the sandbox.`);\n  }\n  if (resolved.includes(\"\\0\")) {\n    throw new Error(`${label} file URI must not contain a null byte.`);\n  }\n  return resolved;\n}\n","sourceCodeStart":13,"sourceCodeEnd":46,"githubUrl":"https://github.com/openclaw/openclaw/blob/01804a75319da4b69c9ab98ceaa30477e22b8c0b/extensions/codex/src/app-server/sandbox-exec-server/path-uri.ts#L13-L46","documentation":"Error \"${label} file URI is not valid for the sandbox: ${error instanceof Error ? error.message : String(error)}\" thrown in openclaw/openclaw.","triggerScenarios":"Thrown at extensions/codex/src/app-server/sandbox-exec-server/path-uri.ts:31 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":"01804a75319da4b69c9ab98ceaa30477e22b8c0b","analyzedAt":"2026-08-12T04:37:58.197Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}