The mishnah in Makkos (beginning of 2nd chapter) teaches that if the person inadvertently killed someone through performing a mitzvah, the murder is exempt from the punishment of exile, which I believe the Gemara specifies to mean that he is karov le-oneis (i.e. it is considered an accident and he is absolved from responsibility).
One of the examples the mishnah brings is the shaliach beis din (court emissary) that has to whip someone sentenced by the court to lashes. In such a case, if he hits him, and the victim dies, the emissary is absolved from exile. Note that there is a medical doctor there to determine whether the criminal can withstand lashes, and how many.
My question is, even though the actual action is performed by the emissary, I would think that the true cause of death is the doctor, who misjudged the medical condition of the victim, permitting the extra blows that killed him. That is certainly more than a mere accident, it boundaries on negligence.
What happens to the doctor? I would think that since the mishna does not describe him, his fate is easier than the emissary's (who does the action causing the killing) and so the doctor is free to go -- but why is that reasonable, given that it was his decision which killed the victim?