A state appeals court reversed his conviction but said it did not have the power to order the state to reduce the charges against him. That left Mr. Frye roughly where he started, with the options of going to trial or pleading guilty without the benefit of a plea deal.

Justice Kennedy wrote that Mr. Frye should have been allowed to try to prove that he would have accepted the original offer. But that was only the beginning of what Mr. Frye would have to show to get relief. He would also have to demonstrate, Justice Kennedy wrote, that prosecutors would not have later withdrawn the offer had he accepted it, as they were allowed to do under state law. Finally, Justice Kennedy went on, Mr. Frye would have to show that the court would have accepted the agreement.

There was reason for doubt that Mr. Frye could prove that prosecutors and the court would have ended up going along with the original 90-day offer, as Mr. Frye was again arrested for driving without a license before the original plea agreement would have become final.

Justice Scalia, in a dissent joined by Chief Justice John G. Roberts Jr. and Justices Clarence Thomas and Samuel A. Alito Jr., called all of this “a process of retrospective crystal-ball gazing posing as legal analysis.”

The second case, Lafler v. Cooper, No. 10-209, concerned Anthony Cooper, who shot a woman in Detroit in 2003 and then received bad legal advice. Because all four of his bullets had struck the victim below her waist, his lawyer incorrectly said, Mr. Cooper could not be convicted of assault with intent to murder.

Based on that advice, Mr. Cooper rejected a plea bargain that called for a sentence of four to seven years. He was convicted, and is serving 15 to 30 years.

Justice Kennedy rejected the argument that a fair trial was all Mr. Cooper was entitled to.

“The favorable sentence that eluded the defendant in the criminal proceeding appears to be the sentence he or others in his position would have received in the ordinary course, absent the failings of counsel,” he wrote.