You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deleted skills remain in the system prompt, pointing into .claude/skills/.trash/ #50786
The <available_skills> block in the system prompt lists skills whose <location> points into the skills trash directory. In my current session, 7 of 24 listed skills resolve to .trash/ paths:
<skill>
<name>import-memory</name>
<description>Import a memory export from another AI assistant…</description>
<location>/Users/<user>/.claude/skills/.trash/1789846138850-94368-lVuEBW/import-memory/SKILL.md</location>
</skill>
Affected in my session: docs, import-memory, morning, pdf, pptx, skill-creator, xlsx.
Why it matters
1. Deleted skills are still offered to the model. These were removed, but the model is told they are available and will invoke them via the skill tool. The trash directories still exist on disk today, so the calls may even succeed — silently running a version of a skill that was deleted. Once the trash is reaped, the same calls fail.
2. The paths are volatile, which breaks prompt caching. Each trash entry is .trash/<epoch-ms>-<pid>-<random>/, and re-synced skills move into skills/synced/<uuid>_<uuid>/. Both change whenever the skills directory is touched. I captured two sessions about 70 minutes apart, and the only difference across the entire 29,500-character system prompt was 47 characters of skill path churn:
That is enough to invalidate the cached system prompt. I run opencode against a local inference server where the system prompt is ~12,800 tokens and a cold prefill costs about two minutes, so an unnecessary invalidation is very visible. It will also defeat provider-side prefix caching for anyone on a hosted model.
Expected
Skills under .trash/ are excluded from the skills listing.
Skill <location> values are stable across re-syncs — ideally a canonical path or a name-based identifier rather than a content-addressed or timestamped directory.
Repro
Install some skills, then delete a few so they land in ~/.claude/skills/.trash/.
Start an opencode session and dump the system prompt.
The deleted skills appear in <available_skills> with .trash/… locations.
#50786 adds the specific angle of trash-directory paths appearing in the system prompt and the prompt-cache invalidation impact, which may be distinct enough to stand alone. The maintainers can decide whether to merge.
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
github-actions commentedon Sep 23, 2026
This issue might be a duplicate of existing issues. Please check:
/skillsafter restart (covers the deleted-skills-still-listed symptom)<location>path in system promptavailable_skills— related concern about volatile/unstable skill paths and token/caching cost#50786 adds the specific angle of trash-directory paths appearing in the system prompt and the prompt-cache invalidation impact, which may be distinct enough to stand alone. The maintainers can decide whether to merge.
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊
fiveangle commentedon Oct 19, 2026
how vconvenient. of course exact same problem on v2. thing i'll give up on oc instead...