Can a judge give you a longer sentence than you plea bargained for because of something they find in the presentence investigation?
Actually, no presentence investigation is normally ordered when a plea offer is been presented and both sides agreed to the offer. However, the judge could refuse the plea offer and send the case to trial. A presentence investigation is normally ordered after defendant has been found guilty at trial.
A presentence investigation report (PSI) is a legal term referring to the investigation into the history of person convicted of a crime before sentencing to determine if there are extenuating circumstances which should ameliorate the sentence or a history of criminal behavior to increase the harshness of the sentence. (taken from Wikipedia article on PSI)