- Symptoms
- Any task that involves adding or bumping a dependency ends with the entire package-lock.json rewritten: lockfileVersion churn, integrity hashes flipping between sha512 values, and optional platform deps (esbuild, @rollup binaries) added or dropped. The diff is routinely 2,000+ lines for a one-package change. If you ask it to revert, it runs `npm install` again and regenerates the same mess.
- Likely cause
- The agent defaults to `npm install` for anything dependency-shaped, and its shell often resolves a different npm than your shell (nvm default vs project .nvmrc). npm 10 vs npm 11 produce structurally different lockfiles, so the lockfile gets rewritten to match whichever npm the agent found first on PATH.
- Affected versions
- 2.3.0 – 2.4.1
- Environments
- npm and pnpm workspaces; worst in monorepos with an .nvmrc the agent ignores
- Operating systems
- macOS, Linux
- Confidence
- High confidence · verified Aug 3, 2026
+1, seeing this on 2.4.0 with pnpm too. It falls back to npm when pnpm isn't in the non-interactive PATH and then you get a package-lock.json in a pnpm repo, which is its own special hell.