Skip to content

Bug: npx agentguard fails with 404 — unscoped package name not registered on npm #848

@jpleva91

Description

@jpleva91

Bug Description

Running npx agentguard fails with a 404 error because the unscoped package agentguard is not registered on npm:

npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/agentguard - Not found
npm error 404 'agentguard@*' is not in this registry.

The actual package is published as @red-codes/agentguard, so npx agentguard only works when the package is already in local node_modules/.bin/. If node_modules is missing or the command runs from a different directory, npx tries to fetch the non-existent unscoped name and fails.

Impact

This breaks all Claude Code hooks that reference npx agentguard ...:

  • npx agentguard claude-hook post (PostToolUse)
  • npx agentguard status (SessionStart)
  • npx agentguard claude-hook notify (Notification)
  • npx agentguard claude-hook stop (Stop)

Any user following the docs to set up hooks with npx agentguard will hit this if they haven't already installed the package locally.

Suggested Fix

Either:

  1. Register agentguard as an unscoped package on npm (or a redirect/alias) so npx agentguard works out of the box
  2. Update docs and examples to use npx @red-codes/agentguard everywhere

Environment

  • @red-codes/agentguard: 2.4.0
  • npm: latest
  • Node: v20.x

Workaround

Use the scoped name: npx @red-codes/agentguard instead of npx agentguard

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions