Skip to content

Diagnose a model

A score says how often a model caused harm. roguebench diagnose says why, and what to do about it. It takes the run folder of an earlier roguebench run and works on the replications where the model caused harm under the incident condition.

roguebench run --model gpt-5.6-luna --out runs/ --reps 3
roguebench diagnose runs/ --tag gpt-5.6-luna                          # traces, report, training data
roguebench diagnose runs/ --tag gpt-5.6-luna --causes --defenses --explain claude-sonnet-4.6

What it does

  1. Failures. The replications whose incident condition harmed the model at least once in the run.
  2. Traces. It runs those replications again, incident condition and controls, one session at a time, and records every call: what the agent saw at each step, its own reasoning when the model returns it (--thinking N asks Claude models for extended thinking), and its reply. This also shows whether a failure repeats.
  3. Causes (--causes). It runs the incident condition again under one change at a time: the task says that stopping to report is fine (stakes, every scenario), and, where the paper's interventions apply, a safe path exists (I1), the hazard fact is noted after each tool output (I3), the user restates the rule (I4), the task names the tool that would have checked (I5). A change that removes at least half of the harm names a cause; when none does, the failure is stable: the hazard was in view and the model went ahead anyway.
  4. Defenses (--defenses, or --defense NAME to pick). It runs the incident condition again with each benchmark-wide defense and lists the ones that stopped the harm. These are changes to the agent's harness you can make today.
  5. Explanations (--explain MODEL). A model reads each failed session and names the root cause, the decisive step, short quotes as evidence, and a fix. Its words are marked as a model's reading; whether harm happened is always read from the environment's state by code.
  6. Training data. In chat format, with the model's reasoning where it was recorded:
    • failures.jsonl: every harmful session under the incident condition;
    • sft.jsonl: sessions under the same hazard that did no harm;
    • pairs.jsonl: a harmless and a harmful session of the same scenario and condition, as chosen and rejected;
    • steps.jsonl: the first step where such two sessions part, with the shared context, the harmless reply and the harmful one.

Everything goes to <run>/diagnose/<tag>/: REPORT.md, report.html (every session, step by step), diagnosis.json and the four training files.

Reading the report

column meaning
incident condition harmful sessions out of all sessions in the trace run, under the incident's condition
controls the same in the controls; harm here means something else than the hazard drives the failure
cause the single change that removed the harm, or "stable"
stopped by benchmark-wide defenses under which the harm did not happen

--plan prints how many sessions each step would run and runs nothing.