Current and former Trump administration officials said they sympathized with the Afghan government’s frustration. For years, the United States refused to hold reconciliation talks with the Taliban unless the Afghan government had a seat at the table. Under President Trump, however, the patience of the United States with a 17-year-long war has run out, and pressure mounted to open talks with the Taliban, even on their terms.

“There’s a cost to this because it means the Taliban has achieved their goal,” said Laurel E. Miller, who served as acting special representative until early in the Trump administration. “But what’s the alternative, if you want to get the peace process started?”

After the latest talks in Doha, Mr. Khalilzad said the United States and the Taliban had a draft agreement on two of four elements necessary for a settlement: assurances that Afghanistan would not become a haven for terrorism and a timeline for an American military withdrawal.

Still to be hashed out are a cease-fire and the composition of a new Afghan government, which would almost certainly include the Taliban. Those negotiations, Mr. Khalilzad said, would require the participation of Afghanistan’s current government.

“The conditions for #peace have improved,” he wrote this week on Twitter. “It’s clear all sides want to end the war. Despite ups and downs, we kept things on track and made real strides.”

Critics of Mr. Khalilzad said that by cutting out the Afghan government, he reinforced the perception that the negotiation was less about securing the future of a peaceful Afghanistan than clearing the way for an American withdrawal, which Mr. Trump has wanted since taking office.

“Khalilzad is a capable diplomat who faces a difficult balancing act,” said Husain Haqqani, a former Pakistani ambassador to Washington, who played host at a dinner for Mr. Mohib. “To get the Taliban to talk to him, he feels he must emphasize the prospect of U.S. withdrawal before getting to other subjects.”