I've got what seems to be a similar problem with my 02 legacy wagon (automatic)
I changed the fuel filter, air filter, plugs, wires, and right now its at a garage, but the mechanic there ran the diagnostics but no sucess on what the problem is.
I'm looked at Muse's thread and am wondering if reprogramming the ECM solved the problem.
I'll post if we find anything new.