The rules for spending command tokens say that you can spend a token to "have one trooper be unaffected by Retreat!" How does this interact with the fact that Hidden Deployment and Camouflaged troopers reveal themselves when a Retreat! triggers? Can you spend the token immediately at the moment that the Retreat! happens to keep from having to reveal them? Or does the retreat trigger, the figures reveal themselves, and then you spend the token to undo their Retreat! state, but it's too late to stop them from revealing?
You can spend a token to cancel retreat at any time in the active turn, which would include before the Retreat check in the Tactical Phase of the turn.
It's certainly not clearly explained in the rules. But retreat (at least the effect which pulls units out of hidden deployment or marker) is a state. You can't cancel a state until you get it, at which point the effects of the state will already have been applied.