It was also not clear whether Mr. Kelly’s charged language about the Dreamers would affect the charged negotiations on immigration that will soon consume Congress, though it was the latest evidence that Mr. Kelly, a retired Marine general once viewed as a curb on Mr. Trump, shares some of his most hard-edge views.
Head-spinning reversals, of course, are nothing new for Mr. Trump. His positions on issues can gyrate more wildly than the Dow Jones industrial average. His is a presidency that has made the extraordinary ordinary.
After these latest remarks, the White House swung into its customary role of cleanup. The deputy press secretary, Hogan Gidley, played down Mr. Trump’s charges of Democratic treason as “tongue-in-cheek,” while the press secretary, Sarah Huckabee Sanders, muddied the waters on whether the president really planned to shut down the government.
Mr. Trump’s casual embrace of a shutdown — after the last brief shutdown, which he portrayed as a Democratic betrayal of America’s troops — drew an impassioned response from Representative Barbara Comstock, a Republican who represents a moderate district in Northern Virginia, an area that is home to many federal workers.
“We don’t need a government shutdown on this,” she said, imploring Mr. Trump. “Both sides have learned that a government shutdown was bad. It wasn’t good for them.”
For others in Washington, however, there was a creeping sense of numbness. Mr. Trump has said so many outrageous things, has broken so many taboos and has insulted so many people that his latest outbursts no longer shock. To some, they seem more of the same.
It fell to Senator Jeff Flake, the lame-duck Arizona Republican who has emerged as a prime nemesis of Mr. Trump, to point out the novelty of an American president branding members of the other party as traitors because they did not celebrate him.
“Have we arrived at such a place of numb acceptance that we have nothing to say when a president of the United States casually suggests that those who choose not to stand or applaud his speech are guilty of treason?” he said from the floor the Senate. “I certainly hope not.”
Mr. Flake noted that “the president’s most ardent defenders use the now-weary argument that the president’s comments were meant as a joke, just sarcasm, only tongue in cheek.”
“Treason,” he thundered, “is not a punch-line, Mr. President.”
Part of the problem is that Mr. Trump’s most inflammatory comments do sometimes appear tossed-off. His claim that Democrats were guilty of treason came during a rambling speech at a factory near Cincinnati, where his celebration of the recent tax cut gave way to a litany of complaints about the stone-faced Democratic reception of his speech.
“Can we call that treason?” Mr. Trump mused. “Why not? I mean they certainly didn’t seem to love our country very much.”
The president embraced the idea of a shutdown during a White House meeting meant to dramatize the dangers of the gang MS-13. After listening to Representative Michael McCaul, Republican of Texas and the chairman of the House Homeland Security Committee, talk about how loopholes in the immigration laws allow violent criminals to get into the United States, Mr. Trump suddenly upped the ante with Democrats.
“If we don’t change it, let’s have a shutdown,” he declared. “We’ll do a shutdown. And it’s worth it for our country. I’d love to see a shutdown if we don’t get this stuff taken care of.”
Later, Ms. Sanders noted that the president did not view the spending bill and immigration as “mutually exclusive,” meaning that he would not necessarily precipitate a shutdown if Congress agreed on spending without meeting his demands on immigration.
At the same time, she questioned the patriotism of Democrats who sat on their hands during Mr. Trump’s discussion of the thriving American economy. “Democrats are going to have to make a decision at some point really soon,” Ms. Sanders said. “Do they hate this president more than they love this country? And I hope the answer to that is, ‘No.’”
For many in Washington, the best defense against Mr. Trump is to treat him as less than serious. On Monday, he went after the ranking Democrat on the House Intelligence Committee, Representative Adam B. Schiff of California — or, as Mr. Trump nicknamed him, “Little Adam Schiff” — for being, he said, a liar who illegally leaked confidential information.
Mr. Schiff has drafted a Democratic rebuttal to the classified House Republican report that raised questions about the conduct of the F.B.I. in investigating links between the Trump campaign and Russia.
“Must be stopped!” Mr. Trump said on Twitter of the congressman.
Mr. Schiff, taking a page from Senator Bob Corker, Republican of Tennessee, when Mr. Trump subjected him to ridicule on Twitter a few months ago, replied with the tone of a weary parent, coping with an unruly toddler.
“Mr. President,” he wrote, “I see you’ve had a busy morning of ‘Executive Time.’ Instead of tweeting false smears, the American people would appreciate it if you turned off the TV and helped solve the funding crisis, protected Dreamers or…really anything else.”