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]: Configurable filenames for proximity instruction loading #32069
Eager, session-start:systemPaths resolves AGENTS.md/CLAUDE.md plus config.instructions globs once, up front, into the system prompt.
Proximity, on-read: when a file is read, Instruction.find walks up from that file's directory and loads the nearest instruction file — directory-scoped context, pulled in only when you're actually working in that subtree.
The proximity loader only checks a hardcoded list (packages/opencode/src/session/instruction.ts):
config.instructions doesn't feed this path — so a custom-named file can't be loaded on proximity. A config.instructions glob would load it eagerly into every session, defeating the point.
Use case
We run dedicated review agents and want directory-scoped review instructions — what to review for, and importantly what not to flag — colocated with the code they apply to.
Today we can add a line in AGENTS.md pointing the agent at a separate review file, but that's non-deterministic: the agent has to decide to read it, it costs a tool call, and it can be skipped. We'd rather the review instructions load deterministically via the same proximity mechanism — guaranteed in context whenever the agent touches that subtree — under their own filename rather than overloading AGENTS.md.
Request
Let the proximity loader (Instruction.find / instructionFiles) honor a configurable list of instruction filenames — e.g. a config key like localInstructionFilenames: ["AGENTS.md", "REVIEW.md"] that extends the hardcoded list.
Happy to send a PR if the team's open to it — the change looks contained to instruction.ts plus the config schema.
Activity
github-actions commentedon Aug 12, 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.