1991 Toyota 4Runner rough idle in park

my 4runner has a rough idle when in park, putting it in gear seems to make it slightly less rough but it still is rough. sometimes the idle is fine after driving it a bit but then when I am taking off from a stoplight or something it will hesitate really bad. I changed the spark plugs and wires just for the heck of it and still the same problem. the CEL finally came on and I have code 25 and 26 which translates into the engine running lean and the engine running fuel rich (What the heck??). I ordered an O2 sensor which comes in tomorrow and will change that out on Friday, I am hoping that helps, any other ideas?

Any obvious vacuum leaks?

No obvious ones.

Which engine do you have in your 4 runner. The 2.4 L4 or the 3.0 V6 ???

The O2 sensor would be almost the last thing I would change, but it’s paid for so you may as well throw that part into it.

As @db4690 mentioned, I would check for vacuum leaks. All those rubber hoses are already over 25 years old.
You could use a propane torch…unlit to test for leaks.
Remove any engine covers that may be in the way, and start the car. Then turn on the torch gas and aim it at each vacuum hose…following the hose from one end to the other. Then move on to the next hose.
When you pass the torch past a leak, the engine RPM will raise slightly.

THe Mass air flow Sensor could be the problem.

Yosemite

Thanks for reaching out! It’s the 3.0 V6, a buddy of mine also mentioned trying out the propane torch method to attempt to find a vacuum leak so I will be giving that a go this weekend. The O2 sensor replacement will be a good learning experience if anything, I’m really having a blast learning more about this car and working on it myself! Thanks again for reaching out, I will update if I get results from the torch test.

I have a Corolla of similar vintage. It sounds like the air/fuel ratio is incorrect for some reason. Test all the vacuum hoses and vacuum operated devices for vacuum leaks, especially the brake booster, which when it fails can create big vacuum leaks. Double check to make sure the engine is airtight all the way from the air filter box to the exhaust pipe. The other likely possibility is a misfire, which can cause a “rich” code. Suggest to replace the distributor cap, ignition rotor, since you’ve already changes the plugs and the wires. You may need to go to a shop that has an ignition system analyzer if you can’t spot any ignition system problems yourself. A faulty MAP/MAF sensor, or O2 sensor is a possibility. If you have an MAF sensor, try cleaning it. PCV and EGR problems are something else to consider. Try replacing the PCV valve, inexpensive. Have the valve clearances been checked? Has the throttle position sensor function been tested?

Thanks for the response! I will try those out and return with results!