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
Skill file changes (add/remove/edit) not picked up until app restart due to never-evict in-memory cache #34443
When a SKILL.md file is added, removed, or edited on disk, the change is not reflected in new chat sessions. The stale skill list persists until the entire desktop application is restarted. Starting a "new session" is not sufficient.
Root cause
In \packages/core/src/skill.ts, skill discovery results are cached in an in-memory \Map\ that is never invalidated:
\\ s
const cache = new Map<string, Info[]>()
const list = Effect.fn("SkillV2.list")(function* () {
const skills = new Map<string, Info>()
for (const source of state.get().sources) {
const key = Source.key(source)
const loaded = cache.get(key) ?? (yield* load(source))
cache.set(key, loaded)
// ...
}
return Array.from(skills.values())
})
\\
\load(source)\ scans directories and parses \SKILL.md\ files (frontmatter + body) into \Info\ objects — once per source key
On subsequent \list()\ calls (including across new sessions), the cached result is returned unchanged
There is no TTL, no file watcher invalidation, no cache clearing on session creation
The desktop app runs opencode as a long-lived server process — sessions share the same in-memory cache
A developer TODO in the same file already acknowledges this gap:
\
// QUESTION(Dax): Should local skill sources invalidate on filesystem watch
// events, following the reload policy chosen for other context sources?
\\
Steps to reproduce
Open OpenCode Desktop
Create, delete, or edit a \SKILL.md\ file (e.g. in .opencode/skills/my-skill/)
Start a new chat session — the skill list (<available_skills>) is unchanged
Quit and restart the desktop app entirely — the change is now visible
Expected behavior
Skill file changes (add, remove, edit) should be reflected when starting a new session, without requiring a full application restart.
Proposed fix
At minimum, clear or invalidate the skill cache when a new session is created. Ideally, watch skill directories for filesystem changes and invalidate affected source entries on add/remove/modify events.
Environment
OpenCode Desktop for Windows
Also affects any setup where the opencode server process persists across sessions
Activity
github-actions commentedon Jun 29, 2026
This issue might be a duplicate of existing issues. Please check:
Please review those issues and consider whether this can be resolved there.
github-actions commentedon Aug 29, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.