Skip to content

[FEATURE]: custom config path to also support agent definition (via markdown) #3432

Closed

Description

@oribarilan

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I would like to use a different path for all of my opencode's configuration.
Currently, I am seeting OPENCODE_CONFIG as an env variable as suggested in the docs, and it works well.
However, OPENCODE_CONFIG should point to the json file rather than my custom folder, which made me suspect it won't pick up any agents defined in my {OPENCODE_CONFIG}/agent/*.md dir.
Sadly I checked this out and I am right.

Feature ask is to allow agents be defined in markdown in a custom directory path.

I believe a clean way to handle it is to have OPENCODE_CONFIG to point to an entire opencode config directory, which can include any existing or future configuration, agent file being among this.

My current workaround is to use the json to define agents.

Thanks for making such an awesome tool!

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Oct 25, 2025
  2. changed the title [-][FEATURE]: custom config to also support agent definition (via markdown)[/-] [+][FEATURE]: custom config path to also support agent definition (via markdown)[/+] on Oct 25, 2025
  3. github-actions commented on Oct 25, 2025

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

  4. rekram1-node commented on Oct 25, 2025

    @rekram1-node
    Collaborator

    I guess we could add an OPENCODE_CONFIG_DIR

    Edit:
    add var here

    and then implement here similar to Flag.OPENCODE_CONFIG

  5. oribarilan commented on Oct 28, 2025

    @oribarilan
    ContributorAuthor

    Hey @rekram1-node !
    I followed your guidance and tried to contribute.
    This is my first ever opensource contribution so please excuse me if something is off.

    I did not yet have a chance to test this e2e, but maybe you have some comments beforehand.

    Thanks!

    #3504

  6. rekram1-node commented on Oct 28, 2025

    @rekram1-node
    Collaborator

    let's go nice! I will check it out

  7. rekram1-node commented on Oct 28, 2025

    @rekram1-node
    Collaborator

    added support for loading configs from specified dir OPENCODE_CONFIG_DIR it will be in next release

    thanks to @oribarilan

  8. TomaszSz368 commented on Mar 5, 2026

    @TomaszSz368

    Could we add adding agents like we can add skills by adding path?

    {
      "$schema": "https://opencode.ai/config.json",
      "skills": {
        "paths": ["./node_modules/<my_skills_package>/skills/"]
      },
    }

    Something like this:

    {
      "$schema": "https://opencode.ai/config.json",
      "agents": {
        "paths": ["./node_modules/<my_skills_package>/agents/"]
      },
    }
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

    discussionUsed for feature requests, proposals, ideas, etc. Open discussiongood first issueGood for newcomershelp-wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions