WASHINGTON — The Taliban are in retreat, the Afghan military is on the brink of assuming control of the country, and the government in Kabul is one step away from being able to provide security across the land. So three successive presidential administrations have said over 16 years about the war in Afghanistan.

Yet devastating attacks on villages, convoys, government offices and hotels continue.

Three strikes over the past two weeks have killed 128 people, mostly civilians, in Kabul, the Afghan capital, alone. The latest came on Monday, when Islamic State militants stormed an Afghan military training base, killing at least 11 soldiers.

In coming months, the total number of American troops in Afghanistan will grow to an estimated 15,000. Nearly a third of them — 4,000 — will have been sent under President Trump’s new war strategy, which he is expected to promote during his State of the Union address on Tuesday night.

“We’re going to finish what we have to finish,” Mr. Trump told reporters Monday at the start of a lunch at the White House with United Nations ambassadors on the Security Council. “What nobody else has been able to finish, we’re going to be able to do it.”