WASHINGTON — As he prepared to finally emerge from the White House on Monday morning, after days of complaining that he had been cooped up there waiting for Democrats to negotiate with him to end a 24-day government shutdown, President Trump momentarily seemed to forget where he was headed.

“Getting ready to address the Farm Convention today in Nashville, Tennessee,” the president said in a Twitter message. “See you in a little while.”

Farmers in Tennessee would have to wait: Mr. Trump was actually scheduled to visit an agricultural conference in Louisiana on Monday. And when he did, he was on the ground for little more than two hours before flying back to the White House.

Mr. Trump has made it a repeated point of pride that he has been confined to the capital in recent weeks while waiting for his Democratic adversaries to give in and agree to spending $5.8 billion on his border wall, but he has actually been stuck in what his allies say is an uncomfortable limbo. It has made him wax wistfully about being unable to visit Mar-a-Lago, his gilded bunker by the sea where if members disagree with him on anything — from the firmness of the house meatloaf recipe to his isolationist approach to foreign allies — they tend to keep those opinions to themselves.