Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

agentHost: give the injected MCP server names their own module#327571

Open
connor4312 wants to merge 2 commits into
mainmicrosoft/vscode:mainfrom
connor4312/3400-followupmicrosoft/vscode:connor4312/3400-followupCopy head branch name to clipboard
Open

agentHost: give the injected MCP server names their own module#327571
connor4312 wants to merge 2 commits into
mainmicrosoft/vscode:mainfrom
connor4312/3400-followupmicrosoft/vscode:connor4312/3400-followupCopy head branch name to clipboard

Conversation

@connor4312

Copy link
Copy Markdown
Member

Follow-up to #327560, which auto-merged as soon as CI went green — these two review-comment fixes missed the merge.

  • isHostInjectedMcpServerName was parked in claudeSdkOptions.ts, which
    never used it, so customization discovery had to reach into the SDK-options
    module for a bare name check. Moving it to its own leaf module keeps the
    layering honest and leaves claudeSdkOptions.ts untouched by this change.
  • waitForAssert takes an options bag instead of a positional
    beforeAttempt. Slotting a callback in ahead of the numeric parameters
    meant a future waitForAssert(assertion, timeoutMs) would silently be read
    as a callback; the bag removes that trap and leaves every existing call
    site as-is.

No behaviour change: pure refactor of code already shipped in #327560.

(Commit message generated by Copilot)

- `isHostInjectedMcpServerName` was parked in `claudeSdkOptions.ts`, which
  never used it, so customization discovery had to reach into the SDK-options
  module for a bare name check. Moving it to its own leaf module keeps the
  layering honest and leaves `claudeSdkOptions.ts` untouched by this change.
- `waitForAssert` takes an options bag instead of a positional
  `beforeAttempt`. Slotting a callback in ahead of the numeric parameters
  meant a future `waitForAssert(assertion, timeoutMs)` would silently be read
  as a callback; the bag removes that trap and leaves every existing call
  site as-is.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 27, 2026 03:28
@connor4312
connor4312 enabled auto-merge (squash) July 27, 2026 03:28
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@TylerLeonhardt

Matched files:

  • src/vs/platform/agentHost/node/claude/claudeMcpServerNames.ts
  • src/vs/platform/agentHost/node/claude/claudeSdkOptions.ts
  • src/vs/platform/agentHost/node/claude/customizations/claudeSessionCustomizationDiscovery.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Refactors agentHost Claude MCP server name handling into a dedicated leaf module and updates a test helper API to use an options bag (avoiding ambiguous positional arguments), with no intended behavior change.

Changes:

  • Introduces claudeMcpServerNames.ts and moves isHostInjectedMcpServerName into it.
  • Updates customization discovery to import isHostInjectedMcpServerName from the new module.
  • Refactors waitForAssert in an integration test to accept an options object (and updates the local call site).
Show a summary per file
File Description
src/vs/platform/agentHost/test/node/providerIntegration/copilotCustomizations.integrationTest.ts Refactors waitForAssert to an options-bag API and updates usage.
src/vs/platform/agentHost/node/claude/customizations/claudeSessionCustomizationDiscovery.ts Updates import to the new MCP server names module.
src/vs/platform/agentHost/node/claude/claudeSdkOptions.ts Removes host-injected MCP server name logic from SDK options module.
src/vs/platform/agentHost/node/claude/claudeMcpServerNames.ts Adds new module encapsulating host-injected MCP server name set and predicate.

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Low

Comment thread src/vs/platform/agentHost/node/claude/claudeMcpServerNames.ts
@connor4312
connor4312 disabled auto-merge July 27, 2026 03:45
- Moving the injected-name check into its own module dropped the constraint
  that motivated it. Spell out again that an SDK-reported server under one of
  these names must never surface as a customization, and why, so the next
  reader does not relax the check.
- `beforeAttempt` accepts a sync callback like `assertion` does, so call
  sites are not forced to wrap in `async` for no reason.

(Commit message generated by Copilot)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.