THE IDEA that someone serving a prison sentence may have a legal right to escape seems, on its face, absurd. Yet the U.S. Court of Appeals here ruled last week that four men who broke out of the D.C. Jail two years ago should be acquitted if they can convince a jury they did so because of the intolerable conditions under which they were held. Our immediate reaction - and we suspect that of most people who read the news accounts - was that the judges were putting us on. Conditions in the D.C. Jail were bad - nobody doubts that. But could that be sufficient justification for prisoners to break out?

Before leaping to a conclusion, it is a good idea to take the time to stagger through the court's opinion and the blistering dissent that accompanies it and to give the matter a little reflection. What the judges have done then seems considerably less silly or dangerous than it first appears to be. The opinion, written by Chief Judge J. Skelly Wright and joined by Judge Carl McGowan, is full of legal technicalities and will provide lawyers with material for hours of arguments. But what it comes down to is a distinction between the right of a prisoner to escape from confinement (which they say no one has) and the right to escape from a particular place of confinement (a right they say everyone has under certain conditions). That is neither novel in the law nor absurd in theory. You have only to ask yourself whether a prisoner about to be clubbed to death by guards has a legal and moral right to flee.

What the Court of Appeals and some other courts around the country are trying to do is to define precisely the situations in which a prisoner can be justified in escaping. The recent opinion appears to hold that it is not a crime to break out of jail if there is no other way to avoid beatings or homosexual attacks or to obtain essential medical care as long as the escapee intends to surrender to other law-enforcement authorities once the danger is past or the care obtained.

That's not a bad rule. It punishes those who escape to avoid serving their sentences while exonerating those who escape only to get away from a particular set of intolerable conditions. The bitter dissent of Judge Malcolm R. Wilkey was aimed far more at the definitions the court attached to certain words, like "intent" and "duress," than at the general principle. While those definitions do make a difference, particularly in close cases, we think most juries will be able to distinguish between just and unjust escapes.