The pressure control solenoid is a known common problem. I found an explanation but was unable to find it in a search.
Anyway the valve apparently starts to leak and there seems to be a sensor in the transmission that gets an erroneous reading due to the leak. This in turn causes the PCM to command too high a pressure and thus the hard shift. I am surmising that this erroneous reading is also the reason it will set a code. Plus, because it is commanded from the PCM due to the erroneous reading, the next time you start the car it gets reset and all is well for a while.
If someone knows where the original explanation is, please link it here.
2001 Bonneville SE - Dark Bronzemist Metallic - Mods: 180* thermostat, iPod adapter, Digital OnStar Upgrade
Planned Audio System upgrades: Front & Rear 7 Band Equalizer, Amps, Hands Free Bluetooth Cell Phone kit
Planned mods: Front PEM, Ported LIM, Ported Heads, ZZP SR Rockers, Aluminum Gaskets & Reprogram PCM