A dry run of claude plugin tag exited 0. It named plugins[0] in the marketplace file. It said it would create the tag formatter--v1.0.0. That same plugins[0] object still said "version": "9.9.9". The plugin manifest said 1.0.0. Standard error was empty. The only change from the run that refused was the source string. ./plugins/formatter was compared. plugins/formatter was named, and its version was not read.
That is the release check a script will miss. Exit 0 plus a Marketplace entry line is not agreement. The parenthetical version is the comparison. When that parenthetical is absent, the version in the file was not part of the decision.
The prefix that binds the version
The binary was Claude Code 2.1.308, the npm package @anthropic-ai/claude-code at that same version, on Linux x86_64, on 24 November 2026. The SHA-256 of the executable was 356733f185fa988e6bf3aa9a555269fdd167982a2e2a80d3c8a78037bb92ad58. claude --version printed 2.1.308 (Claude Code). Each case used a new home directory and a new CLAUDE_CONFIG_DIR. No claude auth login was run. No session was started. No model turn was called. The repositories were new, with one commit, and no remote. --dry-run was used except where a tag was created on purpose to read the object. Nothing was pushed.
The changelog entry that added the command is 2.1.118, dated 23 April 2026, and it says the command creates release git tags for plugins with version validation. The changelog page fetched the same night lists 2.1.332 on 25 November 2026. This host was not upgraded. The notes below are 2.1.308 only.
claude plugin tag --help on this binary says the command creates a {name}--v{version} git tag, validating that plugin.json and any enclosing marketplace entry agree. The plugin commands reference, read the same night, says the command checks that the plugin’s plugin.json and any marketplace entry that lists it agree on the version. It says the command finds that entry by walking up to a .claude-plugin/marketplace.json that lists the plugin. It says the command exits 1 when it cannot tag safely, and it names a missing version, an existing tag, and a dirty tree. It does not say the source string must start with ./ before the version is read. It does not say a Marketplace entry line without a version in parentheses means the version was skipped.
The plugin manifest in both trees was the same file, at plugins/formatter/.claude-plugin/plugin.json:
{"name":"formatter","version":"1.0.0","description":"probe"}
The marketplace that refused used a source with the prefix, and a different version:
{"name":"lab","owner":{"name":"probe"},"plugins":[{"name":"formatter","source":"./plugins/formatter","version":"2.0.0"}]}
claude plugin tag plugins/formatter --dry-run, run from the repository root, exited 1. The refusal was one line on standard output:
Version mismatch: plugin.json says "1.0.0" but <repo>/.claude-plugin/marketplace.json plugins[0].version says "2.0.0". plugin.json wins at install time, so update the marketplace entry to "1.0.0" (or remove it) before tagging.
The path in that line is relative to the working directory. The two version strings are not. Passing the plugin directory as an absolute path produced the same exit and the same two versions. Standard error was empty on both.
The marketplace that passed used the same name, the same index, and a version that was further away. The source string had no prefix:
{"name":"lab","owner":{"name":"probe"},"plugins":[{"name":"formatter","source":"plugins/formatter","version":"9.9.9"}]}
The same dry run exited 0. The plan was:
Plugin: formatter
Version: 1.0.0 (from plugin.json)
Marketplace entry: plugins[0] in <repo>/.claude-plugin/marketplace.json
Tag: formatter--v1.0.0
The next line said it would create formatter--v1.0.0 at HEAD. It also printed the git tag -a command and a git push origin refs/tags/formatter--v1.0.0 command. No tag was created. The marketplace file was unchanged and still contained 9.9.9. A script that accepts exit 0 and the words Marketplace entry, then drops --dry-run, will create a tag named for 1.0.0 against a listing that says 9.9.9.
A trailing slash does not cause the skip. Source ./plugins/formatter/ with version 9.9.9 exited 1 and named both versions. An absolute source, the full path of the plugin directory, with version 9.9.9, exited 0 and printed the Marketplace entry line with no parenthetical. The two characters ./ are the bind. A longer path that does not start with them is not.
The index is still resolved when the prefix is missing. A marketplace whose first entry pointed at a different plugin, and whose second entry used source plugins/formatter and version 9.9.9, printed Marketplace entry: plugins[1] and still omitted the version. Exit 0. Naming the right index is not reading the version field. The parenthetical is the only field in that line that says the version was compared.
A name match is not a substitute for the source prefix. An entry named formatter, whose source was ./plugins/elsewhere and whose version was 9.9.9, produced no Marketplace entry line at all. Exit 0. The tag plan used the plugin.json version. The elsewhere version was not mentioned. The command does not compare every entry that uses the plugin’s name. It compares the entry whose source path it accepts, and it still prints an entry it did not accept for the version check.
The author warning appeared on both the refusal and the skip. It said no author information was provided. It did not change the exit code. Do not treat that warning as the agreement check, and do not treat its absence as one either. This run did not add an author. The exits above are the exits with that warning present.
The error names an entry it did not read
Remove version from plugin.json and leave the marketplace entry at 1.0.0. The two source strings then disagree about whether a version exists.
With source set to ./plugins/formatter, the dry run exited 0. The version line was Version: 1.0.0 (from marketplace entry). The Marketplace entry line included (version: 1.0.0). A missing manifest version is filled from the entry when the prefix matches. The tag name was still formatter--v1.0.0.
With source set to plugins/formatter, the same missing manifest version exited 1. The line was:
No version to tag. Set "version" in <plugin>/.claude-plugin/plugin.json or in the marketplace entry at <repo>/.claude-plugin/marketplace.json plugins[0]. Tags are only used for dependency version constraints, which require an explicit semver — the git-SHA fallback does not need a tag.
The marketplace entry that sentence names already held "version": "1.0.0". The error offers that field as the place to set a version, and the field is already set. The prefix is what kept the field out of the tag. A wrapper that treats this sentence as an instruction to write a version into plugins[0] will write a second copy of a value the command has already declined to read.
The warning above that error still said no version was specified in plugin.json. That warning is the manifest check. It is not the agreement check. An empty string in the manifest version is the same refusal as a missing key: no version to tag, exit 1. A numeric 1, not a string, failed earlier, as a validation error, expected string, received number, also exit 1. Those two failures are real. The failure that names plugins[0] while that entry already has a string version is the one that depends on the prefix.
Validate fails the file tag accepts
claude plugin validate on the marketplace whose source is plugins/formatter exited 1. The error was:
plugins.0.source: Invalid string: must start with "./"
That is the defect tag skipped. Validate on that marketplace does not reach the version. It stops on the source string. Tag on that same file does not print this error. It prints a release plan.
claude plugin validate on the plugin directory, rather than on the marketplace, exited 0 with the author warning. It did not mention 9.9.9. A plugin-directory validate is not a marketplace agreement check. This run did not pass --strict or --profile directory for that comparison. Those flags change other checks. They were not required to show that the plugin-directory command never opened the disagreeing version.
On the tree whose source is ./plugins/formatter and whose versions disagree, 1.0.0 against 2.0.0, validate on the marketplace exited 0. The warning was:
plugins[0].version: Entry declares version "2.0.0" but plugins/formatter/.claude-plugin/plugin.json says "1.0.0". At install time, plugin.json wins (calculatePluginVersion precedence) — the entry version is silently ignored. Update this entry to "1.0.0" to match.
Tag on that same tree exited 1. Validate treats the disagreement as a warning. Tag treats it as a refusal, but only after the source prefix has bound the entry.
The two commands fail opposite files. Tag exit 0 does not mean validate would pass the marketplace. Validate exit 0 does not mean tag will refuse a version disagreement, and it does not mean tag read the version. Run both. Read the parenthetical on the tag plan. Read the validate error if it names source.
The install-time sentence is the same in both outputs. plugin.json wins when both versions are present. The tag is still the name a dependency constraint will look up. The error text on the missing-version refusal says tags are only used for dependency version constraints, which require an explicit semver, and that the git-SHA fallback does not need a tag. A tag named for 1.0.0 while the marketplace entry says 9.9.9 is a name a later constraint can resolve. The command’s own mismatch text says to update the entry before tagging. That instruction is not applied when the source string fails the prefix.
Verify the parenthetical before you create the tag
Use a disposable clone. Do not point this at a marketplace you intend to push until the dry run is the plan you want. The checks below do not start a session and do not need a login.
claude plugin validate <repo>
claude plugin tag <repo>/plugins/<plugin> --dry-run
Require the validate command to exit 0, or read every warning before you continue. On this binary a source that does not start with ./ is an error, not a warning. Fix it to ./plugins/<plugin> and validate again. An absolute path is not that fix. The absolute source in this run exited 0 from tag and skipped 9.9.9. A trailing slash on a ./ source is still compared. Do not add the slash to try to force a match that the prefix already provides, and do not remove the prefix to silence a mismatch.
Then require the tag dry run to exit 0 and to print a Marketplace entry line that contains (version: 1.0.0), or whichever string is in plugin.json. The Version line and that parenthetical have to be the same string. If the Marketplace entry line has no parenthetical, stop. The index may still be right. The version was not compared. If there is no Marketplace entry line at all, the walk did not accept a source for this directory. That is not proof that no marketplace file above the plugin contains the plugin’s name. The elsewhere entry in this run was silent.
If the versions disagree and the source starts with ./, tag exits 1 and names both strings. Update the marketplace entry to the plugin.json value, or remove the entry’s version, then dry-run again. Do not pass --force for that refusal. On this binary --force skips the dirty-tree check and the tag-already-exists check. A dry run with --force against an existing tag printed git tag -f and git push --force. It does not repair a source prefix, and it is the wrong flag for a version you have not compared.
Read the Tag line before you accept the plan. Version v1.2.3 in plugin.json, with no marketplace above it, planned the tag formatter--vv1.2.3. The help text says the tag is {name}--v{version}. It inserts v in front of the version string you wrote. A version that already starts with v gets a second one. The reference says version is not checked as semver. Keep the manifest version as 1.2.3 if the tag other tools will fetch is formatter--v1.2.3. Require one v in the Tag line, immediately after --.
Untracked files count as a dirty tree. A committed manifest plus an untracked NOTES.txt exited 1 and named that file, on a dry run. Commit the file or remove it. A modified plugin.json that is no longer valid JSON fails earlier, as Invalid JSON, and does not reach the dirty-tree sentence. The dirty-tree sentence is the one that names a path and offers --force.
Do not put plugin.json at the repository root and expect the git check to see the .git directory beside it. On this binary a root plugin.json inside a repository produced the author warning for that file, then said the parent of the repository was not a git repository, and exited 1. git rev-parse --show-toplevel on that same directory named the repository. The manifest this command tags lives at .claude-plugin/plugin.json. Move the file there before you treat the git error as a missing repository.
No remote was configured in these runs. The success line prints a git push origin refs/tags/... command even when origin does not exist. It does not push unless you pass --push. This run did not pass --push. If you do, and the push fails, the reference says the tag is still created locally and the command exits with an error. That case was not exercised here. Do not infer a remote result from the printed push line.
When the source is ./plugins/formatter and the versions agree, creating the tag without --dry-run writes an annotated tag. On this run the object was formatter--v1.0.0, type commit, pointing at HEAD. The default message is the plugin name, a space, and the version. -m 'release %s' stored release 1.0.0. The %s is the version, as the help says. The tag does not contain uncommitted files. That is why the dirty check exists, and why a dry run that skips a marketplace version is not made safe by a clean git status. The status can be clean while the marketplace file, already committed, still says 9.9.9.
A release script on 2.1.308 can require four strings before it creates the tag. Validate did not print must start with "./". The tag plan includes (version: followed by the plugin.json version. The Tag line is <name>--v<version> with a single v. The dry run exited 0. Exit 0 is the last of those, not the first. After the tag exists, git cat-file -p <name>--v<version> should show type commit and the message you passed. If the Marketplace entry line had no parenthetical, do not create the tag and then look for the version in the tag object. The object will not contain the marketplace version the command skipped.
Sources
- Claude Code 2.1.308, npm package
@anthropic-ai/claude-code2.1.308, executable SHA-256356733f185fa988e6bf3aa9a555269fdd167982a2e2a80d3c8a78037bb92ad58, Linux x86_64, 24 November 2026.claude --versionprinted2.1.308 (Claude Code). Each case used a new home and a newCLAUDE_CONFIG_DIR. No login, no session, no model turn. New git repositories, one commit, no remote.claude plugin tag --dry-runexited 1 whensourcewas./plugins/formatterand the entry version was2.0.0againstplugin.json1.0.0. The same command exited 0 whensourcewasplugins/formatterand the entry version was9.9.9, and the Marketplace entry line omitted the version. A trailing slash on a./source still refused. An absolute source skipped.plugins[1]with a prefix-less source was named and its version was omitted. An entry namedformatterwith source./plugins/elsewhereproduced no Marketplace entry line. A missingplugin.jsonversion with source./plugins/formatterused the entry version and exited 0. The same missing version with sourceplugins/formatterexited 1 and namedplugins[0], which already held1.0.0.claude plugin validateon the prefix-less marketplace exited 1 withmust start with "./". Validate on the./mismatch marketplace exited 0 and warned. A real tag, created without--dry-runon an agreeing tree, was an annotated tag on HEAD.--pushwas not used. claude plugin tag --helpon that binary. It says the command validates thatplugin.jsonand any enclosing marketplace entry agree. It does not say agreement is skipped whensourcedoes not start with./. It says--forceskips the dirty-working-tree and tag-already-exists checks. It says%sin-mstands for the version.- Plugin commands reference, plugin tag section, read 24 November 2026. It says the command checks that
plugin.jsonand any marketplace entry that lists the plugin agree on the version, and that it finds the entry by walking up to a marketplace file that lists the plugin. It lists a missing version, an existing tag, and a dirty tree as reasons to exit 1. It does not describe the parenthetical version, the./prefix, or the refusal that names an entry whose version is already set. - Claude Code changelog, read 24 November 2026. Version 2.1.118, dated 23 April 2026, added
claude plugin tag. The same page listed 2.1.332 on 25 November 2026. This run did not install that release, and it does not describe it.