How one runaway gradient can wreck a training run — and the cap that saves it.