Skip to content

Hard tool limit (128) blocks agent mode when multiple MCP servers are enabled — agent should manage its own tool context #290356

Description

  • Copilot Chat Extension Version: 0.37.2026012601
  • VS Code Version: 1.109.0-insider (abb70fb, x64)
  • OS Version: Windows
  • Feature: Agent mode
  • Selected model: Claude Opus 4.5
  • Logs: N/A (no crash — request rejected before execution)

Steps to Reproduce:

  1. Enable multiple MCP servers (e.g., Atlassian, custom domain-specific servers) totalling >128 tools
  2. Start an agent mode conversation
  3. Make a request that triggers tool use
  4. Receive error: Tool limit exceeded (132/128). Click "Configure Tools" in the chat input to disable 4 tools and retry

Expected Behaviour

The agent should dynamically enable/disable tools as needed within a session. The deferred tool loading system (tool_search_tool_regex) was designed for exactly this purpose — tools are discovered and loaded on demand. The agent is capable of managing tool context; the hard cap shouldn't be enforced at the VS Code layer before the agent processes the request.

Actual Behaviour

A hard cap of 128 tools is enforced at request time. The user must manually disable tools via "Configure Tools" before the agent can proceed. This breaks workflows requiring multiple MCP servers (e.g., Jira + custom ontology + GitHub + domain tools).

Impact

  • Users with legitimate multi-server setups are blocked from using agent mode
  • The workaround (manually toggling tools per request) defeats the purpose of an autonomous agent
  • Previous VS Code versions handled this flexibly; this appears to be a regression

Suggested Fix

  1. Remove or significantly raise the hard cap (tools already have descriptions for the agent to select appropriately)
  2. Allow the agent to manage tool loading/unloading within the cap dynamically
  3. At minimum, provide a user setting to override the limit (e.g., "github.copilot.chat.agent.maxTools": 200)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions