Skip to content

Claude Code plugin hooks silently no-op on current release: hook CLI verb only exists on main (not in 0.22.1) #1210

Closed

Description

@algomad

Summary — The marketplace plugin (installed per the plugin README) wires SessionStart/PreCompact hooks that exec basic-memory hook <event>. That hook verb was added to main around Jul 20 (PR #1070, SPEC-55) and is still in the CHANGELOG "Unreleased" section, while the latest release on both GitHub and PyPI is v0.22.1 (Jun 13). Since every failure path deliberately exits 0, both hooks silently never run — no briefing, no compaction checkpoint, no error.

Repro — Windows 11, basic-memory 0.22.1 (uv tool install), plugin installed exactly per README (claude plugin marketplace add basicmachines-co/basic-memory --sparse .claude-plugin plugins/claude-code). Then:

basic-memory hook --help
# → Error: No such command 'hook'.

Both launcher paths fail identically: a pinned BM_BIN exe lacks the verb, and the uv path resolves basic-memory>=0.22.1 from PyPI to... 0.22.1, which also lacks it. Observed live: two auto-compactions produced no checkpoint note; session starts produce no brief.

Root cause — The marketplace serves plugin code from main, but the shims' inline dependency floor (basic-memory>=0.22.1) and the README claim that "all behavior lives in the released Python package" don't hold until 0.23 ships. The hook status health surface that would reveal this is also unreleased, so users have no way to notice.

Suggestions — (1) bump the shims' dependency floor only at release time and/or pin the marketplace to release tags; (2) as defense-in-depth, have the shim print a one-line stderr notice when the resolved CLI lacks the hook verb (still exiting 0); (3) until 0.23, a README note that hooks require the upcoming engine would save users a debugging session.

Found this while deliberately testing compaction behavior — otherwise the fail-open design (PEP 723 shims, BM_BIN override, fenced briefs) reads really clean. Thanks for the tool!

(Diagnosed with Claude Code — command outputs and commit references verified locally.)

Activity

  1. phernandez commented on Aug 10, 2026

    @phernandez
    Member

    Hi @algomad yes, I'm currently working on the claude code plugin. It will be working after the next v0.23 release

  2. added this to the v0.23 milestone on Aug 11, 2026
  3. phernandez commented on Aug 21, 2026

    @phernandez
    Member

    Release-readiness verification reproduced this live and end-to-end (2026-08-21):

    • Failure mode confirmed on stable: in a fresh venv, uv run --script on the plugin shims resolves basic-memory>=0.22.1 to 0.22.1, where basic-memory hook exits 2 ("No such command 'hook'") — and the shims' fail-open contract turns that into exit 0 with empty stdout. Silent no-op, exactly as this issue describes, live for every marketplace user today.
    • The v0.23 code is verified working: same harness-style invocation (hook JSON on stdin, CLAUDE_PROJECT_DIR set, isolated HOME/config) against a v0.23 build — SessionStart prints the full session brief, PreCompact writes the checkpoint note with correct frontmatter, bm hook status shows both lifecycle envelopes captured.
    • Related find: there was no dev channel to point users at either — the dev-release pipeline has been silently skipping every publish since the 0.22.1 bump (broken version gate + PyPI-rejected local version segments). Fix: ci(core): fix the silently-skipped dev release publish #1292. Note dev builds alone don't heal the plugin: the shims pin >=0.22.1 and uv won't resolve a dev release for that specifier without --prerelease allow, so the v0.23 stable release remains the fix for marketplace users.

    Plan stands: validate the no-BM_BIN shim path against the real PyPI release right after v0.23.0 ships, then close.

  4. phernandez commented on Aug 24, 2026

    @phernandez
    Member

    Closing — fixed and validated end-to-end:

    • v0.23.0 released (2026-08-23): bm hook ships on PyPI/Homebrew, so the shims' target exists in a released version at last.
    • Modern uv (0.12.x): plain resolution picks up 0.23.0; verified by fresh install.
    • Older uv (verified on 0.8.4): refuses the fastmcp beta transitive, which made the shims fail resolution — the fail-open contract's silent no-op, one more incarnation of this issue. fix(plugins): ship the claude-code hook version bumps with releases #1313 (merged) fixes it: each shim declares the exact fastmcp pin as a direct dependency (scoped pre-release opt-in — future basic-memory betas stay ineligible), with lockstep against core's pyproject enforced by the plugin validator and a codex-side test.
    • Live validation: the SessionStart shim, invoked harness-style with no BM_BIN override, resolved PyPI 0.23.0 under uv 0.8.4 AND 0.12.5 and printed the full session brief; PreCompact was e2e-validated earlier in the release verification (checkpoint note written, envelopes captured).

    Marketplace users get working hooks on both old and new uv as of #1313 on main.

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

    On HoldDon't review or merge. Work is pending

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions