chore: notify when a newer yul release is available - #16
Merged
Conversation
The chains-hooks marketplace source for yul is unpinned, but Claude Code doesn't re-resolve a plugin's source on every session start — it reuses whatever it last cloned. So users can silently sit on a stale cached plugin version indefinitely with no signal that a newer release shipped. ensure-yul.sh now checks GitHub's latest release tag against the plugin version resolved this session and, if newer, prints SessionStart hook JSON telling Claude to let the user know and suggest /plugin marketplace update (or reinstalling the plugin). Fails open like the rest of the script if the check can't run. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
additionalContext depends on Claude choosing to relay it in conversation. systemMessage is a top-level hook JSON field shown directly to the user's terminal, the same channel Claude Code uses for its own CLI update notices — no model mediation needed for a plain "you're behind" notice.
/plugin marketplace update only refreshes the marketplace catalog, it doesn't touch the installed plugin, so the previous notice's advice did nothing. The real lever is claude plugin update (immediate) and autoUpdate on the marketplace entry (durable) — background plugin auto-update exists but defaults to off for third-party marketplaces like chains-hooks, which is why yul goes stale silently in the first place.
extraKnownMarketplaces can be registered in user, project, or local scope, and the marketplace could be found in any of them depending on how a given user set it up.
algomaster99
marked this pull request as ready for review
August 16, 2026 18:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chains-hooksmarketplace source foryulis unpinned, but Claude Code doesn't re-resolve a plugin's source on every session start — it reuses whatever it last cloned into~/.claude/plugins/cache/<marketplace>/yul/. Claude Code can auto-update a plugin in the background a few minutes after session start, but that's off by default for third-party marketplaces (only Anthropic's official ones default to on), so users can end up running a staleyulversion indefinitely with no signal a newer release exists.ensure-yul.shnow checks GitHub's latest release tag against the plugin version resolved this session, and if newer, prints a top-levelsystemMessage— the same channel Claude Code's own CLI uses for its update notices, shown directly to the user's terminal, independent of whether Claude chooses to mention it. (hookSpecificOutput.additionalContext, used elsewhere for scan findings, only reaches Claude — not the user directly — so it's the wrong field for a plain "you're behind" notice.)claude plugin update yul@chains-project(+/reload-pluginsor a restart) for an immediate pickup, and adding"autoUpdate": trueto thechains-projectentry underextraKnownMarketplacesin~/.claude/settings.jsonfor a durable fix. An earlier draft told users to run/plugin marketplace update chains-project, which only refreshes the marketplace catalog and does nothing to the installed plugin — corrected after testing showed it doesn't work.Before (stale version, no signal):
no indication a newer release shipped.
After (stale version, one release behind):
{"systemMessage":"yul: a newer release (v0.0.5) is available; this session is running the cached v0.0.4. To pick it up now: `claude plugin update yul@chains-project`, then /reload-plugins (or restart). To stop seeing this: add \"autoUpdate\": true to the chains-project entry under extraKnownMarketplaces in ~/.claude/settings.json, so Claude Code updates it in the background automatically (this is off by default for third-party marketplaces)."}Test plan
go build ./...andgo test ./... -vpassscripts/ensure-yul.shagainst the currentplugin.json(already latest) — silent, exit 0plugin.jsonpinned to an older version — printed validsystemMessageJSON (verified withpython3 -m json.tool)claude --plugin-dirin a scratch project with an artificially oldplugin.jsonversion — confirmed thesystemMessagebanner actually renders in a real session