You're givinga full access token to (basically) a random number generator.
And now you're surprised it does random things?
The Solution?
Don't give a token to a random number generator.
If only it was a random number generator. It's closer to a random action generator.
When I think about taking the random numbers, mapping them to characters and parsing that into commands that you then run... I feel like I am loosing my mind when people say that is a good idea and 'the way of the future'.