JuliusBrussee/caveman · error · Error

cave_build_lock_missing: approve required evals, then run…

Error message

cave_build_lock_missing: approve required evals, then run npm run build

What it means

Precondition guard in check: no build lock exists (or it is stale) because required evals have not been approved and npm run build has not produced caveman.build.lock. Follow the remediation in the message: approve required evals, then run the build.

Solutions

  1. Approve the required evals in the build flow, then run npm run build
  2. Run caveman-agent doctor to see what blocks a passing build
  3. Re-run caveman-agent check after the lock is generated
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/agent/src/cli.ts:939 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18). Data as JSON: /api/errors/9aeb56ee059f0614. Report an issue: GitHub.

Appendix: source

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

function configuredModelCandidates(baseline: string): string[] {
  const models = new Set<string>([baseline]);
  if (process.env.ANTHROPIC_API_KEY) models.add("anthropic/claude-haiku-4-5");
  if (process.env.OPENAI_API_KEY) models.add("openai/gpt-5.4-mini");
  if (process.env.GEMINI_API_KEY || process.env.GOOGLE_API_KEY) models.add("google/gemini-2.5-flash");
  return [...models].sort();
}

async function check(args: string[]): Promise<void> {
  const root = process.cwd();
  const configPath = args[0] ?? "caveman.config.ts";
  const loaded = await loadBuildInputs(root, configPath);
  let lock: CaveBuildLock;
  try {
    lock = await readLock(root);
  } catch (error) {
    if ((error as NodeJS.ErrnoException).code === "ENOENT") {
      throw new Error("cave_build_lock_missing: approve required evals, then run npm run build");
    }
    throw error;
  }
  const transformRegistrySha256 = await transformRegistrySHA256();
  const checked = checkLock(lock, {
    sourceSha256: loaded.sourceSha256,
    agentDefinitionSha256: agentDefinitionSHA256(loaded.agent),
    contextIRSha256: contextIRSHA256(await lowerBuildContext(
      root,
      loaded.agent,
    ).then((value) => value.ir)),
    evalSuiteSha256: sha256(stableStringify(loaded.evals.filter((item) => item.approved && item.required))),
    runtimeVersion: FRAMEWORK_VERSION,
    adapterVersion: PI_ADAPTER_VERSION,
    upstreamVersion: PI_UPSTREAM_VERSION,
    transformRegistrySha256,
    catalogSha256: CATALOG_SHA256,
  });

View on GitHub (pinned to 766dce6b13)