Does the judge have to accept the plea agreement?
I would say no, but it is likely he would.
Maybe there are some lawyers out there that can say definitely.