---
title: "Comment by Salman Parvez | ML Systems on \"Block deprecated packages before your coding agent installs them: a 50-line Claude Code hook\" | Hashnode"
description: "The agent seeing the deprecation notice and installing the package anyway is the part that stuck with me. That's a sub reading the recall notice on a product an"
url: "https://hashnode.com/posts/block-deprecated-packages-before-your-coding-agent-installs-them-a-50-line-claude-code-hook/6afe9ef196b0e40bfb6bce34/comment/6afee3e32d81cc8c28d38a45"
---

[Discussion](https://hashnode.com/posts/block-deprecated-packages-before-your-coding-agent-installs-them-a-50-line-claude-code-hook/6afe9ef196b0e40bfb6bce34)

Comment [Block deprecated packages before your coding agent installs them: a 50-line Claude Code hook](https://hashnode.com/posts/block-deprecated-packages-before-your-coding-agent-installs-them-a-50-line-claude-code-hook/6afe9ef196b0e40bfb6bce34)

[5d ago](https://hashnode.com/posts/block-deprecated-packages-before-your-coding-agent-installs-them-a-50-line-claude-code-hook/6afe9ef196b0e40bfb6bce34/comment/6afee3e32d81cc8c28d38a45)

The agent seeing the deprecation notice and installing the package anyway is the part that stuck with me. That's a sub reading the recall notice on a product and putting it in the wall. Checking at the moment of install, against the registry's current answer, beats trusting what anyone remembers. A hook that stops the call and points to a maintained option is the right shape for it.

[Redlio Labs](https://hashnode.com/@redliolabs)

[4d ago](https://hashnode.com/posts/block-deprecated-packages-before-your-coding-agent-installs-them-a-50-line-claude-code-hook/6afe9ef196b0e40bfb6bce34/comment/6afee3e32d81cc8c28d38a45#reply-6afff2db897dbf11d9b64f44)

That recall-notice comparison is spot on. What worried us most wasn't the old package itself. It was that the agent saw the warning and carried on without saying anything. Blocking at install time also makes the agent bring the decision back to a person, which matters as much as the block. Thanks for reading, Salman.
