HERE'S A QUIZ: What is the proper congressional response to an administration that is holding prisoners in secret facilities with no Red Cross access, asserting the right to treat those prisoners cruelly and inhumanely, and insisting that the president -- and the president alone -- can make the rules for how all detainees are to be dealt with and when (if ever) they are to be released?

If your answer is that Congress should further enable the administration by barring prisoners' last chance of judicial review, then you're on the same wavelength as Sen. Lindsey O. Graham (R-S.C.) and a plurality of his colleagues. Last week the Senate voted, 49 to 42, in favor of Mr. Graham's proposal to strip the federal courts of jurisdiction to hear challenges by inmates at Guantanamo Bay, Cuba, to their confinement or to the administration's plans to try some of them in a kind of military court. Senators announced a bipartisan compromise last night in the form of a plan that would allow limited appeals rights when military commissions convict someone or when they are designated enemy combatants. Assuming it is adopted tomorrow, that would be a significant improvement over the original language, although important problems would remain. As senators continue to work toward a final version, they should think hard about what they are doing and how their action will be perceived in the world.

Mr. Graham's underlying point isn't crazy; he's saying that foreigners held abroad should not enjoy the right of habeas corpus -- that is, the right to challenge their detention in a U.S. court. The problem is that his response comes after four years of Congress's abdication of its duty to set rules for handling detainees. If the removal of habeas rights followed the establishment and testing of a fair system of hearings and appeals, he could make a persuasive argument. As the first response of a Congress rousing itself from a four-year stupor, it is outlandish.

Blame for the current mess begins with President Bush, who insisted from the beginning of the war that he had all the legal authority he needed and could make up his own rules. The administration took forever to formulate rules; when it did, those rules came without congressional backing and, not surprisingly, sparked legal challenges.

The Supreme Court, again not surprisingly, involved itself more than it might have if Mr. Bush and Congress together had established a process. Last year the court asserted jurisdiction over Guantanamo, provoking a stream of cases from detainees. Last week the court agreed to hear a challenge to the Pentagon's plans for military trials at Guantanamo. If Mr. Graham's proposal becomes law, the court will not be able to hear that case.

We opposed the court's intervention last year, but the answer to the volume of cases it has produced is not to throw all of them out. Some concern inmates who may be held in error. While the litigation has been burdensome for the government, the burdens have been manageable; no judge has ordered any inmate released, for example. And the Graham measure would actually produce new litigation as lawyers sparred over its constitutionality and the question of whether other bases for court jurisdiction exist. If the administration were willing to set its detention policies on a better legal footing, a lot of the litigation would go away.

The military commissions provide an example. The administration announced the tribunals on the theory that war crimes suspects could not be tried in federal court or in the general courts-martial in which the military routinely tries soldiers accused of crimes. The commissions, as then-White House counsel Alberto R. Gonzales put it in an op-ed article, "can dispense justice swiftly, close to where our forces may be fighting, without years of pretrial proceedings or post-trial appeals."

Four years later and thousands of miles from Afghanistan, not a single suspect has been tried. Only nine are facing charges. The commissions suffer from basic problems of fairness and of being a system built on the fly. They have, in all significant respects, failed.

Preventing the justices from considering the commissions' legality will do nothing to address these problems; it will only sweep them under the rug. Congress needs to be making policy concerning Guantanamo, not shielding weak administration policy from judicial scrutiny.