A Missouri appeals court reversed the conviction but said it was powerless to insist that prosecutors there revive the old deal. Instead, the court said Mr. Frye could once again plead guilty or go to trial.

That was, Justice Ruth Bader Ginsburg said, a “futile remedy” that left Mr. Frye no better off. There was no reason to think a judge would sentence him to fewer than three years if he pleaded guilty again.

On the other hand, said Justice Samuel A. Alito Jr., a former prosecutor, proving that a defendant was driving with a revoked license is easy. “If there ever was a slam-dunk trial,” he added, “that seems to me that’s the slam-dunk trial.”

The second case argued Monday concerned Anthony Cooper, whose lawyer advised him not to plead guilty to assault with intent to murder although he had shot a woman four times. The lawyer, Brian McClain, said conviction was impossible since the bullets had struck the victim below her waist, and he persuaded Mr. Cooper to reject an offer of four to seven years.

The advice was incorrect. Mr. Cooper was convicted and is serving 15 to 30 years.

In both cases argued Monday, Justice Stephen G. Breyer said there might be some circumstances when concerns about fundamental fairness required courts to order that earlier plea offers be reinstituted.

In Mr. Cooper’s case, he wondered about what should happen if a defendant received a 50-year sentence after rejecting a plea deal for two years “where the misbehavior of the lawyer is crystal clear.” In Mr. Frye’s case, he mused about depriving “a person of his liberty for 40 years instead of six months because the lawyer, which he is guaranteed, fell down on the basic, fundamental, obvious duty of communicating the relevant plea agreement.”

Justice Scalia said trying to solve either problem would leave the courts “in the soup,” as Mr. Cooper had received a fair trial and Mr. Frye had entered a valid guilty plea.