Play it out, without the players. If you're worried about how to treat misbehaving mages, set them loose. Once they go and do the things that can cause problems, decide how the authorities would react.
Sweep it under the rug. Place a bounty. Or call in the army.
No matter what happens, the authorities will gather to decide how to react to the next event, or prevent it from happening. So, you're the DM: what gets discussed at that gathering?
My more direct answer(s):
Imprisoning casters: take his goods, clasp his wrists, and put a muzzle on him. Problem solved.
Manipulating the court: don't allow dudes in robes to hang out in the shadows of the congress. And if that doesn't work, give each authority a periapt of mental freedom.
-Heinrich smiles. Cynthia smiles. Hermit attacks!