Skip to content

Deleted skills remain in the system prompt, pointing into .claude/skills/.trash/ #50786

Closed as not planned

Description

@fiveangle

Version: opencode 1.18.31 / macOS

What happens

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:

- /Users/<user>/.claude/skills/.trash/1789846000064-88864-3so93G/docx/SKILL.md
+ /Users/<user>/.claude/skills/synced/f2cda5da-…_bd1e48d8-…/docx/SKILL.md

- /Users/<user>/.claude/skills/.trash/1789846000061-88864-BcyEBk/import-memory/SKILL.md
+ /Users/<user>/.claude/skills/.trash/1789846138850-94368-lVuEBW/import-memory/SKILL.md

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

  1. Install some skills, then delete a few so they land in ~/.claude/skills/.trash/.
  2. Start an opencode session and dump the system prompt.
  3. The deleted skills appear in <available_skills> with .trash/… locations.

Activity

  1. github-actions commented on Sep 23, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    #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.

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

  3. fiveangle commented on Oct 19, 2026

    @fiveangle
    Author

    how vconvenient. of course exact same problem on v2. thing i'll give up on oc instead...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions