Amino acid catabolism can provide oxaloacetate snd other TCA-cycle intermediates, using glucogenic amino acids. Thus ATP production can continue in the face of a mild ketosis. The source of the amino acids is skeletal muscle-hence the “wasting away” look of people who have fasted for extended periods.