{"record":{"id":"20215d574b6932da","repo":"JuliusBrussee/caveman","slug":"cave-sandbox-conformance-failed","errorCode":"cave_sandbox_conformance_failed","errorMessage":"cave_sandbox_conformance_failed","messagePattern":"cave_sandbox_conformance_failed","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"packages/agent/src/cli.ts","lineNumber":748,"sourceCode":"    preferredTransforms,\n    transformRegistry.capabilities,\n    evalDynamicKinds(approved),\n    {\n      ...(loaded.config.allowedModels === undefined ? {} : { allowedModels: loaded.config.allowedModels }),\n      ...(loaded.config.deniedModels === undefined ? {} : { deniedModels: loaded.config.deniedModels }),\n      ...(loaded.config.forbiddenSafetyClasses === undefined\n        ? {}\n        : { forbiddenSafetyClasses: loaded.config.forbiddenSafetyClasses }),\n    },\n  );\n  const entitled = await engineEntitled();\n  const plannedRuns = candidates.filter((candidate) => !candidate.static_rejection).length * approved.length * 5;\n  const estimatedCeiling = candidates\n    .filter((candidate) => !candidate.static_rejection)\n    .reduce((sum, candidate) => sum + candidate.estimated_cost_usd_per_run * approved.length * 5, 0);\n  process.stdout.write(`search ceiling: $${estimatedCeiling.toFixed(4)} public-catalog estimate · ${plannedRuns} runs\\n`);\n  const sandboxConformance = await verifySandboxConformance();\n  if (!sandboxConformance) throw new Error(\"cave_sandbox_conformance_failed\");\n  const privacyConformance = contextIRIsContentBlind(lowered.ir);\n  if (!privacyConformance) throw new Error(\"cave_privacy_conformance_failed\");\n  const conversations = new Map<string, ConversationState>();\n  const result = await compileAndWrite({\n    agent: loaded.agent,\n    contextIR: lowered.ir,\n    evals: loaded.evals,\n    candidates,\n    baselinePlan: baseline,\n    seeds: [1, 2, 3, 4, 5],\n    config: loaded.config,\n    entitled,\n    sourceSha256: loaded.sourceSha256,\n    catalogSha256: CATALOG_SHA256,\n    transformRegistrySha256: transformRegistry.sha256,\n    runtimeVersion: FRAMEWORK_VERSION,\n    adapterVersion: PI_ADAPTER_VERSION,\n    upstreamVersion: PI_UPSTREAM_VERSION,","sourceCodeStart":730,"sourceCodeEnd":766,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/3ee70a102609e550bd2e68004bf5990a9341c851/packages/agent/src/cli.ts#L730-L766","documentation":"Before compiling an agent build, the CLI runs verifySandboxConformance() to confirm the local sandbox meets CAVE's conformance requirements. If the check returns falsy, the build aborts with this coded error — the sandbox cannot be trusted to isolate execution, so producing a build would be unsafe.","triggerScenarios":"`caveman` build/search flow reaches the compile step while verifySandboxConformance() returns false — e.g. required sandbox tooling/runtime unavailable or misbehaving on the host (unsupported platform, missing sandbox binary, kernel without needed features, or running in an environment that disables the sandbox).","commonSituations":"Running the build inside a stripped-down Docker container lacking the sandbox runtime; macOS/Windows hosts without the expected sandbox support; CI images where namespace/user features are blocked.","solutions":["Run on a host/CI image with sandbox support and required privileges (e.g. don't strip namespaces in Docker).","Install/restore the sandbox runtime the verify step expects and re-run.","Run the build outside restricted environments (some managed CI sandboxes) and see if conformance passes.","Inspect verifySandboxConformance() locally to see which specific check fails and fix that dependency."],"exampleFix":"// before\n# in a restricted CI container\ncaveman search ...   # cave_sandbox_conformance_failed\n// after\n# use a CI image with sandbox support\ndocker run --security-opt seccomp=default ... caveman search ...","handlingStrategy":"validation","validationCode":"// before building, confirm the environment supports the sandbox\nif (process.platform !== \"linux\" && process.env.CI) {\n  console.warn(\"Sandbox conformance may fail on non-linux CI\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await build();\n} catch (err) {\n  if (String(err?.message) === \"cave_sandbox_conformance_failed\") {\n    console.error(\"Host sandbox failed conformance; use a supported image with sandbox privileges\");\n  }\n  throw err;\n}","preventionTips":["Use CI images known to pass sandbox conformance (Linux with namespaces enabled).","Do not strip seccomp/namespace capabilities in containers that run builds.","Document supported host requirements for contributors.","Never bypass by disabling the sandbox — configs require sandbox: \"required\"."],"tags":["sandbox","environment","security"],"backgroundTag":"unsupported-platform","analyzedSha":"3ee70a102609e550bd2e68004bf5990a9341c851","analyzedAt":"2026-09-20T15:53:39.229Z","contentChangedAt":"2026-09-20T15:53:39.229Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}