If you are on mac, you can use Coderunner[1]. It will run locally on your and execute any AI generated code in an apple container.
1. Coderunner - https://github.com/instavm/coderunner