JuliusBrussee/caveman · error · Error

cave_claude_tool_result_invalid:${item.name}

Error message

cave_claude_tool_result_invalid:${item.name}

What it means

Error "cave_claude_tool_result_invalid:${item.name}" thrown in JuliusBrussee/caveman.

Source

Thrown at packages/agent/src/claude-runtime.ts:169

        throw new Error(`cave_claude_tool_schema_unsupported:${item.name}`);
      }
      const execute = createHarnessToolExecutor({
        definition,
        tool: item,
        sandbox,
        ...(options.sandboxProfile === undefined ? {} : { sandboxProfile: options.sandboxProfile }),
        ...(options.engineBin === undefined ? {} : { engineBin: options.engineBin }),
      });
      const wireName = `mcp__caveman_agent__${item.name}`;
      toolNames.add(wireName);
      return claudeTool(
        item.name,
        item.description,
        converted.shape,
        async (args) => {
          const value = await execute(args, controller.signal);
          if (!isRecord(value) || !Array.isArray(value.content)) {
            throw new Error(`cave_claude_tool_result_invalid:${item.name}`);
          }
          return value as { content: Array<{ type: "text"; text: string }> };
        },
        { alwaysLoad: true },
      );
    });
    const mcpServers: NonNullable<ClaudeSDKOptions["mcpServers"]> = {};
    if (mcpTools.length > 0) {
      mcpServers.caveman_agent = createSdkMcpServer({
        name: "caveman_agent",
        version: FRAMEWORK_VERSION,
        tools: mcpTools,
        alwaysLoad: true,
      });
    }
    const sdkOptions: ClaudeSDKOptions = {
      abortController: controller,
      cwd: rootDir,

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. The named tool returned a result that violates the Claude tool-result contract; return valid content blocks.

When it happens

Trigger: Thrown at packages/agent/src/claude-runtime.ts:169 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/c6c6bf54a021df59. Report an issue: GitHub.