/cc-authoring:cc-plugin-cache-multi-version-not-recordedfrom cc-authoring
Fix for Claude Code startup warning `Plugin "<name>" not cached at (not recorded) — run /plugins to refresh`. Use when: (1) Claude Code prints a `plugin-cache-miss` warning whose installPath is the literal string `(not recorded)`; (2) `claude plugin list` shows the plugin as installed with a valid version, AND `~/.claude/plugins/installed_plugins.json` has a real `installPath` for it, yet the warning still fires every session; (3) running `/plugins` or reinstalling the plugin doesn't clear the warning; (4) the plugin's cache directory at `~/.claude/plugins/cache/<marketplace>/<plugin>/` contains TWO (or more) version subdirectories — typically an old SHA-prefix dir and the current one — left over from an in-place marketplace SHA bump. Root cause: the Claude Code cache resolver (`fk8` in the binary) skips any cache parent whose subdir count `!== 1`, returns null, and the install-record fallback emits the warning with the hardcoded sentinel `installPath: "(not recorded)"`. The phrase is NOT a missing config field — it's a literal string in the error branch. Fix: delete every stale version subdir under that plugin so exactly one remains (the one recorded in `installed_plugins.json`).
Trending skills
7-day visitors to each skill page
Ships in cc-authoring. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Claude Code startup prints, e.g.:
Plugin "aws-serverless" not cached at (not recorded) — run /plugins to refresh
Running /plugins does nothing. Reinstalling the plugin doesn't help.
claude plugin list shows the plugin as healthy with a real version.
~/.claude/plugins/installed_plugins.json records a correct installPath
that physically exists on disk.
The literal phrase (not recorded) is misleading — it reads like a
missing/null field in your config, but no config edit will fix it. It's
a hardcoded sentinel string in one specific code branch of the Claude
Code binary.
ALL of these together strongly point at this failure mode:
The error contains the exact string (not recorded) as the cache
path.
~/.claude/plugins/installed_plugins.json has a non-null
installPath for the named plugin, AND that path exists on disk
with a .claude-plugin/plugin.json inside.
Listing the plugin's cache parent shows MORE THAN ONE version subdirectory:
$ ls ~/.claude/plugins/cache/<marketplace>/<plugin>/
6cfb70e55aa1-9ac9622d ← stale
9d46cc0a092c-9ac9622d ← current (matches installed_plugins.json)
The plugin's marketplace source is git-subdir (i.e. fetched from
a GitHub repo by SHA, where the SHA can change in place when the
marketplace publisher updates marketplace.json).
The stale dir typically contains only old .in_use/<pid> lockfiles
from long-dead Claude Code sessions, no real plugin payload.
The Claude Code cache resolver fk8 (visible as a string in the v2.1.x
binary) is roughly:
function fk8(H) {
for (let _ of wMH()) { // iterate cache root candidates
let q = lq.dirname(HT6(_, H, "_")); // canonical parent path
try {
let K = await J5.readdir(q);
if (K.length !== 1) continue; // ← THE TRAP
let O = lq.join(q, K[0]);
if ((await J5.readdir(O)).length > 0) return O;
} catch {}
}
return null;
}
Then the caller does:
let j = await fk8(K);
if (j) Y = j;
else if (A) return T.push({
type: "plugin-cache-miss",
source: K,
plugin: H.name,
installPath: "(not recorded)" // ← hardcoded sentinel
}), null;
else return T.push({ type: "plugin-not-installed", ... }), null;
When the cache parent has 2+ subdirs (one current, one orphan from a
prior marketplace SHA), fk8 skips it (K.length !== 1), returns
null. The install record IS present (A truthy), so the cache-miss
branch fires with the literal (not recorded) as installPath.
The error message template "Plugin X not cached at Y — run /plugins to refresh" then renders Y = "(not recorded)", producing the
characteristic warning.
Identify the current version from installed_plugins.json:
python3 -c "
import json
d = json.load(open('/Users/$USER/.claude/plugins/installed_plugins.json'))
for k, entries in d.get('plugins', {}).items():
print(k.split('@')[0], '->', entries[0]['version'])
"
List each plugin's cache parent and find ones with >1 subdir:
for d in ~/.claude/plugins/cache/*/*/; do
count=$(ls "$d" | wc -l | tr -d ' ')
[ "$count" -gt 1 ] && echo "MULTI[$count]: $d -> $(ls "$d")"
done
For each MULTI entry, the "keep" subdir is the one whose name
matches the version field in installed_plugins.json. Delete all
others:
rm -rf ~/.claude/plugins/cache/<marketplace>/<plugin>/<stale-subdir>
Restart Claude Code. The warning is gone.
DO NOT delete installed_plugins.json, known_marketplaces.json, or
the marketplace clones in ~/.claude/plugins/marketplaces/ — those are
healthy and removing them triggers reinstalls.
plugin-cache-miss / (not recorded) warning. It should not
reappear.claude plugin list continues to show the affected plugins as
installed at the same version.Observed on Claude Code 2.1.158 (macOS arm64), 2026-05-30. Four
plugins simultaneously hit this state because their respective
upstream marketplaces (anthropics/claude-plugins-official,
awslabs/agent-plugins, etc.) had bumped the pinned SHA in
marketplace.json in place, and Claude Code's installer had downloaded
the new SHA's payload alongside the old one without garbage-collecting
the prior version.
Stale → current pairs cleaned:
| Plugin | Keep | Delete |
|---|---|---|
atomic-agents | bb9708ec7c4c | f849087b26bb |
aws-serverless | 9d46cc0a092c-9ac9622d | 6cfb70e55aa1-9ac9622d |
chrome-devtools-mcp | 2e039c09e1a2 | a1612be8e014 |
deploy-on-aws | 9d46cc0a092c-efbc3f9b | 6cfb70e55aa1-efbc3f9b |
Single rm -rf of the four stale dirs cleared all four warnings.
aws-serverless); the other three were
silent / not surfaced in the UI but were in the same broken state.
If you find this for one plugin, scan ALL plugins — likely several
are affected together..in_use/<pid> files inside cache dirs are not directory
reference counts; they're per-process touch files left by old
Claude Code processes and never cleaned up. They're safe to delete
with the stale dir.installer.gcOldVersions flag or fixes
fk8 to pick the recorded version when multiple are present, this
skill becomes obsolete — check release notes before assuming this
fix is still needed on a new CLI version.fk8 K.length !== 1 check is consistent with the assumption
that the cache layer is single-version-per-plugin. Manually adding
any extra dir under the plugin's cache parent (e.g. for backup,
staging, testing) will also trip it./Users/<user>/.local/share/claude/versions/<version> — search for
not cached at, not recorded, and plugin-cache-miss.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub cajias/claude-skills --plugin cc-authoring16 skills in this plugin
/apm-marketplace-authoring-gotchasEight APM-marketplace-authoring gotchas discovered during real
migrations from hand-authored .claude-plugin/marketplace.json to
APM-managed and from CC-native plugin authoring.
Use when: (1) running APM's packaging step (with or without
`--dry-run`) or its marketplace-check command in a repo with an
`apm.yml`; (2) wiring CI for an APM
marketplace; (3) the CI staleness check (repack, then `git diff
--quiet`) fails despite a clean local; (4) prettier reformats
`marketplace.json` after APM's packer writes it; (5) APM exit code 1 on
local-path-only marketplaces; (6) confused by `packages:` in apm.yml
vs `plugins:` in marketplace.json; (7) commitlint rejects a commit
with `footer-leading-blank` despite no apparent footer; (8) `apm
compile -t claude` exits 0 with zero output and no compiled plugin
appears; (9) husky+lint-staged pre-commit blocks the FIRST marketplace
commit with markdownlint `MD040/fenced-code-language` errors on a
SKILL.md file copied verbatim from `~/.claude/skills/`. The gotchas
form a chain — fixing one usually surfaces the next.
/apm-plugin-distribution-pathsCanonical authoring layout for an APM (microsoft/apm)
package, plus the decision matrix for whether you need a `marketplace:` block.
Use when: (1) you've run `apm init` and are unsure where SKILL.md / agent .md
/ command .md files belong (answer: under `.apm/`, NOT at repo root); (2)
you've authored CC-native files at `commands/agents/skills/` at repo root and
wonder if that's "right" (it works as fallback layout #3 "Claude plugin", but
it's not the canonical authoring path); (3) you're trying to choose between
the three layouts APM recognizes (one-skill repo, multi-primitive `.apm/`,
Claude plugin); (4) `apm targets` fails with "No such command" in CLI 0.12.1
(subcommand doesn't exist); (5) `apm validate` fails with "No such command"
in CLI 0.12.1 (use APM's packaging command in dry-run mode instead); (6) wondering whether
`apm compile -t claude` will generate output for a hand-authored CC-native
plugin (it won't; it's a no-op for layout #3); (7) wondering if you need a
`marketplace:` block in apm.yml (you don't, for a single-plugin repo).
Covers the canonical `.apm/` source layout, the source-to-plugin remap
table, the three-layout choice, and the four distribution paths.
/autoresearch-is-code-metric-optimizerThe `/autoresearch:autoresearch` Claude Code skill is a CODE-METRIC
OPTIMIZER (modify → verify → keep/discard loop). Use when: (1) you are
about to invoke `/autoresearch:autoresearch` to do literature / web
research (it does NOT fetch papers, search the web, or synthesize cited
reports — use `/deep-research` for that); (2) you have a measurable
target (test pass rate, perf delta, p&l, win rate, composite metric)
AND code-or-config that can be modified to hit it — that IS the right
use case, including non-traditional optimization targets like trading
strategy backtest results; (3) you're confused about when to reach for
the BASE skill vs the sub-skills `:reason` (adversarial debate) or
`:probe` (8-persona interrogation) — the base skill is for iterative
optimization with a clear verify function; the sub-skills are for
qualitative investigation when there is no verify function.
/cc-hooks-main-vs-subagentHow a Claude Code PreToolUse/PostToolUse hook can tell whether a tool call
came from the MAIN conversation thread or from a SUBAGENT (Task/Agent tool),
plus the gotchas of testing hooks via headless `claude -p`. Use when:
(1) building a hook that should apply only to the main thread (e.g.
orchestrator-only enforcement that denies Edit/Write in main but allows
subagents) or only to subagents; (2) wondering if hook input contains an
is_subagent / agent indicator — it does, but it's undocumented;
(3) a hook behaves differently than expected under `claude -p` because
CLAUDE_CODE_ENTRYPOINT is sdk-cli there and `env CLAUDE_CODE_ENTRYPOINT=cli`
does NOT survive (the CLI overwrites it); (4) a headless hook test shows
"Claude requested permissions ... but you haven't granted it yet" instead of
the hook's deny reason — the permission gate fires before the hook surfaces;
(5) you need to force the interactive code path in a headless test (use a
--settings file with an env block).
/cc-mid-session-registry-stalenessFix for two Claude Code mid-session staleness traps that fail Workflow runs
instantly (<15ms). Use when: (1) a Workflow agent() call fails with
"agent type '<name>' not found" listing only plugin/built-in agents, even
though .claude/agents/<name>.md exists with valid frontmatter — the agent
registry only loads .claude/agents/ at session START, so agent files created
mid-session are not resolvable via agentType/subagent_type until restart;
(2) re-invoking a saved workflow via Workflow({name}) runs STALE code after
you edited .claude/workflows/<name>.js — name resolution serves a cached
snapshot, so mid-session edits never reach it. Both failures look like your
code is wrong when it's actually registry caching. Fixes: launch via
Workflow({scriptPath: <live file path>}) to bypass the name cache, and
design workflow scripts with a registry-independent persona fallback
(prompt the agent to Read its own .claude/agents/<name>.md and adopt the
role) toggled by an arg like useAgentTypes:false.
/cc-pluginroot-directory-source-ignoredFix for the Claude Code startup error `Plugin directory not found at path:
<marketplace_root>/<plugin_name>. Check that the marketplace entry has the
correct path.` when a local `source: "directory"` marketplace uses
`metadata.pluginRoot` to factor a common prefix out of its plugin sources.
Use when: you authored a directory-source marketplace via `claude plugin
marketplace add <local-path>`; marketplace.json pairs
`{"name":"foo","source":"./foo"}` with a top-level
`metadata.pluginRoot: "./plugins"`; the subdirectories exist at
`<root>/plugins/foo` but Claude Code reports them missing at `<root>/foo`,
the `/plugins/` segment silently dropped; you manage the marketplace with
APM (`apm.yml` with `marketplace.metadata.pluginRoot`) whose packaging step
emits a pluginRoot-factored marketplace.json that Claude Code then rejects
at load; or the plugin loads once you change its source to `./plugins/foo`
and remove `pluginRoot`. Covers why the field is schema-accepted and honored
for `git-subdir` sources yet ignored for directory ones (resolved literally
against installLocation as of Claude Code 2.1.158), and what to change at
both the apm.yml and marketplace.json layers.