The old peacenik slogan was, "What if they gave a war and nobody came?" Today, the question is, "What if they gave a war and nobody noticed?" The American mission in Afghanistan has borrowed a page from Harry Potter, draping itself in a cloak of invisibility.

Our war has lasted 17 years and cost upward of $1 trillion, including $45 billion this year. It has killed more than 2,300 Americans and wounded more than 20,000. Yet we recently completed an election campaign in which the conflict was rarely mentioned, much less debated. From a political point of view, this war is about as important as storms on Saturn.

But the spilling of American blood doesn't stop. On Tuesday, three U.S. service members were killed by a roadside bomb. Last week, an Army Ranger was fatally shot in a firefight. And for what?

When we invaded in 2001 to strike back at the Taliban, which had given safe haven to al-Qaida as it plotted the 9/11 attacks, victory seemed attainable. But the mission to eliminate a specific threat to the U.S. homeland soon gave way to a more ambitious project to make Afghanistan a stable, peaceful, and democratic nation. Before long, we were stuck in the Forever War.

George W. Bush and Barack Obama each failed to find the formula for success, and each decided to leave a steaming pile of hard choices to his successor. They stayed in Afghanistan not because they knew how to win the war but because they didn't. They elected to keep feeding American troops into the meat grinder rather than admit failure.

The result has been an endless loop of futility. The latest report of the Special Inspector General for Afghanistan Reconstruction concluded that the Afghan government has control of no more than 55 percent of the country's districts—down 21 percent from the peak. Nearly 12 percent of the jurisdictions are in the grip of the Taliban, and 32 percent are up for grabs.

The Afghan security forces now bear the brunt of the fighting, with an average of 25 deaths per day. Thanks to steady attrition, their ranks are now the smallest they've been since 2012. Civilian casualties, however, are up nearly 40 percent this year compared with 2017.

We have tried ramping up to overwhelm the insurgents. Obama started in office intending to bring the war to an end, telling his aides, "I don't want to be going to Walter Reed for another eight years." He increased our troop strength from about 30,000 to more than 100,000, with the goal of turning the tide of the war enough for us to go home.

It made a modest difference. The Kabul government gained ground, and the Taliban lost it. But a U.S. commitment on that scale was not sustainable. And the long-sought improvements in Afghan governance and military prowess failed to materialize. As soon as Obama drew down forces, things went south once again.

Rather than pull out entirely, he agreed to keep some 8,400 troops in Afghanistan. Donald Trump, reluctant to look weak, nearly doubled that number. "The American people are weary of war without victory," he declared.

Wrong. The war causes no visible fatigue in the public because it requires no discernible contribution from the public. In any event, victory has eluded him, too.

For a long time, our options have fallen into two categories: bad and worse. The bad is withdrawing and letting the Afghans settle the war themselves, which could easily lead to a collapse of the government and a Taliban return to power. The worse is staying indefinitely, sacrificing American lives to preserve a stalemate.

But the enemy is sure to outlast us. The outlook recalls the comments of the prime minister of North Vietnam to a New York Times reporter early in the Vietnam War. "And how long do you Americans want to fight, Mr. Salisbury?" he asked. "One year? Two years? Three years? Five years? Ten years? Twenty years? We shall be glad to accommodate you."

The Taliban have shown comparable endurance. Their saying is, "The Americans have all the watches, and we have all the time."

Three American service members gave their lives Tuesday in support of an effort whose only remaining purpose is postponing the inevitable. They won't be the last to die for this mistake.