In my car it was the brake light sensor. VW fixed it free of charge under recall.
Did you ever figure out the issue of what sensor it was? I'm having the exact same problem with my 01 Jetta...Did it end up being the infamous o2 sensor? after replacing my coolant sensor, brake sensor and coil packs, I'm really at a loss for what's up.
I'm having a very similar issue on my Audi (gasp) and this thread came up on a search. If it's determined that your issues aren't being caused by the brake light switch (bls), here's a couple audi links troubleshooting the issue. I had this problem when starting the car in the morning in zero degree weather:
Audiforums (read past the chipping and coil pack info, pg 2 spells it out) http://www.audiforums.com/m_725348/tm.htm
Audiworld ('03 GTI owner) http://forums.audiworld.com/a4/msgs/2249847.phtml
Modified by wiscaudi at 8:20 AM 12-8-2007
I just went out and disconnected the battery and at first the lights were off, I drove around the area for about 10 miles and everything seemed fine, then once I was pulling into my neighborhood it started running really rough and the check engine light stated flashing and now my car sounds like a subaru lol not sure whats going on? any ideas?
Flashing CEL indicates a bad coil... Disconect them 1 @ a time... if you pull one off the and the car sounds the same thats your bad pack.. Or get it scanned to determine what one is bad...
Now yesterday when your EPC light was on, was it running rough as well? you could have a bad MAF also which would cause that light to come on..
If your car falls on its sack at 2 grand and EPC or CEL light comes on and then your car drives fine after a while then does it again later its the CKP sensor.. They act up when its hot out. Its the Cam or Crank position sensor, I forget right now sorry.... Easy fix minus the 125 bucks at the dealer..