Cursor would also write a plan document, which was useful when working on larger tasks (due to context size). I still find that part useful today.
It helps to think more abstractly when approaching problems like this.
You can use Docker’s sbx or similar VM/containers for that.