How do you stop AI agents from pulling in heavy npm pip packages for a 5 line problem?

Asked an agent to handle a simple date formatting and string parsing edge case the other day and its first instinct was to install two external libraries instead of writing 10 lines of vanilla code

For quick prototypes it's fine but when you're trying to keep a project lightweight and zero-dependency watching the agent bloat package.json or requirements.txt gets annoying fast

Do you put strict no new dependencies rules in your system prompt or just reject the diff whenever it touches dependency files?

8 views

Add a comment

Replies

Best

package.json goes on the dont touch list in our task spec, adding a dep needs a yes first