Skip to content

Agent sessions: MCP servers requiring promptString inputs or OAuth fail silently — tools absent with no surfaced error or support documentation #334271

Open

Description

@surapuramakhil

Summary

MCP servers whose activation requires something interactive — ${input:...} promptString variables or first-use OAuth — fail silently in Copilot agent sessions (Agents surface / background sessions): the server never starts, none of its tools are registered, and no error is surfaced anywhere. The agent simply runs without those tools. In interactive editor chat the same config works because VS Code prompts for the input / completes OAuth.

Beyond the interactive-activation cases, the reporter's observation is that MCP tools are absent in agent sessions generally (including plain HTTP servers with static auth headers that need no interaction) — so this may be either a silent-activation bug or a broader "MCP not supported yet in agent sessions" gap. Either way there is currently no surfaced signal and no documentation of what MCP support exists on that surface, which makes it indistinguishable from a config error.

Steps to Reproduce

  1. Configure an MCP server that needs an interactive input on start, e.g. a stdio server with env: { API_KEY: "${input:apiKey}" } (promptString), or an HTTP server requiring OAuth authorization on first use.
  2. Use it in editor chat — VS Code prompts for the input / OAuth; server starts; tools appear.
  3. Start a Copilot agent session (Agents surface) on the same workspace with the same user mcp.json.
  4. Observe: server never activates, its tools are absent from the agent's toolset, and no error/warning is shown in the session UI.

Expected

One of:

  • The activation failure is surfaced in the agent-session UI ("MCP server X pending input / unauthorized"), ideally with a deeplink to resolve the input or complete OAuth, after which tools become available mid-session.
  • Inputs pre-resolved from secret storage so agent sessions can start servers non-interactively.
  • At minimum: the agent is told the server is unavailable and why, and the docs state which MCP features agent sessions support.

Actual

Silent absence. User discovers the gap only by noticing the agent lacks capabilities it has in editor chat on the identical config.

Environment

  • VS Code 1.136.0, macOS arm64
  • Repro'd with: (a) stdio server (npx @z_ai/mcp-server) gated on a ${input:promptString} API key; (b) HTTP server behind OAuth (https://mcp.firecrawl.dev); (c) workspace-level .vscode/mcp.json server gated on a promptString password input.
  • Same workspace, same config: tools present in editor chat, absent in agent sessions.

Filed from real usage comparison. Happy to provide session IDs / tool dumps if useful.

Activity

  1. vs-code-engineering commented on Sep 4, 2026

    @vs-code-engineering
    Contributor

    connor4312 is out of office, assigning roblourens as backup.

  2. added
    bugIssue identified by VS Code Team member as probable bug
    agent-hostIssues for the agent-host implementation (not the protocol)
    on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agent-hostIssues for the agent-host implementation (not the protocol)bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions