All of this comes as Mr. Karzai — whose personal security was once handled by American special forces — is voicing support for Russia’s annexation of Crimea and praising Russian President Vladimir V. Putin’s rejuvenation of Soviet-era investments in Afghanistan. This snub to President Obama, consistent with White House struggles to negotiate the security pact, makes Mr. Obama’s Afghan exit strategy seem naïve at best. A pillar of that strategy is the presence of aid workers beyond the troop drawdown; reduced American leverage in Afghanistan means exposing these men and women to lethal violence.

What’s at stake is not only security for aid workers, but American credibility in the region. In December 2009, Obama promised to focus American assistance in Afghanistan on “areas, such as agriculture, that can make an immediate impact in the lives of the Afghan people.” But with programs like Roots of Peace being attacked even in the relatively secure environs of Kabul, there is little hope that American aid will reach those who need it most.

American leaders understand that inaction is not an option in Afghanistan. Doing nothing would echo America’s disengagement after Soviet withdrawal from Afghanistan over two decades ago, which helped speed the country’s spiral into extremism and its rebirth as a haven for Al Qaeda.

As it plans its military exit strategy, America must craft a human development strategy that accounts for the constraints facing aid programs in Afghanistan. Aid workers who remain must be afforded enough security to do their jobs. Without that, no amount of American assistance will be worth the risk, and the real cost of development after the troops leave — or severely restrict their mission — could be too high to sustain.

I’ve often wondered what would have become of us that day in Kunduz had American troops not been nearby. This isn’t an argument for using more military force in Afghanistan. But I know all too well what so many victims of extremism have known for decades: Good will alone cannot protect against those determined to wreak havoc for ideological ends. Defending against those who would sabotage the needed humanitarian work of mine-clearing, say, or improving educational opportunities for girls is a different kind of mission.

What that mission would look like is a question for military planners, but front-line aid workers should be part of the conversation. Policy makers who recognize the vital importance of development to Afghanistan must not underestimate the perils of assistance in a country still wracked by poverty and instability. That would only endanger more lives.

Biljana Hutchinson worked on development aid projects in Afghanistan from March 2009 to July 2010.