Skip to content

Is there a way to have instructions in the global configuration? #9368

Closed

Description

@berenar

Question

I was using instructions: ["/instructions/*.md"] in my global config referencing multiple instruction files for testing, general coding, etc. right there on my global config, but I realised that when running opencode (on any project) it was trying to load the instructions array paths from the local project, not from the global config where those files where.

I've moved those instructions files to a global AGENTS.md as a workaround, but I would like to have different files for different kind of instructions.

In the docs, it says that the recommended way is to use this instructions field, but at least for me that was not clear.

Am I missing something? Are skills meant to solve this?

Activity

  1. github-actions commented on Jan 19, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. berenar commented on Jan 19, 2026

    @berenar
    ContributorAuthor

    Actually #4758 is exactly the issue I had, and #4758 (comment) is the solution to it. This definitely should be in the docs

  3. yg-codes commented on Oct 14, 2026

    @yg-codes

    Confirmed on v2.0.28 (v2 line): the absolute-path approach from #4758 does not work there -- minimal repro: "instructions": ["/tmp/pluto-token.md"] in the global config, opencode run --standalone ? the model never sees the file. The same config on v1.19.0 injects fine, so this looks like a v1 ? v2 regression: opencode debug config parses and displays the array, but session injection ignores it, while AGENTS.md discovery works in the same session.

    Tracked in #55345.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions