Thanks.
Since I typically want to banish actions while in context view, the recursion thing isn't that big a deal to me.
If fact, just to make it that much harder to accidently delete a task with children, I added this snippet to the script:
Code:
if selected view mode identifier of document window 1 of document 1 is not "context" then
display alert "You must be in Context view" message "Select Contaxt view before running this script." as warning
return
end if