A coding agent asked to "fix the build" or "add caching" can touch the lockfile for reasons you never approved. It may bump a transitive package to resolve a conflict, add a helper library, or re-resolve the whole tree when an install runs. The npm documentation notes that package-lock.json is automatically generated for any operation where npm modifies node_modules or package.json, and that it records the exact tree so other installs reproduce it (npm docs). Every changed line in that file is a dependency decision, and most reviewers read it as noise.
That noise hides risk. Research on AI-generated code describes hallucinated and unverified dependencies as a common failure mode (Endor Labs). More directly, the Cloud Security Alliance documents the PromptMink campaign, in which packages were crafted to be selected by AI coding agents, and a single malicious transitive dependency entered a project through an agent co-authored commit (CSA Labs). An agent will not read GitHub stars or recall your team's incident history. A numeric cap does not judge a package, but it forces any large change in the dependency graph to arrive as an explicit, separate decision.
The review standard from Google's engineering practices puts this in plain terms: reviewers should approve a change once it definitely improves code health, and they should not spend review time on noise. Checking in changes that worsen the system is not justified outside emergencies (Google review standard). A lockfile budget moves the trivial noise to automation, so the human review covers design, not 400 re-sorted lines.



