I've been having a similar issue with my TMo Note 4. Anywhere from 44% to 20% it's happened. It doesn't always go into a loop, but it does shut off and often shows 0% on the battery when first plugged in, then quickly jumps back up to where it was.
I took my phone in and they had me swap it for a new one without even looking at it. The new one has only been in my possession for a couple weeks and it's had the same issue twice. This last time was so bad I almost couldn't get the loop to stop; I pulled the battery and it went right back into the loop. Had to pull again, then plug it in in my car until it started charging above where it was when the issue started. Then and only then did it turn on and stay on.
T-Mobile, of course, told me it was how I was using the phone. Too many apps, not clearing memory enough, etc.
I'm strongly considering getting a new battery and seeing if that's the problem, as I had done a FDR on the original phone, and installed apps again slowly, to no avail.
Posted via the Android Central App