Skip to content

Plugin installs: statusline nudge pins settings.json to a version-specific plugin cache path #1147

Description

@marcoamtz

What happen

In Claude Code plugin installs, the SessionStart statusline nudge tells Claude to set statusLine to a script inside the versioned plugin cache:

bash "~/.claude/plugins/cache/caveman/caveman/<version>/src/hooks/caveman-statusline.sh"

That path is frozen at whatever version was installed when the nudge fired, and nothing refreshes it afterwards:

  • src/hooks/caveman-activate.js:409 builds the path from __dirname (${CLAUDE_PLUGIN_ROOT}/src/hooks, i.e. the version directory).
  • src/hooks/caveman-activate.js:389,405: the nudge is one-shot (.caveman-nudge-shown) and only fires when statusLine is absent, so it never revisits a path it already wrote.
  • bin/install.js in plugin mode skips hook wiring ("plugin manifest handles SessionStart + UserPromptSubmit"), so re-running the installer doesn't touch the statusline either. --with-hooks would refresh ~/.claude/hooks/caveman-statusline.sh, but it also wires standalone SessionStart/UserPromptSubmit hooks on top of the plugin's (the double-firing SessionStart + UserPromptSubmit hooks fire twice when installer wires both plugin and standalone hooks #392 guards against).
  • The self-heal in bin/install.js:537-556 (pruneOrphanedManagedHooks) only runs when the installer is re-run, and it removes a dangling entry rather than repointing it.

Consequences:

  1. After claude plugin update caveman@caveman, the status line keeps running the previous version's script. 2.7.0 → 3.0.0 happens to ship an identical caveman-statusline.sh, so nothing visible changes this time, but any future change to the script won't reach users who accepted the nudge.
  2. Claude Code prunes old plugin cache versions. On my machine the plugin has been installed since 2026-04-17, and the cache now holds only three version directories (15581d14007f, 2.7.0, 3.0.0). Once the pinned directory is pruned, bash <missing path> exits 127; per statusline: empty .caveman-statusline-suffix file makes script exit 1 — Claude Code hides the status bar #711, a failing statusline command makes Claude Code hide the status bar. Because the nudge marker already exists, the badge is never offered again.

Found while auditing an install. Points 1–2 come from reading the code at v3.0.0 (b33a395) and inspecting the plugin cache; I did not re-run the nudge end to end.

Expected

A statusline configured through the plugin keeps working across plugin updates and follows the installed version. Some options:

  • Have the nudge (or SessionStart) install the script at a version-independent path, e.g. copy it to ~/.claude/hooks/caveman-statusline.sh when missing or when its hash differs from the plugin's copy, and point statusLine there. The standalone installer already owns that path.
  • Or, in SessionStart, detect a statusLine.command that references plugins/cache/caveman/caveman/<other-version>/…/caveman-statusline.sh and repoint it (or re-nudge) to the current version.

Workaround I'm using: point statusLine at the marketplace clone, ~/.claude/plugins/marketplaces/caveman/src/hooks/caveman-statusline.sh. That path doesn't change between versions and claude plugin marketplace update refreshes it, though it can run ahead of the installed plugin between updates.

Platform

  • Claude Code
  • Codex
  • Other: ___

Version / install method

Claude Code plugin caveman@caveman 3.0.0 (marketplace at b33a395), @caveman-ai/cli 1.3.4, macOS arm64.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions