On the night of Nov. 3, U.S. and Afghan Special Forces in helicopters landed in a village on the outskirts of Kunduz, Afghanistan, hoping to kill or capture local Taliban leaders planning another major attack on the city, the capital of Kunduz province in the country’s north. Instead, the militants led them into a trap.

An hourslong battle erupted. By the time it was over, two U.S. and three Afghan soldiers had been killed, nine had been wounded, and some 30 civilians lay dead in the rubble.

U.S.-trained...