Hi everyone; I posted this to another forum, but I'm hoping to get some help here.

I've been lurking forums for ages trying to find an answer to this problem, but I have finally decided to try and get to the bottom of it myself. I bought my '00 JDM Legacy GT-B (BH5 with the EJ206) about a month ago, and I've been chasing this issue ever since.

Basically, the car keeps throwing Code 24 (IACV malfunction) along with a check engine light. When it does this, revs sit at around 1400 and the ECU cuts fuel to cyl#1 causing the car to run on 3 cylinders. If I shut off the car, it usually "clears" the CEL and it will no longer be running in limp mode. Although the condition will return, uusually when the car is in park and the revs return to idle. However, I noticed the condition also goes away when the A/C compressor kicks in. Basically I can clear limp mode and the CEL just by cycling my A/C on and off.

I have pulled the IACV and thoroughly cleaned both it and the TB, and made sure the valve is cycling smoothly and properly. When I unplug the MAF when idling the idle gets super lumpy like the car is about to stall, making me think the MAF is good as well.

Additionally, my idle is unusually high, sitting anywhere between 1100 and 1400, and I'm getting extremely poor gas mileage (~350km to a tank). Also, on cold starts, the car will idle extremely low (1-250rpm) for a few seconds before jumping to 2000rpm, hunting for a moment, and settling in at ~1200rpm. When the idle is low, pressing the gas does not help in the slightest making me think it is running extremely lean.

In conclusion:
-car throws intermittent CEL with code 24 and limp mode. Clearable by cycling A/C.
-car has low idle on cold starts (1-200rpm)
-extremely poor gas mileage (350km to a tank)

Any help is appreciated, or if you could give me some hints of what else I could look at and try. I am planning to take the car to my tuner sometime in the next couple weeks to get the vacuum system leak tested, but other than that I am kind of at a loss.

Thanks!

09/26 UPDATE: Ruled out the IACV for sure by replacing it with a known good one, just to put my mind at rest. Had an odd instance today where instead of my A/C turning my CEL off, I brought on the CEL by applying my brakes (preparing to shift into R). It turned off again when I released them. It is almost certainly an electrical gremlin at this point; I'll be doing some more investigating whenever I have a chance this week.

I'll keep updating as I go in the chance that I might help someone one day with similar issues.

09/28 UPDATE: I found the wires coming out of the O2 sensor to be entirely frayed and shorting on each other. There was no continuity between any of the three wires. I have a new one so I'll be replacing that tonight. Praying that this, for some reason, is the source of all my troubles.

Predictably it wasn't. Replaced both the sensor and the wiring anyway, but there's been no change otherwise. Really running out of ideas here, thinking about just swapping the ECU and hoping it fixes the problem.

10/06 UPDATE: Figured out my vacuum lines are missing restrictor pills and are on in the wrong configuration. I'll most likely be fixing them tomorrow, looking for a 2mm orafice/restrictor pill part number.