If you sandbox anything it'll be safer than otherwise. Not really sure what you're suggesting. I would still want the code reviewed regardless of the safety measures in place.
I wrote a program that basically auto organizes my files for me. Even if an AI was sandboxed and only had access to the relevant files and had no delete privileges, I would still want the code reviewed. Otherwise it could move a file into a nonsensical location and I would have to go through all possible folders to find it. Someone would have to make the interfaces/gateways and also review the code. There's no way to know how it's working, so there's no way to know IF it's working, until the code is reviewed. Regardless of how detailed you prompt, AI will generate something that possibly (currently very likely) needs to be adjusted. I'm not going to take an AIs raw output and run it assuming the AI did it properly, regardless of the safety measures.
Ridiculous that Grammarly even attempted to do this. The article was good, but at the end, though they hedged, they fell into the same trap everyone seems to. AI is not better at coding than it is at writing and their tinkering with this does not suggest that. Grammarly had a bad product, but realistically, there was likely just no effort put into this aspect of the software. Maybe I'm way off base, and I don't support AI either way, but I just think it was a poor way to end the article. Programmers think it's good for art, artists think it's good for programming, it's almost like it's easier to see flaws in a field you're familiar with.