Thats weird, I know for a fact it does run for throwing weapons. I wasn't dealing with ammo, but it should work as well.
Here the code from CPP to fix the automatic unarmed attack:
//1.71: fix for automatic unarmed attack when stack of throwing weapons gets destroyed
if(!GetIsObjectValid(oItem) && oItem != OBJECT_INVALID && GetAttackTarget(oPC) != OBJECT_INVALID && GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC) == OBJECT_INVALID)
{
AssignCommand(oPC,ClearAllActions());
}
this is in unacquire
I was also able to reproduce that behavior with throwing weapons, darts specifically. Thanks for digging that code up btw.