I would like to tell this story in case it helps anybody else: The first time my IMA light, codes, etc. came on I replaced the battery for $2000. After three years the light started coming on again. Not wanting to spend another $2k, I just started disconnecting the 12v battery cable to reset the light when it came on. I did this about once a week for many months. Then, mysteriously, the IMA light stopped coming on, and has not come on for a year! Wish I would have tried this the first time.
Probably not the...best strategy - either of them. If one gets an IMA light, the best thing to do is 'blink' the codes or have them read with an OBDII scanner to find out which one it is. Usually it's due to cells in the pack being out of balance, so the pack is considered empty and full prematurely and results in very little usable capacity.
The second step, or perhaps an interim one, might be to pull the 12V negative cable or the underdash number 18 fuse to reset the computers and see how well that helps, if at all. It sometimes can, and can be 'good enough'. Otherwise, it's usually on to something like buying an external 'grid charger' and 'discharger', charging the pack full, discharging to empty, charging it again, and then taking it from there.
IMA lights are a seriously lagging indicator of pack condition. When they come on, the pack is long past the time it should have been looked at, 'treated', such as with a grid charge and/or discharge... If you reset the computers by repeatedly pulling the 12V neg cable, you're basically forcing usage of, most likely, unbalanced cells into a very minimally usable balanced state. It doesn't take much to 'make the pack work', but it's now in a far-from-optimal state. You can have cells at say 20% actual charge state and others at say 80% - and the pack will work. But usage with that kind of charge state imbalance will result in the cells becoming more and more different over time, they'll become permanently mismatched and likely the pack will fail again sooner rather than later.