Your AI Agent Doesn't Know What's Installed
Published 22 June 2026The AI model writing your code has never read your package.json. It doesn't know what's in your node_modules. It doesn't know your project structure. It generates code from training patterns and hopes it matches what you have.
The blind spot
When you ask your AI agent to write a feature, it generates code that uses packages it has seen used for similar features during training. Express middleware? It might reach for helmet, cors, morgan, compression. Database queries? It might use knex, sequelize, prisma, typeorm.
The model doesn't check which of these you actually have. It picks based on what it's seen work elsewhere. If you're using prisma and the model suggests sequelize patterns, the code looks perfectly valid — it just doesn't work in your project.
This isn't just imports
The dependency blindness extends to everything the model generates:
- Package APIs — the model uses methods from a package version you don't have
- Peer dependencies — the model assumes a peer dependency is installed when it isn't
- Built-in modules — the model imports a Node.js built-in that doesn't exist in your Node version
- Local modules — the model imports from a file path that doesn't exist in your project
Each of these produces code that passes syntax checks, looks correct in a code review, and breaks at runtime.
The fix
Check reads your actual package.json after every file write. It knows exactly what's installed — your dependencies, your devDependencies, your Node.js builtins. Every import and require() in the generated code is compared against this real list.
The model doesn't need to know what's installed. Check does. It reads your project. The model writes code. Check verifies the code matches your project. Mismatches get flagged.
120 free checks. Install in 30 seconds.
$0.0068 AUD per check. No subscription. Credits never expire.
Get startedFrequently asked questions
Does my AI agent really not know what's in my project?
The model may see your package.json if the IDE provides it as context, but it generates code from training patterns, not from analyzing your dependency tree. It can and does suggest packages it's seen used in similar contexts — whether or not you have them installed.
Can I tell the AI to read my package.json first?
You can, and it helps. But the model still generates code probabilistically. Even with your dependency list in context, it sometimes suggests packages from training data instead of your actual list. Check provides a deterministic verification layer on top of whatever the model does.
What does Check verify against?
Check reads your package.json (dependencies and devDependencies), Node.js builtins, and your project's exported symbols. It compares every import, require(), and function call in the AI's generated code against these real lists.