WASHINGTON — By the time President Trump woke up on Thursday morning, he was feeling upbeat. And as he watched television news reports about his fiscal agreement with Democrats, he felt like telling someone.

He picked up the phone and called the two Democratic congressional leaders, Senator Chuck Schumer of New York and Representative Nancy Pelosi of California. “The press has been incredible,” he gushed to Ms. Pelosi, according to someone briefed on their call. He was equally effusive with Mr. Schumer, boasting that even Fox News was positive.

A few hours later, Mr. Trump went on TV himself, vowing to turn a one-time spending-and-debt deal brokered out of expediency into a more enduring bipartisan alliance that could transform his presidency. He signaled openness to a Democratic proposal to eliminate the perennial showdowns over the debt ceiling, and he repeated his desire to cut a deal to protect younger illegal immigrants from deportation.

But even as Republicans fumed at being sidelined, many in Washington were skeptical that the moment of comity would last. Although Mr. Trump has at times preached bipartisanship, he has never made it a central part of his governing strategy. While he may have been feeling energized on Thursday by the collaboration, he is a politician driven by the latest expression of approval, given to abrupt shifts in approach and tone. He is a man of the moment, and the moment often does not last.