[FEATURE]: Provide compatibility for agent discovery with GitHub Copilot? #3294

Open
opened 2026-02-16 17:39:32 -05:00 by yindo · 1 comment
Owner

Originally created by @stefaneidelloth on GitHub (Dec 4, 2025).

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

  • OpenCode expects agents in:
    .opencode/agent/ (singular) or a custom directory set via OPENCODE_CONFIG_DIR.

  • GitHub Copilot expects agents in:
    .github/agents/ (plural) with files like foo.agent.md.

  • Hybrid Strategy
    I would like to be able to point from OpenCode configuration to existing agent files from a GitHub Copilot project.

I could try to use OPENCODE_CONFIG_DIR, but then I would need to rename .github/agents to .github/agent, breaking the GitHub Copilot structure.

=> Could you please

  • also allow .opencode/agents as source for agent discovery?
  • or add extra option on level of "agents" folder, for example OPENCODE_AGENTS_DIR?

Possible workarounds for now:
a) Use symbolic links between folders on os level
b) Create individual agent definitions in opencode.jsonc and point to external foo.agent.md files from GitHub folder

"agent": {

   "code-reviewer": {

     "description": "Reviews code for best practices and potential issues",

     "model": "anthropic/claude-sonnet-4-5",

     "prompt": "{file:./.github/agents/code-reviewer.md}",

     "tools": { "write": false, "edit": false }

   }

  }

c) Include agent files as instructions (does not make sense)

"instructions": [
  "./.github/agents/*.md"  //includes GitHub Copilot agent definitions in instructions (does not really make sense)
],
Originally created by @stefaneidelloth on GitHub (Dec 4, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request * OpenCode expects agents in: .opencode/agent/ (singular) or a custom directory set via OPENCODE_CONFIG_DIR. * GitHub Copilot expects agents in: .github/agent**s**/ (plural) with files like foo.agent.md. * Hybrid Strategy I would like to be able to point from OpenCode configuration to existing agent files from a GitHub Copilot project. I could try to use OPENCODE_CONFIG_DIR, but then I would need to rename .github/agent**s** to .github/agent, breaking the GitHub Copilot structure. => Could you please * also allow .opencode/agents as source for agent discovery? * or add extra option on level of "agents" folder, for example OPENCODE_AGENTS_DIR? Possible **workarounds** for now: **a)** Use symbolic links between folders on os level **b)** Create individual agent definitions in opencode.jsonc and point to external foo.agent.md files from GitHub folder ``` "agent": { "code-reviewer": { "description": "Reviews code for best practices and potential issues", "model": "anthropic/claude-sonnet-4-5", "prompt": "{file:./.github/agents/code-reviewer.md}", "tools": { "write": false, "edit": false } } } ``` **c)** Include agent files as instructions (does not make sense) ``` "instructions": [ "./.github/agents/*.md" //includes GitHub Copilot agent definitions in instructions (does not really make sense) ], ```
yindo added the discussion label 2026-02-16 17:39:32 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 4, 2025):

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

  • #3432: Custom config path to support agent definitions via markdown - Addresses the need to configure agent discovery paths via environment variables
  • #4479: Configurable instruction file search boundary and file types - Proposes configuration options for agent/instruction file discovery locations, including support for custom directory structures
  • #2094: Search for AGENT.md in project subdirectory - Addresses agent discovery in project subdirectories by identifying the project root

These issues discuss similar concerns about agent discovery flexibility and compatibility with different project structures (including GitHub Copilot's directory naming). The #3432 issue is now closed but addressed the custom config path scenario, while #4479 proposes a more comprehensive configuration solution.

Feel free to ignore if your specific case requires different functionality or if these don't fully address your GitHub Copilot compatibility scenario.

@github-actions[bot] commented on GitHub (Dec 4, 2025): This issue might be a duplicate of existing issues. Please check: - #3432: Custom config path to support agent definitions via markdown - Addresses the need to configure agent discovery paths via environment variables - #4479: Configurable instruction file search boundary and file types - Proposes configuration options for agent/instruction file discovery locations, including support for custom directory structures - #2094: Search for AGENT.md in project subdirectory - Addresses agent discovery in project subdirectories by identifying the project root These issues discuss similar concerns about agent discovery flexibility and compatibility with different project structures (including GitHub Copilot's directory naming). The #3432 issue is now closed but addressed the custom config path scenario, while #4479 proposes a more comprehensive configuration solution. Feel free to ignore if your specific case requires different functionality or if these don't fully address your GitHub Copilot compatibility scenario.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3294