Treat AI output like a pull request from a fast but inexperienced junior developer. Keep changes small, ask for one thing at a time, and read every diff before accepting it. If you cannot explain a change, do not merge it.
Put guardrails in place first: automated tests, a linter and type checks. Ask the AI to write tests along with the code, then confirm those tests actually fail when the code is wrong. Keep a short project notes file with your conventions so the AI reuses existing helpers instead of inventing duplicates. Every so often, ask it to find duplicated logic and dead code, and do that cleanup in separate commits. The danger is rarely one bad function. It is hundreds of unreviewed ones that nobody on the team understands.