Battery State Oscillating Ubuntu 23.04

Hey there!
So today I noticed that while laptop was charging, it would hit a certain battery percentage, and then constantly start and stop charging several times. It would eventually get past that charge, and continue charging as normal.
The most egregious example was:
Charging to 29% → cycle between charge/discharge a few times → Charge to 39% → cycle → Charge to 49% → Cycle → Stuck on 50% cycling for an hour.

I’m not 100% certain why this is happening, or what exactly I can investiagte. Help is appreciated!

Edit: This seems to have been a function of the laptop BMS overheating with the weather today. Take this as a cautionary tale about thermal management during a heatwave.

Hey Jack, do you mind telling how hot was the day when the battery paused charging?