Skip to content

core: allow instruction files to be named after the project instead of hardcoded AGENTS.md #54489

Open

Description

@trigger2k20

Summary

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

  1. Put machine-wide rules in ~/.config/opencode/AGENTS.md.
  2. Put project rules in ~/myproject/AGENTS.md.
  3. 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.

Activity

  1. opencode-agent commented on Oct 11, 2026

    @opencode-agent
    Contributor

    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 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.

    Related issues:

  2. Lukk17 commented on Nov 13, 2026

    @Lukk17

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions