I don't see what's so complex about it.
First, our major concern should be the U.S. Constitution. Not the Geneva Convention or international law.
Second, this obviously isn't a conventional war where we are fighting a standard uniformed opponent that we can make a treaty with. There is really no "cessation of conflict" and so we are under no obligation to ever let these guys go. We are perfectly justified in holding them indefinitely. Though, I'd prefer to just have them executed and be done with it.