JuliusBrussee/caveman · error

${bold("Protected")} ${model.protected}

Error message

${bold("Protected")}  ${model.protected}

What it means

renderLearnTui renders a line marking the model/setup as protected. This is not a thrown error but display text shown in the TUI when model.protected is true; documentation-wise it surfaces protected status, not a failure.

Source

Thrown at packages/cli/src/learn-tui.ts:120

export async function renderLearnTui(model: LearnTuiModel): Promise<LearnTuiResult> {
  p.intro(`${green(bold(" CAVEMAN "))} ${dim("LEARN / LOCAL SETUP")}`);

  if (model.score !== null) {
    p.note(learnScoreBody(model), "SETUP SCORE");
  } else {
    p.note(learnScoreBody(model), "LEARN RESULT");
  }

  if (model.moves.length > 0) {
    const moves = model.moves.map((move, index) => {
      const number = dim(String(index + 1).padStart(2, "0"));
      return `${number}  ${learnMoveBody(move)}`;
    });
    p.note(moves.join("\n\n"), "TOP MOVES");
  }

  if (model.protected) {
    p.log.warn(`${bold("Protected")}  ${model.protected}`);
  }

  const options: Array<{ value: LearnTuiAction; label: string; hint?: string }> = [];
  if (model.moves.length > 0) {
    options.push({
      value: "implement",
      label: "Implement with agent",
      hint: "Claude Code or Codex · approval before edits",
    });
  }
  if (model.findings > 0) {
    options.push({
      value: "details",
      label: `Show all ${model.findings} findings`,
      hint: "full ids, evidence, and suggestions",
    });
  }
  options.push(

View on GitHub (pinned to 2f49f0e1a3)

Solutions

  1. No fix required — this is informational UI
  2. If the warning is unexpected, inspect why the learn model reports the run as protected
  3. Extend the model's protected field only through the learn pipeline that computes it
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at packages/cli/src/learn-tui.ts:109 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@2f49f0e1a3 (2026-08-18). Data as JSON: /api/errors/e50d7f241e3dc2c3. Report an issue: GitHub.