The Taliban had agreed to a session for the two sides to get to know one another. They insisted that government officials attend only in their own personal capacity, but Mr. Ghani’s government pushed to have them attend as government representatives.

Afghan officials say Mr. Ghani is troubled by being frozen out of the negotiations as important agreements are being structured. The talks come in the middle of a fierce presidential campaign, with some of Mr. Ghani’s rivals proposing an interim government. The Afghan president has insisted on continuing with elections, which have been repeatedly delayed but are now scheduled for September.

Mr. Khalilzad has said that he hopes to reach a final peace agreement before the elections.

In the meantime, Mr. Ghani on Monday convened a traditional grand council assembly, known as a loya jirga, to discuss peace for Afghanistan. About 3,000 delegates from around the country, selected in a process dominated by Mr. Ghani’s supporters, are meeting this week to reach a consensus on peace and a postwar Afghanistan. Their decisions are not legally binding.

One of the issues likely to be discussed in Doha this time is a fine-tuning of the Taliban pledge to prevent terrorist groups from staging attacks from Afghan territory. The State Department said in a statement on April 26 that the Taliban had committed to cut ties with Al Qaeda and to fight Islamic State loyalists in Afghanistan.