The novel “The Corporation Wars: Dissidence” by Ken MacLeod was published for the first time in 2016. It’s the first book in The Corporation Wars trilogy.
Carlos is dead but his mind has been digitized and sent to another solar system, where it’s activated in a virtual world. There, Carlos discovers that he was condemned to fight alongside other people in the same situation against robots that have become sentient and consequently violated the laws governing artificial intelligence.
To perform the service on behalf of what are called DisCorporates to which they have been sentenced, the minds of Carlos and the others are trained to control robotic bodies to use against the sentient robots. Soon the situation starts turning out to be more complicated than Carlos thought.