“That’s something that’s going to get worked out between the Afghan government and the Taliban as they enter negotiations,” he said. “We will have to wait and see. But we will certainly encourage the parties to engage in those negotiations.”

At the heart of the agreement is a timeline for the United States to withdraw troops from Afghanistan after an 18-year conflict and a pledge by Mr. Trump to wind down American’s involvement in what he has described as endless wars.

The deal excluded the Afghan government and left many critical points ambiguous — including the fate of prisoners. It also calls for the release of 1,000 members of the Afghan government’s security forces who are being held by the Taliban.

The Taliban have long demanded the release of their estimated 15,000 members in Afghan prisons as part of a peace settlement, and had assured their battlefield commanders last fall that thousands would be freed as part of a deal with the United States.

But ahead of the agreement on Saturday, senior Afghan government and Western officials said American negotiators had committed only to “facilitating” a discussion with the Afghan government over releasing the 5,000 Taliban prisoners. Because neither the Taliban nor the Afghan government appeared willing to compromise on the issue, it was expected to require further attention by the chief American negotiator, Zalmay Khalilzad.

It was not clear how, or when, the more firmly worded commitment to releasing Taliban prisoners was added to the agreement before Mr. Khalilzad signed it in Doha with Mullah Abdul Ghani Baradar, a Taliban leader.