AI Added a Route That Bypasses Auth Middleware
AI registered a new endpoint outside the authenticated route group, exposing internal data without checks. Detect the gap and enforce auth as a default.
Cursor / Codex / Claude Code — apply failures, indexing, wrong file edits, rollback.
AI coding tools fail two ways: "it broke my code" and "it never read the whole project." This hub groups those by tool — Cursor, Codex, Claude Code — and adds rollback / recovery / guardrails.
AI registered a new endpoint outside the authenticated route group, exposing internal data without checks. Detect the gap and enforce auth as a default.
AI confidently calls a method that does not exist — wrong arg order, made-up option name, fabricated return type. Diagnose by pinning to real source.
AI-written migration runs clean on an empty dev DB but blows up on prod with constraint or data errors. Fix with dev-prod parity and safety checks.
AI wrote a query or update that holds long locks on a production table, blocking reads and writes. Identify the pattern and rewrite it to be lock-friendly.
AI generates code with deprecated APIs, fixes one lint error, then re-introduces the same pattern in the next file. Pin the rule and ground the prompt.
AI runs npm install and creates package-lock.json in a pnpm-only repo, breaking the lockfile invariant. Pin the manager and lock the rules.
Agent keeps trying the same fix or oscillates between two states. Break the loop fast.
Classic case: AI added a dep without committing the lockfile, or relied on a local Node version.
After an AI run, npm run build fails. Diagnose with diff review, type-checking, and selective revert.
Agent rewrote .env with placeholders or removed entries — recover and prevent.
Agent imports `src/utils/superhelper.ts` that was never created — common, fixable.
Your branch + AI edits conflict with main. Resolve without losing AI improvements.
Agent ran an install or removed deps and now your lockfile is at war with the team's.
Agent created `UserList2.tsx` next to the original or scattered duplicates. How to clean up safely.
AI "simplified" code and quietly removed a branch your users actually rely on.
AI produces code that doesn't type-check — usually wrong types, any-casts, or missing generic parameters.
Claude Code editing the wrong files, duplicating existing functions, missing key files? It's almost never the model — it's missing project context. Seven ways to make Claude Code actually read your codebase.
Cursor pulls in old / vendored / generated files into context. Fix the index and ignore lists.
A 200-line AI diff isn't safe just because it compiles. Read it in the right order.
Two agents (Cursor + Claude Code) edited the same file. Merge cleanly, don't panic.