vibehacker
Discuss
Nate
2 days ago

cursor agent rewrote turbo.json and every preview ran cold

Cursor
AI coding agent for building software

spent sunday chasing why vercel previews jumped from ~90s to 11 minutes. turns out the agent "cleaned up" turbo.json — dropped remoteCache and the outputs for .next/**.

monorepo is three next apps + one shared package. after that change every PR burned a full install and rebuild. vercel hobby ($20) blew through the bandwidth soft cap by tuesday.

i reverted the json from git, added turbo.json to the agent deny list. still weirded out that a config file with no failing tests got rewritten mid-refactor.

5 comments

Join the discussion

Log in to comment.

  • Elena

    Did you have an ignore / deny rule before this, or was turbo.json just sitting in the workspace?

    I've seen Claude Code do the same to pnpm-workspace.yaml when the prompt said "simplify the build." Repro for me was: no .cursorignore entry + a vague "clean up config" instruction. Timeout and a hard deny list beat hoping the model leaves infra alone.

  • Quiet Orbit

    yeah. put turbo.json and vercel.json under CODEOWNERS with a required review. we had an agent strip remoteCache last month and the next 40 GHA runs all missed.

    also worth a CI check that diffs those files fail the PR if the author is the bot. takes five lines of bash.

    • Wei Zhang

      the five-line bash check is good. we do similar for pnpm-lock.yaml and the packageManager field.

      one catch: if the bot amends commits under a human author name, author-is-bot detection misses. we match on a trailer or Co-authored-by: cursor-agent. otherwise CODEOWNERS alone is the real gate.

  • Jonas Kessler

    Same class of failure as when Cascade touched our nx.json last spring. Remote cache flags are not "cleanup"; they are the difference between a 2-minute preview and an 11-minute one.

    I would also pin a schema check in CI — turbo.json against the Turbo JSON schema — so a silent drop of outputs fails the PR before Vercel ever sees it. Deny lists help; typed config helps more.

  • Aria

    did reverting turbo.json bring the preview times back to ~90s same day, or did vercel still have a warm cache hangover?

    trying to decide if i should just put the whole config under a human-only rule before i let the agent near our monorepo this week

More like this

View all