Skip to content

Add enabledAgents config to restrict which agents the CLI can use#1

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-cli-agent-config-limit
Draft

Add enabledAgents config to restrict which agents the CLI can use#1
Copilot wants to merge 2 commits intomainfrom
copilot/add-cli-agent-config-limit

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 9, 2026

No configuration existed to limit which agents are available in the CLI — users and repo owners had no way to restrict agent usage beyond per-agent user-invocable: false.

Changes

  • changelog.md: Version 1.0.3 entry documenting the new enabledAgents option
  • README.md: New "Configuring Agents" section covering:
    • enabledAgents allowlist at user-level (~/.copilot/config.json) and repo-level (.github/copilot/settings.json)
    • Intersection semantics when both levels are set
    • Distinction from user-invocable: false

Config format

{
  "enabledAgents": ["explore", "my-agent"]
}

When both user and repo configs define enabledAgents, the effective set is their intersection — an agent must appear in both lists to be available. Omitting the field (or an empty array) preserves existing behavior: all agents are accessible.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: elonp <9786898+elonp@users.noreply.github.com>
Copilot AI changed the title [WIP] Add configuration to limit agents for CLI usage Add enabledAgents config to restrict which agents the CLI can use Mar 9, 2026
Copilot finished work on behalf of elonp March 9, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants