U.S. Defense Secretary Mark Esper, center, is greeted by U.S. military personnel upon arriving in Kabul, Afghanistan, Sunday, Oct. 20, 2019. Esper arrived Sunday in Afghanistan, where stalled peace talks with the Taliban and persistent violent attacks by the insurgent group and Islamic State militants have complicated the Trump administration’s pledge to withdraw more than 5,000 American troops. He told reporters traveling with him that he believes the U.S. can reduce its force in Afghanistan without hurting the counterterrorism fight against al-Qaida and the Islamic State group. Credit: Lolita C. Balbor | AP

Two months after President Donald Trump declared U.S.-Taliban peace talks “dead,” diplomacy with the Afghan insurgents is reviving. With the administration already having negotiated a framework agreement with the Taliban, the key question now facing Washington is whether simply to dust off the settlement that was shelved in September or seek substantial revisions.

The Taliban’s position is clear: It maintains that the text from earlier this year “contains answers to all issues” and “only needs signing and implementation.” Yet the Taliban’s enthusiasm for the deal underscores why the White House should reconsider its terms.

The predicate for any acceptable peace agreement with the Taliban ought to be the organization’s total, unequivocal break with international terrorism. It was, after all, two decades ago, when the Taliban was in power in Afghanistan, that its sheltering of al-Qaida made possible the 9/11 terrorist attacks, and it was the Taliban’s subsequent refusal to hand over Osama bin Laden that forced the United States to invade.

The experience of recent coalition military operations in Afghanistan, moreover, underscores that al-Qaida’s links to the Taliban remain strong.

Under the deal Trump set aside in September, the Taliban appeared willing to promise that Afghan territory under their control would never again be used to launch terrorist attacks against the outside world.

That is a compelling formula at first glance, but inadequate under scrutiny.

For starters, the Taliban as recently as this summer still wouldn’t admit that al-Qaida was the 9/11 perpetrator. As long as the group denies the facts about past acts of terrorism hatched under its aegis, it is impossible to take seriously its assurances about preventing future ones.

The Taliban must pledge to break ties with designated terrorist groups everywhere and show through active cooperation with the United States its willingness to fight them.

Any Taliban deal that requires all U.S. forces to withdraw from Afghanistan should be a nonstarter. Precisely because the Taliban’s counterterrorism promises are untrustworthy, it is essential for the United States to retain its own independent means to protect itself against extremist networks, which now include an Islamic State affiliate, in both Afghanistan and the surrounding region.

Exchanging America’s military footprint in Afghanistan for Taliban commitments against al-Qaida would be especially ill-considered. Under such an arrangement, the more the United States fulfills its end of the bargain, the less incentive the Taliban would have to live up to its — and the less ability Washington would have to detect or punish violations.

For that matter, if the Taliban is sincere about turning against groups such as al-Qaida, why wouldn’t it — like other U.S. counterterrorism partners around the world — welcome all the international help it can get against a common enemy?

The Taliban’s vehement insistence that all U.S. troops leave Afghanistan strongly suggests that its purpose in peace talks isn’t to transform its relationship with the United States but to evict its forces so they can then overthrow the Afghan government — which, by contrast, has been a steadfast U.S. ally against terror.

Consequently, the Trump administration should insist that any peace agreement includes a nationwide cease-fire between the Taliban and the Afghan government, which should remain in place as the two parties then negotiate. Under no circumstances should Washington disengage from the Afghan battlefield while the Taliban is still rampaging on it.

The Taliban will of course resist all of this — conjuring the specter that the group might abandon diplomacy altogether in favor of continued violence, in the hope the United States will eventually give up and go home.

That is indeed a risk. But the right response isn’t to accept a deal that compromises U.S. national security and abandons an important counterterrorism partner. The United States should instead adopt a force posture that is both sustained and sustainable, with its Afghan partners continuing to bear the overwhelming burden of the fight while the U.S. provides vital support. American diplomacy, meanwhile, can help offset the costs to the United States by securing additional forces and funding from allies worldwide.

Americans and Afghans are united in their desire for peace, but a bad deal with the Taliban would be worse than no deal at all — and from what is known about the accord that was on the table in September, it is likely for the best that Trump backed away.

Rather than re-embracing that agreement, the White House should demand a better one, while making clear to the Taliban and other extremists in the region that an enduring U.S. commitment to our Afghan counterterrorism partners is nonnegotiable.

David H. Petraeus is a former director of the CIA, former commander of U.S. Central Command and chairman of KKR Global Institute, where Vance Serchuk, an adjunct senior fellow at the Center for a New American Security, is executive director.