Skip to content

cloud-bootstrap: npm-global tools land in an nvm prefix invisible to plugin hooks (markdown lint gate silently lost in cloud sessions) #2739

Closed

Description

@kyle-sexton

The cloud bootstrap installs markdownlint-cli2 via npm install -g, which resolves into the nvm prefix (/opt/nvm/versions/node/v24.18.0/bin). Plugin hook processes do not inherit that PATH segment (verified from the live claude process environ; the CLAUDE_ENV_FILE PATH repair is documented to reach subsequent Bash commands only) — so the markdown-format hook's probe correctly reports the tool missing and markdown lint enforcement is lost for the whole cloud session. shellcheck diverges only because it installs to ~/.local/bin, which IS on the hook PATH. Reproduced byte-identically in session 6db6fb94 (2026-08-15); evidence packet: plugin-quality data dir, markdown-format/20260815T173035Z.

Secondary defect: the bootstrap's report_tool verifies each tool in its own nvm-augmented environment, printing a false-green ("markdownlint-cli2 v0.23.1") for a tool hooks cannot see.

Fix ladder (cheapest first):

  1. Symlink nvm-global binaries into ~/.local/bin at bootstrap time.
  2. Add markdownlint-cli2 as a root devDependency so the hook's designed node_modules/.bin probe finds it PATH-independently (robust; survives any future npm-global addition).
  3. Make report_tool print the resolved path AND probe with the hook-equivalent PATH so the startup report cannot go false-green again.

Severity: High (F1) + Medium (F2) per the plugin-quality auditor; any future npm -g bootstrap addition re-inherits the defect until 2/3 land.

Activity

  1. added theissue type on Aug 15, 2026
  2. added
    needs-triage
    on Aug 15, 2026
  3. added a commit that references this issue on Aug 16, 2026
    800e661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions