{"record":{"id":"9e69a05ac4016d0f","repo":"JuliusBrussee/caveman","slug":"claude-specific-cave-build-execution-is-unavailabl","errorCode":null,"errorMessage":"Claude-specific Cave Build execution is unavailable until model, reasoning, budget, recovery, and wire selectors are enforced","messagePattern":"Claude-specific Cave Build execution is unavailable until model, reasoning, budget, recovery, and wire selectors are enforced","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/index.ts","lineNumber":5059,"sourceCode":"    cwd: process.cwd(),\n    env: process.env,\n    encoding: \"utf8\",\n  });\n  if (checked.error || checked.status !== 0) {\n    const detail = String(checked.stderr || checked.error?.message || \"lock check failed\").trim();\n    throw new Error(`Cave Build lock is stale or invalid; refusing Claude launch before model spend: ${detail}`);\n  }\n  const rawAfterCheck = readFileSync(lockPath, \"utf8\");\n  if (rawAfterCheck !== rawBeforeCheck) {\n    throw new Error(\"Cave Build lock changed during validation; refusing Claude launch before model spend\");\n  }\n  const lock = JSON.parse(rawAfterCheck) as { harness?: { id?: unknown } };\n  if (lock.harness?.id !== \"claude\") {\n    throw new Error(\n      \"Cave Build is Pi-specific; refusing to attach its identity to Claude Code execution\",\n    );\n  }\n  throw new Error(\n    \"Claude-specific Cave Build execution is unavailable until model, reasoning, budget, recovery, and wire selectors are enforced\",\n  );\n}\n\nfunction firstEnvSecret(env: NodeJS.ProcessEnv, keys: string[]): string | undefined {\n  for (const key of keys) {\n    const value = env[key];\n    if (typeof value === \"string\" && value.trim()) return value.trim();\n  }\n  return undefined;\n}\n\nfunction maybeWarnHermesMissingKey(agent: AgentProfile | undefined, gw = gatewayURL()) {\n  if (agent?.id !== \"hermes\") return;\n  if (wrapMode(gw) === \"local\") {\n    if (!firstEnvSecret(process.env, HERMES_LOCAL_UPSTREAM_KEY_VARS)) {\n      process.stderr.write(\"caveman: Hermes local wrap has no upstream provider key in env for the local proxy to forward; launching anyway, but provider auth may fail\\n\");\n    }","sourceCodeStart":5041,"sourceCodeEnd":5077,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/cli/src/index.ts#L5041-L5077","documentation":"Unconditional feature gate at the end of claudeCaveBuildEnv: even for a valid, claude-identified, freshly validated lock, Claude-specific Cave Build execution is not implemented yet — model, reasoning, budget, recovery, and wire selectors are not enforced for Claude. The function always throws once a lock passes all prior checks.","triggerScenarios":"Any launch path that reaches claudeCaveBuildEnv with a present and fully valid .caveman/agent.lock.json whose harness.id is \"claude\" — there is no configuration that passes beyond this point.","commonSituations":"Users assuming Cave Build parity across harnesses; CI environments that pre-create a claude lock file.","solutions":["Do not create .caveman/agent.lock.json for Claude sessions; remove it before launching","Wait for a caveman release that enforces Claude selectors (model, reasoning, budget, recovery, wire)","Use Pi for Cave Build workflows until Claude support ships"],"exampleFix":"# before\n# valid lock with harness.id === \"claude\" still throws\n\n# after\nrm -f .caveman/agent.lock.json   # Claude launches without Cave Build gating\nclaude","handlingStrategy":"validation","validationCode":"import { existsSync, readFileSync } from \"node:fs\";\n// the only defense: never reach this path with a valid claude lock\nconst lockPath = \".caveman/agent.lock.json\";\nif (existsSync(lockPath)) {\n  const lock = JSON.parse(readFileSync(lockPath, \"utf8\"));\n  if (lock.harness?.id === \"claude\") throw new Error(\"Claude Cave Build is not implemented; remove the lock\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never pre-create .caveman/agent.lock.json for Claude sessions in CI templates","Track caveman release notes for Claude Cave Build support","Use Pi for Cave Build workflows until the selectors ship for Claude"],"tags":["cave-build","feature-gate","unsupported","claude"],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}