{"record":{"id":"a0ecc47d29ae412a","repo":"JuliusBrussee/caveman","slug":"cave-host-sandbox-lock-ineligible","errorCode":null,"errorMessage":"cave_host_sandbox_lock_ineligible","messagePattern":"cave_host_sandbox_lock_ineligible","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/agent/src/build.ts","lineNumber":227,"sourceCode":"  evidence: Array<{ fixture: string; seed: number; value: RunEvidence }>;\n  costPerTask: number;\n  errorRate: number;\n  p95Latency: number;\n  fixturePassRate: number;\n  retentionLCB95: number;\n  passing: boolean;\n};\n\nexport async function compile(input: CompileInput): Promise<CompileResult> {\n  // An unsandboxed run cannot produce a lock. Host mode runs tool\n  // closures in the host process, so its evidence shows no containment and is\n  // refused here rather than downgraded to a soft status. The whole definition\n  // graph is checked, not just the root: a host subagent under a fixture root\n  // runs its closures in this process exactly as a host root would, and the CLI\n  // saves that lock all the same. Coding agents lock by compiling against\n  // fixture corpora with a contained sandbox mode.\n  if (graphUsesHostSandbox(input.agent)) {\n    throw new Error(\"cave_host_sandbox_lock_ineligible\");\n  }\n  const approved = input.evals.filter((fixture) => fixture.approved && fixture.required);\n  if (approved.length === 0) {\n    return emptyResult(\"needs_eval\", \"no approved required eval fixture\");\n  }\n  const seeds = input.seeds ?? [1, 2, 3, 4, 5];\n  if (seeds.length === 0 || new Set(seeds).size !== seeds.length) {\n    throw new Error(\"caveman build: seeds must be a non-empty unique set\");\n  }\n  const candidates = input.candidates ?? generateCandidatePlans(\n    input.agent,\n    input.contextIR,\n    input.baselinePlan,\n    input.modelCandidates ?? [input.baselinePlan.model],\n    true,\n    new Map(),\n    ENGINE_TRANSFORM_CAPABILITIES,\n    new Set(input.evals.some((fixture) =>","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/agent/src/build.ts#L209-L245","documentation":"Error \"cave_host_sandbox_lock_ineligible\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/agent/src/build.ts:227 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a sandbox mode that is eligible for locking (the required sandbox); nested or weaker sandboxes cannot be locked."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}