So Ive searched and haven't came up with something identical to my problem so here it goes..
So Ive had a little problem for the past few months that goes away for a few days and then will come back randomly. My Jeep drove fine to my parents on Christmas eve but when I went to leave on Christmas day I went to crank the Jeep over and it acted like the battery was low and strained to start, it eventually cranked over without needing a jump but wont idle, I have to give it gas in order for it to stay running. At this point even though the battery is not dead it reset the computer, radio settings etc like i disconnected the ground. I assumed I had a leak in the battery, but I have had it happen to where it runs and drives fine and Ill park it and 5 minutes later I go to start it and it does the same thing, struggling to start likes its dead. This time once it heated up to around 180 I pegged it to the rev limiter and it ran on its own. Sometimes I have to get it up to 210 and sit there for another 5 minutes before it wants to run. It seems to actually help if I give it barely enough gas around 800 rpms and it seems to "figure out" how it is supposed to idle and will do it on its own after a few minutes.
I went to advance and they test my alternator and battery and they are fine, I cleaned my TB out and got the carbon off the tps and other sensors. I have already replaced the IAC a few months back but have not changed the TPS or MAP sensor. Not exactly sure where to start to be honest.