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
[FEATURE]: File-specific skill auto-loading and protected context buffer for skills and AGENTS.md #37629
I have searched the existing issues and confirmed this is not a duplicate
Problem
When using OpenCode in long sessions, two issues make Agent Skills (SKILL.md) and AGENTS.md unreliable:
1. Skills are not automatically applied to specific files
A skill like session-log defines how ROADMAP.md, SESSIONS.md, CHANGELOG.md, and SUMMARY.md should be formatted. But the agent has no mechanism to detect that a target file has an associated skill, load it automatically, and apply its rules. The skill exists but is often ignored because the agent forgets to load it before editing the file.
2. Skills and AGENTS.md are evicted during context compaction
When the context fills up and triggers compaction, loaded skill content and AGENTS.md rules are lost from the active context. The agent continues working as if no rules exist — ignoring formatting, conventions, and workflow instructions.
Suggested solution
A. File-to-Skill mapping
Associate files with skills so the agent loads the skill automatically before editing:
This appears to be a feature request, but the title does not start with [FEATURE]: as required by the feature request template.
The feature request template requires a verification checkbox confirming you searched existing issues. Please use the proper template so all required fields are present.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
changed the title [-]File-specific skill auto-loading and protected context buffer for skills/rules[/-][+][FEATURE]: File-specific skill auto-loading and protected context buffer for skills and AGENTS.md[/+]on Jul 18, 2026
Thanks for updating the issue! It now follows our contributing guidelines and looks great. We appreciate you taking the time to clarify the problem and proposed solution.
Activity
github-actions commentedon Jul 18, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:as required by the feature request template.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
[-]File-specific skill auto-loading and protected context buffer for skills/rules[/-][+][FEATURE]: File-specific skill auto-loading and protected context buffer for skills and AGENTS.md[/+]github-actions commentedon Jul 18, 2026
Thanks for updating the issue! It now follows our contributing guidelines and looks great. We appreciate you taking the time to clarify the problem and proposed solution.
github-actions commentedon Jul 18, 2026
Thanks for updating the issue! It now follows our contributing guidelines. We appreciate you taking the time to address the feedback.
github-actions commentedon Sep 18, 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.