Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
When switching between different models I often want model-specific instructions, examples, reminders or constraints (reasoning style, formatting quirks, tool use behavior, context handling, etc.).
Currently there is no easy way to do this without creating fully separate agents (which adds metadata overhead and reduces the nice build mode experience).
Proposed solution
Support model-specific AGENTS files that are loaded in addition to the regular AGENTS.md.
- Project level:
AGENTS_{model}.md
- Global level:
~/.config/opencode/AGENTS_{model}.md
Examples:
AGENTS_claude-opus-4-7.md
AGENTS_gpt-5_5.md
Loading rules:
- Always load base
AGENTS.md (project + global) first
- Then load the matching model-specific file if it exists
- Model name normalization (replace
., -, / with _ etc.) so variants work nicely
This keeps the current lightweight markdown workflow while giving precise control per model.
Why this is better than per-model agents
- No extra metadata / JSON
- No loss of
build mode convenience
- Simple and consistent with how project + global AGENTS.md already work
Additional note
Since AGENTS.md is currently loaded at startup, model-specific files may need to be resolved when the model is actually selected (especially on the first user message). Loading at every model change and rewriting history might impact caching.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
When switching between different models I often want model-specific instructions, examples, reminders or constraints (reasoning style, formatting quirks, tool use behavior, context handling, etc.).
Currently there is no easy way to do this without creating fully separate agents (which adds metadata overhead and reduces the nice
buildmode experience).Proposed solution
Support model-specific AGENTS files that are loaded in addition to the regular
AGENTS.md.AGENTS_{model}.md~/.config/opencode/AGENTS_{model}.mdExamples:
AGENTS_claude-opus-4-7.mdAGENTS_gpt-5_5.mdLoading rules:
AGENTS.md(project + global) first.,-,/with_etc.) so variants work nicelyThis keeps the current lightweight markdown workflow while giving precise control per model.
Why this is better than per-model agents
buildmode convenienceAdditional note
Since
AGENTS.mdis currently loaded at startup, model-specific files may need to be resolved when the model is actually selected (especially on the first user message). Loading at every model change and rewriting history might impact caching.