AFTER PRESIDENT TRUMP publicly toyed with the idea of firing special prosecutor Robert S. Mueller III this summer, a bipartisan group of senators introduced two bills that would shield Mr. Mueller from being dismissed. Mr. Trump has been quiet on the question of Mr. Mueller's investigation as of late. But the Senate Judiciary Committee recently sent a strong signal to Mr. Trump, holding a hearing Sept. 26 on the legislation that showed bipartisan support for protecting the special counsel.

Under the Justice Department regulations by which Mr. Mueller was appointed, the attorney general may fire the special counsel only for cause, such as misconduct. (Because Attorney General Jeff Sessions has recused himself from the Russia investigation, Deputy Attorney General Rod J. Rosenstein, who appointed Mr. Mueller, has the power to fire him.) But the president might demand that Mr. Rosenstein dismiss Mr. Mueller, or throw out the regulation and dismiss Mr. Mueller himself. Either decision would raise serious constitutional questions.

The proposed legislation seeks to solve this problem by requiring that a court review the special counsel's dismissal. One bill, introduced by Sens. Lindsey O. Graham (R-S.C.) and Cory Booker (D-N.J.), would mandate that the attorney general — in this case, Mr. Rosenstein as acting attorney general — gain the approval of a panel of three federal judges before firing the special counsel. The second bill, by Sens. Thom Tillis (R-N.C.) and Christopher A. Coons (D-Del.), would give Mr. Mueller the option of appealing his firing to the three judges.

These bills aren't just an exercise in Democratic opposition to a Republican president. Each is sponsored by a bipartisan pair of senators and has received support from both sides of the aisle during the committee's hearing. While committee Chairman Charles E. Grassley (R-Iowa) held back from endorsing the legislation, he made clear his view that "there is a robust role for Congress in overseeing the Executive Branch."

Despite the committee's approval, it's not clear whether either bill will make it to the floor of the Senate for a vote. It's also not clear whether either would receive enough votes to become law — let alone override a likely presidential veto. Even if one did, it's an open question whether such a law would survive a constitutional challenge. And that's before we ask whether there would be any point in passing such legislation in the first place. If Congress feels that it would be unacceptable for the president to dismiss the special counsel investigating him, it can respond to such an act with a mechanism already available: impeachment.

But Mr. Trump shouldn't take any comfort in doubts over the wisdom or constitutionality of the legislation. Whether or not either bill goes forward, the Judiciary Committee's sober hearing was a warning shot, signaling that Mr. Trump cannot expect to trample over the constitutional order without a response from Congress.