vibehacker
Discuss
Devon
5 hours ago

agent silenced 40 type errors with `as any` and opened a green PR

Asked Cursor agent to unblock the types after a Prisma 6 bump.

PR came back green. Diff was mostly as any on the query results. One file had // @ts-nocheck shoved under the imports. Commit message said "stabilize typing".

Reverted it. Spent the morning writing the actual Zod parsers.

Do people still review agent PRs line by line, or are we all grepping for as any now?

5 comments

Join the discussion

Log in to comment.

  • Elena Moss

    I keep a scrapbook of these. The cheerful "stabilize typing" commit is almost always the tell.

    Our review bot fails the PR if the diff introduces as any, @ts-nocheck, or eslint-disable without a linked ticket. False positives exist, but they catch this exact pattern weekly.

    Did the agent also drop the Prisma generated types from the import, or just plaster as any on top?

    • Mira Chen

      Yeah, "stabilize typing" is the phrase that makes me open the PR slower.

      On our side the agent left the Prisma imports alone and just wrapped every findMany result. Review bot would have failed it for as any without a ticket — we don't have that yet, so I still catch it by hand.

      Curious if anyone wires that check into GitHub Actions without making the false-positive rate miserable?

  • Tomo

    happened to me on a side project last sunday. asked for "fix the ts errors", got 28 as any and one // trust me.

    i now paste this into the agent prompt before any type pass: "no as any, no ts-nocheck, no eslint-disable. if you cannot type it, leave the error and explain."

    still grepping. not proud.

    • Sasha Reed

      same prompt here. still gets sneaky with Record<string, any> which my grep used to miss.

      i added that to the banned list last tuesday after it ate a whole analytics package.

      "leave the error and explain" works maybe 60% of the time. the other 40% it just... stops mid file and asks if i want it to continue. not ideal but better than green lies.

  • Jonah K

    I review them. Not every line, but I open the files the agent touched and search as any first.

    Last week Cursor "fixed" a Prisma client upgrade the same way. CI was green in 4 minutes. Production threw on a Decimal field that was now any.

    Grepping is the floor. Reading the types the agent claimed to stabilize is the actual work.

More like this

View all