{"record":{"id":"60be3d68cd65b8f7","repo":"JuliusBrussee/caveman","slug":"cave-claude-tool-schema-unsupported-item-name","errorCode":null,"errorMessage":"cave_claude_tool_schema_unsupported:${item.name}","messagePattern":"cave_claude_tool_schema_unsupported:(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/agent/src/claude-runtime.ts","lineNumber":151,"sourceCode":"    // lane can only ever be an unlocked run: a missing gateway degrades to\n    // observe-only rather than blocking a first response.\n    const { useGateway } = await resolveCaveRoute(gatewayURL, options, false);\n    const instructions = assembleSystemPrompt(definition, lowered);\n    const runID = crypto.randomUUID();\n    const sessionID = `claude-${definition.id}-${runID}`;\n    const prefixSHA256 = sha256(stableStringify({\n      instructions,\n      tools: definition.tools.map((item) => ({\n        name: item.name,\n        description: item.description,\n        input: item.input,\n      })),\n    }));\n    const toolNames = new Set<string>();\n    const mcpTools = definition.tools.map((item) => {\n      const converted = z.fromJSONSchema(item.input as Record<string, unknown>);\n      if (!(converted instanceof z.ZodObject)) {\n        throw new Error(`cave_claude_tool_schema_unsupported:${item.name}`);\n      }\n      const execute = createHarnessToolExecutor({\n        definition,\n        tool: item,\n        sandbox,\n        ...(options.sandboxProfile === undefined ? {} : { sandboxProfile: options.sandboxProfile }),\n        ...(options.engineBin === undefined ? {} : { engineBin: options.engineBin }),\n      });\n      const wireName = `mcp__caveman_agent__${item.name}`;\n      toolNames.add(wireName);\n      return claudeTool(\n        item.name,\n        item.description,\n        converted.shape,\n        async (args) => {\n          const value = await execute(args, controller.signal);\n          if (!isRecord(value) || !Array.isArray(value.content)) {\n            throw new Error(`cave_claude_tool_result_invalid:${item.name}`);","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/agent/src/claude-runtime.ts#L133-L169","documentation":"Error \"cave_claude_tool_schema_unsupported:${item.name}\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/agent/src/claude-runtime.ts:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The named tool's input schema cannot be mapped to the Claude tool format; simplify the schema to supported JSON Schema constructs."],"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-15T22:17:37.221Z"}