My guess is that the law is the same in all jurisdictions as well as in Pennsylvania. If one enters a guilty plea pursuant to a bargain, the terms of which that the defendant perform certain acts, such as cooperate with the prosecution, testify against a co-defendant, etc., the defendant's plea is not normally entered into Court until AFTER his cooperation has been completed. In some instances, he will be allowed to plead guilty conditioned on future performance, but in such an instance the president judge would withhold sentencing until after completion of the conditions. If a defendant changes his mind, has a sudden change of heart, refuses for whatever reason to complete his end of the bargain, then the deal is off, and he returns to the same status as if he had never entered the plea. He loses no rights, and any information divulged pursuant to the plea bargain may not be used against him. It is for this reason that Judges normally inquire in detail about a defendant's guilt and require the defendant to declare his guilt in detail in open court and do so freely, voluntarily, and without fear or promise of reward or punishment.
One clarification. If the sentence one receives is probation and one violates the probation, the probation violation is a separate offense in itself. One is afforded all his rights in defense of the probation violation charge; but the original charge has been disposed of and the defendant may not resurrect his rights there.