Skip to content

[cli-tools-test] compile: mcp-inspector.md fails with npm not found even with strict: false #18413

@github-actions

Description

@github-actions

Problem Description

The mcp-inspector.md workflow fails to compile because npm is not installed in the environment. This occurs even though the workflow frontmatter sets strict: false, and the compile MCP tool is also called with strict: false. The workflow itself is structurally valid.

Command/Tool

  • Tool: compile (agenticworkflows MCP tool)
  • Affected workflow: .github/workflows/mcp-inspector.md
  • Run ID: 22421222131 (2026-02-25)

Steps to Reproduce

  1. In an environment without npm installed (e.g., a runner where Node.js is not in PATH)
  2. Compile the mcp-inspector.md workflow:
    gh aw compile mcp-inspector
    
    or via MCP: agenticworkflows-compile workflows: ["mcp-inspector.md"]

Expected Behavior

The workflow should compile successfully (or with a warning) since:

  • The workflow sets strict: false in frontmatter
  • npm/npx availability is a runtime concern, not a compile-time concern
  • The validator even documents GH_AW_SKIP_NPX_VALIDATION=true as a bypass option

Actual Behavior

Compilation fails with:

.github/workflows/mcp-inspector.md:1:1: error: runtime package validation failed: 
  Failed to validate npx packages
  Underlying error: exec: "npm": executable file not found in $PATH

The error occurs because mcp-inspector.md imports shared/mcp/sentry.md, which uses an npx-based MCP server:

mcp-servers:
  sentry:
    command: "npx"
    args: ["`@sentry/mcp-server`@0.29.0"]

Root Cause

The npx/npm package validation runs at compile time and fails hard when npm is not installed, even when strict: false is configured. This validation should either:

  1. Be skipped/warned (not error) when strict: false is set
  2. Gracefully handle missing npm as a warning, not a compilation failure
  3. Automatically apply GH_AW_SKIP_NPX_VALIDATION=true behavior in CI/agentic environments

Environment

  • Repository: github/gh-aw
  • Run ID: 22421222131
  • Date: 2026-02-25
  • Affected workflow: .github/workflows/mcp-inspector.md
  • Root import causing issue: .github/workflows/shared/mcp/sentry.md

Impact

  • Severity: Medium
  • Frequency: Always (in environments without npm)
  • Workaround: Set GH_AW_SKIP_NPX_VALIDATION=true environment variable before running compile

Additional Context

The compile tool successfully compiled 157 out of 159 workflows. The example-permissions-warning.md also fails compilation when strict mode is enabled (expected), but compiles cleanly with strict: false. The mcp-inspector.md uniquely fails even with strict: false because the npm validation is separate from the strict mode validation pipeline.

The mcp-inspector.lock.yml file exists in the repository (86KB), indicating this workflow compiled successfully previously when npm was available.

Generated by Daily CLI Tools Exploratory Tester

  • expires on Mar 4, 2026, 11:57 PM UTC

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