I had something similar happen about 2 weeks ago.....went to pass a truck on I78 (on an incline) and it fell flat on it's face...wouldn't go above 3000 rpm & the indicator said it was in 3rd gear. Another trip before this one (going to WV), I was getting a shuddering going up hill, in various places (60-70 mph range, using cruise control). I also have a very sooty tailpipe, occasional miss @ idle, and occasional rough idle @ stop lights/signs..
Took it in.....no codes, no problem found. They called the 'hotline' and the only they could think of is poor quality fuel.
Every time it happens from now on, it goes into the shop.