JuliusBrussee/caveman · critical

cave_sandbox_conformance_failed

cave_sandbox_conformance_failed

Error message

cave_sandbox_conformance_failed

What it means

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.

Solutions

  1. Run on a host/CI image with sandbox support and required privileges (e.g. don't strip namespaces in Docker).
  2. Install/restore the sandbox runtime the verify step expects and re-run.
  3. Run the build outside restricted environments (some managed CI sandboxes) and see if conformance passes.
  4. Inspect verifySandboxConformance() locally to see which specific check fails and fix that dependency.

Example fix

// before
# in a restricted CI container
caveman search ...   # cave_sandbox_conformance_failed
// after
# use a CI image with sandbox support
docker run --security-opt seccomp=default ... caveman search ...
Defensive patterns

Strategy: validation

Validate before calling

// before building, confirm the environment supports the sandbox
if (process.platform !== "linux" && process.env.CI) {
  console.warn("Sandbox conformance may fail on non-linux CI");
}

Try / catch

try {
  await build();
} catch (err) {
  if (String(err?.message) === "cave_sandbox_conformance_failed") {
    console.error("Host sandbox failed conformance; use a supported image with sandbox privileges");
  }
  throw err;
}

Prevention

When it happens

Trigger: `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).

Common situations: 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.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20). Data as JSON: /api/errors/20215d574b6932da. Report an issue: GitHub.

Appendix: source

Thrown at packages/agent/src/cli.ts:748

    preferredTransforms,
    transformRegistry.capabilities,
    evalDynamicKinds(approved),
    {
      ...(loaded.config.allowedModels === undefined ? {} : { allowedModels: loaded.config.allowedModels }),
      ...(loaded.config.deniedModels === undefined ? {} : { deniedModels: loaded.config.deniedModels }),
      ...(loaded.config.forbiddenSafetyClasses === undefined
        ? {}
        : { forbiddenSafetyClasses: loaded.config.forbiddenSafetyClasses }),
    },
  );
  const entitled = await engineEntitled();
  const plannedRuns = candidates.filter((candidate) => !candidate.static_rejection).length * approved.length * 5;
  const estimatedCeiling = candidates
    .filter((candidate) => !candidate.static_rejection)
    .reduce((sum, candidate) => sum + candidate.estimated_cost_usd_per_run * approved.length * 5, 0);
  process.stdout.write(`search ceiling: $${estimatedCeiling.toFixed(4)} public-catalog estimate · ${plannedRuns} runs\n`);
  const sandboxConformance = await verifySandboxConformance();
  if (!sandboxConformance) throw new Error("cave_sandbox_conformance_failed");
  const privacyConformance = contextIRIsContentBlind(lowered.ir);
  if (!privacyConformance) throw new Error("cave_privacy_conformance_failed");
  const conversations = new Map<string, ConversationState>();
  const result = await compileAndWrite({
    agent: loaded.agent,
    contextIR: lowered.ir,
    evals: loaded.evals,
    candidates,
    baselinePlan: baseline,
    seeds: [1, 2, 3, 4, 5],
    config: loaded.config,
    entitled,
    sourceSha256: loaded.sourceSha256,
    catalogSha256: CATALOG_SHA256,
    transformRegistrySha256: transformRegistry.sha256,
    runtimeVersion: FRAMEWORK_VERSION,
    adapterVersion: PI_ADAPTER_VERSION,
    upstreamVersion: PI_UPSTREAM_VERSION,

View on GitHub (pinned to 3ee70a1026)