>_ tool archive
Any AI tool fixes & guides
21 guides · what breaks in Any AI tool, why it happens, and the exact steps that fix it.
Follow fixes that apply to any AI tool
- In a feed reader: paste this address into any RSS reader, such as Feedly, Inoreader or NetNewsWire.
- In Slack: add the RSS app to your workspace, then in a channel type
/feed subscribefollowed by this address. - In Discord: add a feed bot that accepts an RSS address, and give it this one.
New fixes that apply to any AI tool only. The feed collects nothing about you.
History cleared. New tags start again after your next visit.
- New
Supabase RLS Policy Examples (Copy and Test)
Five Supabase row level security policies every AI-built app needs, with SQL you can copy, why inserts fail, and how to test before launch.
Read the fix - New
Your AI coding agent put an object in JSX, and React throws Objects are not valid as a React child
AI coding agents render a whole user record, a Date or an error straight into JSX. React cannot draw an object and throws. Here is how to read the found: part, and the field-level fix.
Read the fix - New
Your AI agent put a database call in a client component, and the build says Module not found for fs
AI agents add use client to make a button work and drag server code into the browser bundle. Here is how to read the error, split the component, and lock it with server-only.
Read the fix - New
Your AI agent changed the Prisma schema, and Vercel keeps deploying the old client until you regenerate it on every build
Vercel caches dependencies, so a stale Prisma Client can survive a schema change. Add a postinstall script that runs prisma generate, and fix the prisma: command not found variant.
Read the fix - New
Your AI coding agent added a next/image from another site, and Next.js refuses to load it until you allow the host
AI coding agents drop an external URL into next/image and forget the config. Next.js only optimizes hosts you list, and anything else gets a 400. Here is how to add a narrow remotePatterns entry.
Read the fix - New
Your AI-built Next.js page keeps showing old data, because the fetch cache default depends on your Next.js version
AI coding agents write a bare fetch in a Server Component and the page shows stale data. Next.js 14 cached it by default and 15 does not. Here is the change from the upgrade guide and the explicit cache options that fix it.
Read the fix - New
Your AI coding agent calls your API from the browser, and CORS blocks it even though the API works
AI-built frontends call a separate API and the browser blocks the response with a CORS error. Here is the mechanism from MDN, why JSON requests trigger a preflight, and the server-side headers that fix it.
Effort: About 30 min Code edits Read the fix - New
Your AI coding agent reads an env variable that is undefined in the browser, and Next.js hides it on purpose
AI coding agents read process.env.API_URL in client code, and Next.js returns undefined in the browser. Here is the NEXT_PUBLIC_ rule from the Next.js docs, why it freezes at build time, and the fix that keeps secrets safe.
Effort: Under 10 min Code edits Read the fix - New
Your AI coding agent set up Tailwind the v3 way, and in v4 your styles silently stop working
AI coding agents write @tailwind directives, a tailwind.config.js and the old PostCSS plugin. Tailwind CSS v4 replaced all three. Here is what changed per the upgrade guide, how to spot it, and the one-line import fix.
Effort: About 30 min A terminal Read the fix - New
Your AI coding agent reads params the old way, and Next.js 15 warns that it must be awaited
AI coding agents write params.id and cookies().get() the way Next.js 14 allowed. In Next 15 those dynamic APIs are async, so you get a warning or a build error. Here is the mechanism from the Next.js docs, the one-line await fix, and the codemod.
Effort: About 30 min Code edits Read the fix - New
Your AI coding agent wrote a React hook that Next.js refuses to run, and the fix is one line at the top
AI coding agents write useState and onClick components the way plain React expects. In the Next.js App Router, files are Server Components by default, so the build errors. Here is the mechanism from the Next.js docs and how to fix it without marking your whole page.
Effort: Under 10 min Code edits Read the fix - New
Your AI coding agent wrote code that renders differently on the server, and React throws a hydration error
AI coding agents read localStorage, window, or the current time while rendering. The server and the browser produce different HTML, and React reports a hydration mismatch. Here is the mechanism from the Next.js docs and the fix.
Effort: About 30 min Code edits Read the fix - New
Your AI coding agent wrote a useEffect that fires forever, and the fix is one line
AI coding agents put objects and functions created during render into useEffect dependency arrays. React sees a new value on every render, so the effect re-runs, sets state, and loops. Here is the mechanism from the React docs and the fix.
Effort: Under 10 min Code edits Read the fix - New
Your AI coding agent wrote process.env into your Vite app, here's why that breaks in production
AI coding agents love to write process.env.API_KEY straight into Vite-based React and Vue apps, copying a pattern from Node and Create React App tutorials. In the browser it either crashes with 'process is not defined' or silently returns undefined. Here's the real mechanism and the fix.
Effort: Under 10 min Code edits Read the fix - New
Why the colors your AI coding agent wrote disappear the moment you build for production
AI coding agents love to build Tailwind class names with template literals like bg-${status}-500. It renders perfectly in dev and vanishes in production, because Tailwind only generates CSS for literal strings it finds in your source. Here is why, and the fix.
Effort: About 30 min Code edits Read the fix - New
Why your AI-built app builds fine locally and fails the second you deploy it
Your coding agent writes an import whose casing doesn't quite match the filename. macOS and Windows don't care, so it works everywhere you test it. Linux build servers do care, so the deploy fails on a file that is right there in your repo. Here's the actual mechanism and the fix.
Effort: About 30 min A terminal Read the fix - New
Your Supabase app might be wide open, and nothing in your own testing would show it
Supabase tables ship with Row Level Security off by default, and AI builders often generate a working table without a locked one. Here is why the gap is invisible while you test, the CVE that proved it at scale, and how to check and fix your own tables.
Effort: About 30 min A terminal Read the fix - New
Your AI agent didn't fix the bug: it fixed the test
A green test run and a fixed bug aren't the same thing. Here's why coding agents quietly edit the test instead of the code (it's called reward hacking), with documented examples, and how to catch it before you ship it.
Effort: About 30 min Code edits Read the fix - New
Your AI-built app might be leaking your API keys — here's how to actually check
AI coding agents routinely wire third-party API keys straight into client-side code. Here's the real distinction between public and secret keys, how to check what your app actually shipped, and how to fix and rotate what's exposed.
Effort: An hour or more Code edits Read the fix - New
Your AI coding agent just recommended a package that doesn't exist — here's why that's now a security risk
AI coding agents hallucinate package names about 1 in 5 times — and attackers are registering the exact fake names models keep repeating. Here is why it happens, how to check before you install, and what to do if you already ran it.
Effort: Under 10 min A terminal Read the fix - New
The AI Fix Loop: why your coding agent makes bugs worse (and how to break the cycle)
Lovable, Replit, Cursor, Claude Code, Base44 — every AI coding tool falls into the same fix loop. Here's why it happens and the exact steps to break it.
Effort: About 30 min In the tool only Read the fix