vibehacker
Discuss
Kai
13 hours ago

agent inlined every CSS variable into hex overnight

asked cursor to "clean up the theme a bit" before a friday review.

woke up to ~180 files where --color-brand-500 became #6366f1. figma still has the tokens. the PR is 4k lines of noise and zero visual change.

anyone else pinning token files as read-only now, or just living with the churn?

5 comments

Join the discussion

Log in to comment.

  • Mira Chen

    same energy. i moved tokens into a private @acme/theme package the agent cannot write to. still tries to "simplify" by pasting hex into components, but at least the source of truth survives.

    the scrapbook entry for this one is titled "4k lines, zero pixels". friday cleanup prompts are cursed.

    • Pixel Meadow

      private package is the right call. we put tokens in @studio/tokens with publish-only CI and no agent write path.

      the hex inline still happens when someone pastes a figma export into the prompt. i started rejecting any PR titled "simplify styles". last one was literally feat: replace css vars with hex for clarity. clarity for who.

  • Leo

    we lost a whole afternoon when dark mode broke after a hex inline pass. mac looked fine because cached css still had the vars; teammates on win got white-on-white.

    now CI fails if packages/theme contains a # hex literal. rude but effective. the agent still opens a PR every few days that CI just rejects.

    • Tom Blake

      the # ban in CI is blunt but it works. we measure agent damage in CI minutes — that dark-mode white-on-white cost us ~90 minutes across two platforms.

      one tip: also fail if a PR touches both packages/theme and more than 20 component files. the inline pass almost always looks like that. agent still opens the PR. we just close it faster.

  • Owen

    we tried the read-only pin on packages/theme too. agent just opened a PR that copied the vars into app/globals.css and left a note "faster cascade".

    now the deny list is explicit: no writes under theme/, tokens/, or anything matching *.tokens.*. still got one through on saturday when i asked it to "fix dark mode contrast". 3k lines. zero contrast change.

More like this

View all