{"record":{"id":"6a3a9203ca5eef0b","repo":"JuliusBrussee/caveman","slug":"cave-claude-locked-execution-unavailable","errorCode":"cave_claude_locked_execution_unavailable","errorMessage":"cave_claude_locked_execution_unavailable","messagePattern":"cave_claude_locked_execution_unavailable","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/agent/src/claude-runtime.ts","lineNumber":92,"sourceCode":"  input: string,\n  options: ClaudeInternalRunOptions,\n): Promise<RunResult> {\n  return runClaudeAgentWithOptions(definition, input, options);\n}\n\nasync function runClaudeAgentWithOptions(\n  definition: AgentDefinition,\n  input: string,\n  options: ClaudeInternalRunOptions,\n): Promise<RunResult> {\n  if (options.lockedBuild !== undefined && options.candidatePlan !== undefined) {\n    throw new Error(\"cave_execution_authorization_ambiguous\");\n  }\n  if (options.candidatePlan !== undefined) {\n    throw new Error(\"cave_claude_candidate_execution_unavailable\");\n  }\n  if (options.lockedBuild !== undefined) {\n    throw new Error(\"cave_claude_locked_execution_unavailable\");\n  }\n  if (definition.memory !== undefined) {\n    throw new Error(\"cave_claude_memory_bridge_unavailable\");\n  }\n  if (definition.tools.some((item) => item.runtime?.kind === \"subagent\")) {\n    throw new Error(\"cave_claude_subagent_bridge_unavailable\");\n  }\n  const unsupportedTool = definition.tools.find((item) =>\n    item.effect !== \"read\" || item.result !== \"inline\");\n  if (unsupportedTool !== undefined) {\n    throw new Error(`cave_claude_tool_contract_unsupported:${unsupportedTool.name}`);\n  }\n  if (options.maxTurns !== undefined &&\n      (!Number.isSafeInteger(options.maxTurns) || options.maxTurns <= 0 || options.maxTurns > 1_000)) {\n    throw new Error(\"cave_claude_max_turns_invalid\");\n  }\n  if (options.maxBudgetUsd !== undefined &&\n      (!Number.isFinite(options.maxBudgetUsd) || options.maxBudgetUsd <= 0)) {","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/3ee70a102609e550bd2e68004bf5990a9341c851/packages/agent/src/claude-runtime.ts#L74-L110","documentation":"Fail-closed guard in runClaudeAgentWithOptions: a lockedBuild was supplied, but the Claude runtime has no locked-execution path wired to the provider. Per the doc comment the CLI/test lane refuses to proceed rather than degrading to an unlocked provider call.","triggerScenarios":"Thrown at packages/agent/src/claude-runtime.ts:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run without lockedBuild (plain CLI/test lane) if a locked run is not required","Use a harness whose locked-execution lane is implemented","Implement the locked execution path in the Claude runtime before requesting it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}