Mr. McConnell was moving very cautiously. Before the holiday break, he had pushed through the Senate with no objection a resolution to extend funding for all federal agencies into February, only to see it quickly torpedoed by Mr. Trump and House conservatives. It was an embarrassing outcome for the Senate leader, and Mr. McConnell was in no rush to make that mistake again, preferring instead to wait for a White House plan to end the shutdown.

On the other side of the aisle, Democrats would typically be furiously trying to find a way to get the government back online. Early last year, Senate Democrats relented just a few days into a shutdown and capitulated on an immigration issue to reopen the government. This time, Democrats believe Mr. Trump has boxed himself in with his demand for money for a wall that they consider ill advised and publicly unpopular. They are not about to help him out of his predicament.

“President Trump is holding the government hostage over his wall, using the well-being of millions of Americans as hostage in a futile attempt to get what he wants: a concrete border wall,” said Senator Chuck Schumer of New York, the Democratic leader.

Democrats, looking at a much more favorable Senate map in 2020 compared with a difficult 2018, do not see much political risk in standing firm against Mr. Trump. In fact, at this point, they see picking a fight with the president as politically advantageous.

They view the shutdown as damaging to Republican senators who could face difficult re-election challenges in 2020, including Cory Gardner of Colorado, who has broken with his colleagues and called for reopening the government without border wall funding.

Mr. Trump and his allies, on the other hand, see the fight as critical to his political standing. Facing an emboldened and empowered Democratic House, the president intends to keep his conservative base firmly in his corner, and standing up for his long-promised wall is one way to do so. Early signs last month that he would relent on the wall money drew a quick rebuke from the right.

It is a recipe for a prolonged impasse.

Other factors are also at work in keeping the government shut down. The first two and a half weeks of the interruption have occurred during the holidays, when many workers are off and the demand for government help is not as great.