Skip to content

fix(agent): isolate wizard MCP servers - #1254

Open
gouveags wants to merge 1 commit into
PostHog:mainfrom
gouveags:fix/isolate-wizard-mcp
Open

gouveags wants to merge 1 commit into
PostHog:mainfrom
gouveags:fix/isolate-wizard-mcp

Conversation

@gouveags

Copy link
Copy Markdown

Problem

A malformed tool in a user's inherited MCP configuration can prevent the Wizard's Anthropic agent from starting, even though its own MCP servers are valid. Addresses #1091.

Changes

Set strictMcpConfig: true at both SDK query call sites. Regression tests cover the main agent and tutorial, including resumed queries and the main agent's explicit subagent server names.

The error deduplication and message improvements described in the issue remain separate.

Test plan

The new assertions failed before the fix. All 249 tests across the agent test directory and agent-interface suite pass afterward. Build, CLI smoke checks, Warlock smoke checks, and formatting/lint on the changed files pass.

Using the pinned SDK 0.3.169 against a local provider fixture, the current configuration sent 27 tools including the malformed inherited tool. With isolation enabled it sent 26, keeping the explicit server. A dispatched general-purpose subagent also retained that server and excluded the inherited one. The fixture models the reported 400; this was not a live Anthropic call.

pnpm typecheck reports the same 27 existing errors on this branch and untouched main at e88050da. None are in changed files. A full authenticated Wizard install was not run.

LLM context

Agent-assisted contribution. Codex helped reproduce the issue, implement and test the fix, and perform independent code and security reviews.

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.

1 participant