I think there is actually a bug. What is happening is that when diagnose reports divergences:

```
45 of 800 (5.6%) transitions ended with a divergence.
```

The number on the left is the number of post-warmup divergences and the number on the right is the total number of transitions counting warmup and divergences.

Here’s an attached file with 1 divergence (edit: 1 divergence after warmup, but there are bunch during warmup) output3.csv (93.8 KB) . THere are 1000 post warmup draws but it reports:

```
Checking sampler transitions for divergences.
1 of 2000 (0.05%) transitions ended with a divergence.
```

I made an issue over here: https://github.com/stan-dev/cmdstan/issues/948