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
core: allow instruction files to be named after the project instead of hardcoded AGENTS.md #54489
Instruction files must be named exactly AGENTS.md at every level. Request: let a project name its instruction file after the project (e.g. COLDFUSION.md) while still having it loaded.
Environment
opencode version: v2.0.26
OS: Darwin 27.0.0 (arm64)
Shell: /bin/zsh
Terminal: xterm-256color (TERM_PROGRAM not set)
Install/channel: latest
Active plugins: -opencode.provider.vllm
Reproduction
Put machine-wide rules in ~/.config/opencode/AGENTS.md.
Put project rules in ~/myproject/AGENTS.md.
Both files are now indistinguishable by name in editor tabs, ls, grep output, or shell history — you cannot tell a global file from a project one without checking the path.
Expected Behavior
A project can name its instruction file after the project and have it discovered normally.
Actual Behavior
Only AGENTS.md is recognized. The docs state: "OpenCode V2 recognizes AGENTS.md only. It does not use CLAUDE.md as a fallback."
The instructions config field is no workaround — the docs note it "does not currently resolve its files, glob patterns, or URLs", so pointing it at a custom filename has no effect.
Additional Context
The only current workaround is a symlink, AGENTS.md -> COLDFUSION.md. That works but defeats the point of naming the file, since the conventional name is still what appears on disk listings.
Related: #47879, #48601. Prior request #32069 was auto-closed for inactivity rather than declined.
In short, you're asking for a project's instruction file to be named after the project (e.g. COLDFUSION.md) and still be discovered like AGENTS.md, so global and project rule files are easy to tell apart in editor tabs, ls, grep output and shell history.
In v2.0.26, AGENTS.md is hardcoded both for discovery at session start (global config plus the project directory walk) and for finding the nearest instruction file after a file is read, so there's no config option for this today. A plugin can't add it either: the plugin API doesn't currently let plugins add instruction files. Maintainers will consider the request.
Opened #63830 for this.
It adds an instruction_files list behind an experimental flag, so OpenCode can read CLAUDE.md (or any other name) next to AGENTS.md.
Update: I closed anomalyco/opencode#63830 · feat(core): choose which…. For a project-named file you can use the instructions setting, for example “instructions”: [“COLDFUSION.md”]. AGENTS.md still loads next to it though.
Activity
opencode-agent commentedon Oct 11, 2026
Thanks for the detailed request, @trigger2k20!
In short, you're asking for a project's instruction file to be named after the project (e.g.
COLDFUSION.md) and still be discovered likeAGENTS.md, so global and project rule files are easy to tell apart in editor tabs,ls, grep output and shell history.In v2.0.26,
AGENTS.mdis hardcoded both for discovery at session start (global config plus the project directory walk) and for finding the nearest instruction file after a file is read, so there's no config option for this today. A plugin can't add it either: the plugin API doesn't currently let plugins add instruction files. Maintainers will consider the request.Related issues:
instructionsconfig field doesn't load files in v2, which is why it doesn't work as a workaroundinstructionsreplace or disableAGENTS.md.opencode/AGENTS.mdthe standard location for project instructionsLukk17 commentedon Nov 13, 2026
Opened #63830 for this.
It adds an instruction_files list behind an experimental flag, so OpenCode can read CLAUDE.md (or any other name) next to AGENTS.md.
Update: I closed anomalyco/opencode#63830 · feat(core): choose which…. For a project-named file you can use the instructions setting, for example “instructions”: [“COLDFUSION.md”]. AGENTS.md still loads next to it though.