This is a difficult one for me.
If Mr. Bergdahl is guilty of something , he can be accused and tried now. No this is not likely, as no one really wants to prosecute, if this guy wants to be Taliban he wont have much trouble getting a ticket back. If he wants to be a citizen of the US he will be fighting his reputation , but people have had it worse.
Those five Talib prisoners were cheap to give up. We weren't planning to execute or even try them were we? So we were going to release them at some point, a years probation is a meager fig leaf, but the next five we let go won't even have that.
President Obama isn't benefiting a lot , as usual, those who like him are gushing with praise of this rescue and those who don't are concentrating on the illegality.
So all in all I think I approve of the deal that the president made, I have reservations, but on the balance I see more positive in getting an American free, than in detaining prisoners of war past the end of our real involvement.