An agent that runs an install is making a change to your software supply chain. A lockfile is the machine-readable record of the exact versions resolved for every direct and transitive dependency, and it exists to make builds reproducible and to let you verify the integrity of what gets installed (Pants on lockfiles). Once an install runs and you commit the resulting lockfile, you ship whatever the resolver picked, including packages you never named.
The failure mode is not that installs break. It is that installs succeed and quietly change a lot. The distinction between the manifest (what you asked for) and the lockfile (what you got) is exactly where drift enters, and drift can produce non-reproducible builds, silent security regressions, and inaccurate SBOMs because most SBOM tooling reads the lockfile to determine what is actually installed (sbomify on lock file drift). An agent that runs npm install instead of npm ci will regenerate the lockfile rather than fail on a mismatch, which is how a deployment ends up with versions nobody tested.
Lockfiles also follow very different design decisions across package managers, which matters when you write estimation logic: npm, pnpm, Cargo, Poetry, Pipenv, Gradle and Go all generate and evolve their lockfiles differently, and a study of that design space found developers commonly struggle with maintaining and interpreting them (the lockfile design study). Any estimator you write has to be per-ecosystem, not generic.
Safety gates for agents are usually framed around permissions, intent confirmation and argument validation (the 12 preflight checks). Those gates decide whether a tool call is allowed. This article adds the missing gate for installs: whether the change is small enough to hand to a reviewer in one piece.



