Figuring out what to do is easy. Just do nothing.
I did that once. The rogue player went off on his own to sneak inside a warehouse. I was a rogue/fighter and knew better. I asked him not to do it, but he wanted to be the lone wolf (and I'm sure he thought he'd get his own loot and XP).
He got caught, got overwhelmed, and then our PCs saw the town guards hauling him down the street towards a building where they burn criminals. Everyone asked me what I thought we should do and I said, "I ain't doing a thing. There are too many guards and he got himself in this mess."
The player got pissed at us for not rescuing him. It was a 2e Dark Sun game and I wasn't about to risk being a hero for some idiot rogue. That's a rough setting to play in, you gotta play it smart.
Nothing is more irritating then a party rogue getting caught stealing in a town and then we have to figure out what to do.
Figuring out what to do is easy. Just do nothing.
Jane's Addiction
I've been caught stealing;
once when I was 5...
I enjoy stealing.
It's just as simple as that.
Well, it's just a simple fact.
When I want something,
I don't want to pay for it.
I walk right through the door.
Walk right through the door.
Hey all right! If I get by, it's mine.
Mine all mine!
Years ago, our party thief got caught stealin'...

I struggle with that as a GM. In the past I've just had the thief PC imprisoned, which is too boring. In fiction, being caught isn't boring, it leads to more adventures. I struggle with the implausibility of stuff like the authorities offering to release the thief if he does some secret work for them, which is the obvious place to take it.I know some DMs and players like having rogues who go on their own and do things. I am not one of them. Nothing is more irritating then a party rogue getting caught stealing in a town and then we have to figure out what to do.
I struggle with the implausibility of stuff like the authorities offering to release the thief if he does some secret work for them, which is the obvious place to take it.
I struggle with that as a GM. In the past I've just had the thief PC imprisoned, which is too boring. In fiction, being caught isn't boring, it leads to more adventures. I struggle with the implausibility of stuff like the authorities offering to release the thief if he does some secret work for them, which is the obvious place to take it.
I like that being a non-drinker makes someone a bore. *eyeroll*
When the party goes to do something idiotic, like consume alcohol, I can just go do something fun and of varying legality and be totally in character.
One way is having the thief have to do a job that authority can't or that it feel is to dangerous for its own people.

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.