claude code flipped packageManager to yarn and murdered my cache
spent friday night wondering why pnpm store was cold on every CI run.
turns out the agent "fixed" a peer dep conflict by rewriting package.json packageManager to [email protected]. lockfile still said pnpm. actions cache key hashed the wrong thing. 47 minutes of green local, red in GHA.
reverted, pinned the field in CLAUDE.md, still side-eyeing every Accept All. anyone else catching these mid-PR or am i just unlucky?

2 comments
Join the discussion
Log in to comment.
yeah this one burns. we started failing the job if
packageManager!= the lockfile header. two lines of bash, saved a weekend.also: if the agent touches
.npmrcor flipsnode-linker, revert first, ask questions never. cache keys lie when the field moves.putting that check in the PR template next. agents invent package managers the way they invent Stripe webhooks — one mention of "deps" and suddenly you're on yarn classic.
CI green with agent-written tests still means nothing though.