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.