Skip to content

User-level custom agents not loading from ~/.copilot/agents #452

@pietrobondioli

Description

@pietrobondioli

Describe the bug

Expected Behavior

According to the v0.0.353 release notes, agent definitions should be loaded from both:

  • User-level: ~/.copilot/agents
  • Repository-level: .github/agents

Actual Behavior

The CLI only loads repository-level agents from .github/agents and ignores user-level agents in ~/.copilot/agents.

Affected version

0.0.353 Commit: f8fd3e3

Steps to reproduce the behavior

Steps to Reproduce

Setup: I have custom agents correctly defined in ~/.copilot/agents and some other agents defined at repository .github/agents folder:

Image

Test 1: No remote setup, but .github/agents exists locally

  • Command: copilot
  • Command inside copilot: /agents
  • User-level agents: Not loaded
  • Repo-level agents: Loaded, but with warning message "no github.com remote found"
Image

Test 2: Remote configured with .github/agents folder, but no .github/agents folder locally

  • Command: copilot
  • Command inside copilot: /agents
  • User-level agents: Still not loaded
  • Repo-level agents: Loaded from remote, no warnings/errors
Image

Test 3: Remote configured with no .github/agents folder, but .github/agents folder exists locally

  • Command: copilot
  • Command inside copilot: /agents
  • User-level agents: Still not loaded
  • Repo-level agents: Loaded from local, but with warning "could not load remote agents for pietrobondioli/ai-tooling: server returned 404:"
Image

Test 4: No .github/agents folder in remote/local

  • Command: copilot
  • Command inside copilot: /agents
  • User-level agents: Still not loaded
  • Repo-level agents: Not loaded (as expected), with error "could not load remote agents for pietrobondioli/ai-tooling: server returned 404:"
Image

Summary

In all four scenarios, my user-level custom agents in ~/.copilot/agents were present but never loaded. The CLI appears to only check for repository-level definitions in .github/agents, I tested all these scenarios because my initial guess was that errors during repo-level discovery were affecting user-level discovery - but that doesn't seem to be the case.

Expected behavior

According to the v0.0.353 release notes, agent definitions should be loaded from both:

  • User-level: ~/.copilot/agents
  • Repository-level: .github/agents

Additional context

  • Operating system: Arch Linux
  • CPU architecture: x86_64
  • Terminal emulator: kitty 0.43.1
  • Shell: zsh 5.9

Logs:

2025-11-02T17:58:27.137Z [DEBUG] Fetched Copilot URL: 200 https://api.business.githubcopilot.com
2025-11-02T17:58:27.137Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.353 (linux v25.1.0) OpenAI/5.20.1
2025-11-02T17:58:27.221Z [DEBUG] Fetched Copilot URL: 200 https://api.business.githubcopilot.com
2025-11-02T17:58:27.919Z [DEBUG] Successfully listed 31 models
2025-11-02T17:58:28.567Z [DEBUG] Fetched Copilot URL: 200 https://api.business.githubcopilot.com
2025-11-02T17:58:28.567Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.business.githubcopilot.com/mcp/readonly
2025-11-02T17:58:28.567Z [LOG] Creating MCP client for github-mcp-server...
2025-11-02T17:58:28.568Z [LOG] Connecting MCP client for github-mcp-server...
2025-11-02T17:58:28.894Z [LOG] MCP client for github-mcp-server connected, took 326ms
2025-11-02T17:58:28.894Z [LOG] Started MCP client for remote server github-mcp-server
2025-11-02T17:58:28.894Z [LOG] GitHub MCP server configured after authentication

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions