Former FBI Director James Comey appears to have capitulated in his legal effort to fight a congressional subpoena to give a closed deposition, but he also walked away with some accommodations. Just before Thanksgiving Day, the House Judiciary Committee and the House Committee on Oversight and Government Reform jointly subpoenaed Comey and former Attorney General Loretta Lynch to provide a deposition in a closed hearing. The subpoena for the two former officials to appear was part of the Republican-led investigation into the Justice Department’s handling of investigations into Hillary Clinton’s email practices and Donald Trump’s nexus to Russian election interference – what has largely been an effort to shield President Trump from investigative fallout.

Comey had objected to a closed deposition because of the committees’ history of selective leaking, according to his attorney David N. Kelley. A closed deposition would create “a shadow on the witness but bright lights for the committee member who seeks partisan advantage by peddling a misleading account of the witness’s testimony,” Kelley said. Comey then went to court. This past Thursday, he filed a motion to quash the congressional subpoena. As it became clear Comey faced an uphill legal battle, he agreed Sunday to withdraw his motion and testify, subject to a few negotiated accommodations. It is important to understand what he got out of it.

Comey raised fair points in his motion. I share his concerns about Congress’s long-running failure to safeguard the due process and reputational interests of witnesses that testify before it. I chronicled some of Congress’s failures and abuses in a law review article that called for judicial intervention in truly extreme cases of witness mistreatment. From the get-go for Comey though, I’ve said the likelihood of his obtaining a win at the courthouse approached zero. After his hearing, Comey and his attorney must have reached the same conclusion.

Congress has legitimate investigative power, and Article I, Section 5 of the Constitution grants the Senate and House each the power to “determine the Rules of its Proceedings.” Previous motions to have a federal judge quash a congressional subpoena have failed. For example, in 1956, a district court refused to quash a congressional subpoena on First Amendment grounds because the “courts have no authority to speak or act upon the conduct of the legislative branch of its own business, so long as the bounds of power and pertinency are not abused.” (“Pertinency” relates to the relevance of the congressional inquiry and the committees’ jurisdiction to the information sought).

What’s more, in a 1975 case — Eastland v. U.S. Serviceman’s Fund — the Supreme Court held that the Speech or Debate Clause precluded judicial review of a pending congressional subpoena. Rather, those seeking to raise a legal challenge to a congressional subpoena have had to refuse to comply and then raise their arguments as a defense to the resulting criminal prosecution for contempt. As Comey noted in a tweet, it is “hard to protect my rights without being in contempt.” It’s not a great, or particularly fair, system. But it is a model that has been in effect for almost a century.

In contrast to the merits of his case, Comey had a meaningful chance of being able to run out the clock on Congress’s lame duck session while Republicans remain in charge. Unlike the Senate, which is a perpetual body because only a third of its members are up for reelection each cycle, the House starts anew every two years. That is not a functional problem for a party that remains in power, but if Congress changes hands, then subpoenas driven by partisan divide — like the one Comey received — will most likely not be reissued by the new committee chairs. So here, subpoenas issued by GOP leaders this Congress will automatically expire before the new Congress starts on January 3, 2019, and the newly installed Democratic chairs will not likely reissue them.

But Comey’s clock-running strategy was not to be. Judge Trevor N. McFadden quickly scheduled a hearing last Friday and, at that hearing, made it clear he was unlikely to rule in Comey’s favor. Judge McFadden indicated he would rule on Comey’s motion on the following Monday (Dec. 3). That combination of quick timeline and bleak prospects for success presumably set the wheels in motion for Comey’s agreement to sit for the interview, behind closed doors or not. Republicans appeared willing to grant Comey some minor accommodations to avoid any surprises or unanticipated consequences of a judicial ruling.

It was laudable that McFadden fast-tracked consideration of Comey’s motion. Allowing Comey to win as a matter of judicial delay would have undermined Congress’s investigative power. That would be especially damaging in a situation like this in which Comey’s substantive case for judicial intervention was weak.

What accommodations did Comey get?

The Washington Post quotes Kelley, Comey’s lawyer, on the terms of the new deal: “so long as the interview proceeds as a voluntary interview, an FBI representative will be present to advise concerning the disclosure of FBI information.”

Per these terms, the committee will withdraw the subpoena, which will technically make the interview voluntary. That’s mostly just a talking point, but it would theoretically allow Comey to walk out of the interview without immediately facing contempt exposure. Rather, the committee would have to reissue a subpoena (with the attendant time lags required by notice) and then have Comey fail to comply before a contempt of Congress citation would be ripe.

It is unclear from public reporting whether Comey will give evidence as a deposition under oath or as a transcribed interview, however that is really a legal formality because — as we’ve seen with others entangled in the Russia investigation like Rick Gates, Alexander Van der Swaan, and Michael Cohen — the false statements statute, 18 U.S.C. § 1001, enforces truth-telling to federal investigators functionally as effectively as the perjury statutes that require sworn testimony.

Comey also noted that the committee agreed to publicly release the transcript of his appearance 24 hours after his witness appearance. That represents a significant concession by the committee – and one that should allay, to a large degree, Comey’s concerns about selective leaking. Of course, 24 hours may feel a bit like infinity if a GOP staffer immediately leaks a selective statement coming out of the hearing to capture the first news cycle.

The deal permits Comey to be accompanied by FBI counsel as well as his own personal lawyer. One of the sticking points over the years has been some congressional committees’ refusal to allow both agency and personal counsel to be present with witnesses during their depositions and transcribed interviews. While the House Judiciary Committee rules are silent on the matter, the House Committee on Oversight and Government Reform Rule 15(e) states: “Witnesses may be accompanied at a deposition by counsel to advise them of their rights….Observers or counsel for other persons, or for agencies under investigation, may not attend.” This is a source of great consternation to executive branch agencies. Since some of the Republicans’ public accusations against Comey are about his creation and disclosure of memoranda related to his service as FBI director, the FBI has legal interests intertwined with Comey’s testimony.

Finally, after reaching the recent agreement, Comey emphasized his ability to speak publicly about his testimony. But that was always the case. A committee can’t prohibit a witness from speaking about their testimonial experience unless the information at issue was itself classified or otherwise restricted. Having an FBI representative may strengthen Comey’s hand. If he decides to speak about his testimony — to correct selective leaks for example — he can rely on the FBI representative’s presence to support the claim that the matters were not restricted/classified.

What did the House get?

First and foremost, the House committees will likely get whatever evidence they’re seeking from Comey without having to face the risk – ever so slight – of an adverse court ruling. They will be able to question him behind closed doors, without television cameras, so they can control the atmosphere. Moreover, Comey’s public complaints may have shamed the committees into a deal that protects Comey from selective leaking by agreeing to release the transcript after 24 hours. In that sense, the committees have inoculated themselves on this charge should they proceed into additional rounds of public recriminations about Comey.

Now, we can turn our attention to reading Comey’s testimony once released, and taking any selective leaks with a grain of salt before then.

Photo of former FBI director James Comey on a book tour in Berlin, Germany, by Carsten Koall/Getty Images.