This is actually a little embarrassing, because I've had this problem for years and wasn't able to fix it until recently, and it turned out to be such a simple fix. On the up side, I've had a lot of different mechanics try to fix this and none were able to get the Cherokee running smoothly.
Let me start from the beginning. In 2001 I was getting a pinging sound from the engine and took it in to a reputable garage. They told me the rotor shaft needed replaced, so I had them do that. When they were done, the pinging was gone, but the engine was running very rough. I'd have to keep my foot on the gas pedal when I stopped or the engine would die. It was very difficult to start, and sometimes wouldn't start at all. I took the Jeep back to the garage repeatedly trying to get it fixed (they didn't charge anything for these visits), but they could never figure out what was wrong. Eventually, the military moved me to San Antonio, so I started looking for a garage here to work on it. I ended up taking it to the Jeep dealer. While they charged me a lot of money, and replaced many parts, they weren't able to fix the problem either.
The Cherokee became so unreliable, I bought another car and kept the Jeep as my work truck. Over the years, I would talk to different mechanics and look for advice online. Most of the advice I got was that it was going to be expensive and a major job to fix. I tried some of the things recommended, but my Jeep never got any better. Eventually, it started dying while I was driving, and then I'd have a tough time getting it to start again (which really stinks when you're in the middle of an intersection).
I recently noticed that it seemed to run worse in hot weather, or when the engine was hot. When I checked the radiator fluid, I saw it was low and very nasty looking. I decided to flush the radiator and possibly change or remove the thermostat to see if that would help. I flushed it out, filled it with new coolant and immediately saw that the upper hose was leaking. I replaced that and found a smaller leak in the heater hose. When I replaced that, I saw the overflow hose had a small leak in it, so it was replaced too. At first, I thought this had helped my idling problem, but within a couple of days, things were back to the way they had been for years. I opened the hood again to see if there were any more leaks, but couldn't find any. As I was looking around, though, I found a vacuum hose just hanging there. That didn't seem right. It had obviously been attached to something at one time, because the end was stretched out and had a small split in it.
Once I figured out where it was suppose to be connected, I cut the split part off of the end, reconnected it, and the Cherokee has run fine ever since (3 weeks as of the end of May).
You would think somebody would have seen this before now, but they didn't, so make sure before you spend a lot of money, that everything is properly connected.