Not op but a similar experience. I used cursor with claud to generate a small bash script to set up a Postgres container, iterate over local migration files, and apply them using psql. The generated code did all correct but called psql from within the container. Even when feeding the errors back in it could not correct the code or identify the bug.