JuliusBrussee/caveman · error · Error

cave_claude_reasoning_capability_unknown

Error message

cave_claude_reasoning_capability_unknown:${model}

What it means

Guard in claudeReasoningOptions: claudeThinkingCapability returned something other than 'adaptive' or 'manual' for the configured model, so the harness does not know how to request thinking for it. The model name is embedded.

Solutions

  1. Use a model whose thinking capability the adapter knows (check claudeThinkingCapability's table)
  2. Update the agent package so its capability table covers the model
  3. Set reasoning: 'off' to bypass thinking configuration for unknown models
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/agent/src/claude-runtime.ts:518 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/da303e2acf305ff9. Report an issue: GitHub.

Appendix: source

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

  reasoning: AgentDefinition["reasoning"],
  outputMaxTokens: number | undefined,
): Pick<ClaudeSDKOptions, "thinking" | "effort"> {
  if (reasoning === "off") return { thinking: { type: "disabled" } };
  const capability = claudeThinkingCapability(model);
  if (capability === "adaptive") {
    return {
      thinking: { type: "adaptive" },
      effort: claudeEffort(reasoning),
    };
  }
  if (capability === "manual") {
    const budgetTokens = reasoning === "high" ? 8_192 : reasoning === "medium" ? 4_096 : 1_024;
    if (outputMaxTokens !== undefined && outputMaxTokens <= budgetTokens) {
      throw new Error("cave_claude_output_budget_too_small_for_reasoning");
    }
    return { thinking: { type: "enabled", budgetTokens } };
  }
  throw new Error(`cave_claude_reasoning_capability_unknown:${model}`);
}

function claudeThinkingCapability(model: string): "adaptive" | "manual" | "unknown" {
  if (/^claude-(?:haiku-4-5|sonnet-4-5|opus-4-(?:1|5))(?:-\d{8})?$/.test(model)) {
    return "manual";
  }
  if (/^claude-(?:sonnet|opus)-4-[678](?:-\d{8})?$/.test(model) ||
      /^claude-(?:fable|mythos|sonnet|opus)-5(?:-\d+)?$/.test(model)) {
    return "adaptive";
  }
  return "unknown";
}

// Accepts ANY result subtype: error subtypes (error_max_turns, …) carry the
// same provider `usage` a success does, so the receipt can be built from a
// failed run too.
type ClaudeCredentialRegime = "metered" | "subscription" | "unknown";

View on GitHub (pinned to 766dce6b13)