Trump said Friday he was pleased with talks on ending the war, 18 years after the September 11, attacks that prompted the US invasion of Afghanistan in the first place.
In recent days several US officials have suggested that an accord could be imminent in discussions with the Taliban in Qatar.
The US negotiator, Zalmay Khalilzad, is expected to return to the region very soon in hopes of sealing an agreement with the Afghan rebel force.
Such a potentially historic accord has raised an outcry from an eclectic assortment of critics in Washington, ranging from neo-conservatives to former Democratic administration officials to ex-military heroes.
In tweets, interviews and op-ed pieces in newspapers they are cautioning against hastily bringing home the 14,000 US troops in Afghanistan, a warning which some hope will also score points ahead of next year's presidential election.
And they are calling on Trump to treat this war as he did North Korea and its nuclear weapons and insist on no deal rather than a bad deal.
"Under no circumstances should the Trump administration repeat the mistake its predecessor made in Iraq and agree to a total withdrawal of combat forces from Afghanistan," retired general David Petraeus, who used to command those soldiers, warned in a piece for The Wall Street Journal.
He was referring to Barack Obama and how the withdrawal of US forces from Iraq helped fuel the emergence of the Islamic State group.
The main points of the peace accord being negotiated with the Taliban are known: US soldiers would withdraw in exchange for a pledge from them not to let Al-Qaida or the Islamic State group operate in the territory that the Taliban controls.
There would also be an immediate ceasefire, and the Taliban would begin talks with the Afghan government, with which the rebels have until now refused all dialogue.
- A 'messy, forever war' -
Withdrawal of US troops is sought by the American public, has been promised by Trump and is a talking point of several Democratic presidential hopefuls. The risk is that it will intensify the war.
This "will depend on the details," said Laurel Miller, former senior US State Department official responsible for Afghanistan and Pakistan.
There is much speculation as to what those details might entail.
For instance, it seems the Taliban are prepared to call a ceasefire with US troops but not with the Afghan army.
A total, absolute withdrawal of US forces has at least been on the negotiating table and it has never been ruled out in Washington.
"If we leave Afghanistan without a counter-terrorism force, without intelligence-gathering capabilities, ISIS will re-emerge, al Qaida will come back, they will occupy safe havens in Afghanistan, they will hit the homeland, they will come after us all over the world," Senator Lindsey Graham told Fox News.
Graham, who takes credit for persuading Trump to keep some troops in Syria after announcing a total pullout, insisted that Afghanistan needs a "continuing US presence" and America requires a "meaningful counter-terrorism force" there.
Trump has promised only a strong intelligence gathering presence. And some in his administration want any future counter-terrorism operations to be launched from other countries.
"Effective counter-terrorism operations in Afghanistan -- and, just as important, in neighboring tribal areas of Pakistan -- will prove all but impossible absent an enduring US footprint on Afghan soil," Petraeus wrote in a piece co-signed by Afghanistan expert Vance Serchuk.
Another issue is the timetable of a US withdrawal. Trump, seeking a second term in office, wants to announce the pullout before the election in November 2020.
But there have been signs in recent days pointing to a withdrawal actually completed around the time of the election.
Setting a timetable now "means the Taliban will enter subsequent talks among Afghans having already achieved their main goal and with their stature and bargaining position thereby enhanced," Miller wrote in Foreign Policy.
She argued that there should be a phased US withdrawal linked to specific progress in the Afghan peace process, such as adoption of a revised constitution with power-sharing features and subsequent elections.
Without a clear pledge from the Taliban to repudiate Al-Qaida and respect women's rights, among others, and without verification mechanisms, "we will not be ending the war -- we will be retreating and ceding the battlefield to our enemies, including the organization that harbored the terrorists responsible for killing nearly 3,000 Americans on 9/11," said Republican lawmaker Liz Cheney.
At the Pentagon, officials are cautious.
"It's an ugly, messy, forever war. It is probably going to be messy to get out," one military source at the Pentagon said.