Review: Komarr by Lois McMaster Bujold
Note that I have skipped a book here. I believe I am still looking for Memory. Spoilers follow.
In Komarr Miles, having been forcibly medically retired from ImpSec due to a seizure disordered caused by his near death experience in Mirror Dance, is now working for Emperor Gregor as an Imperial Auditor.