My issue was my instructions.md file telling it to think too much before writting files and running tests. So it was in a rabbit hole of ethernal thinking.
Now I can tell it to create crud pages and it will generate and run tests for those pages as well.
You can set only allowed filepaths for file handling. I don't there's an explicit way to guardrail it to not run something bad from a shell though (althogh you need --no-preserve-root nowadays in that rm command). You'd have to check every command before running.
It's anecdata but I've been doing this stuff for a good few months now and it's not tried to delete my filesystem or lock me out of an airlock, just yet.
My issue was my instructions.md file telling it to think too much before writting files and running tests. So it was in a rabbit hole of ethernal thinking.
Now I can tell it to create crud pages and it will generate and run tests for those pages as well.