Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(site/src/pages/AgentsPage): persist empty MCP selection - #28238

Merged
ethanndickson merged 1 commit into
mainfrom
fix/mcp-empty-selection
Aug 18, 2026
Merged

fix(site/src/pages/AgentsPage): persist empty MCP selection#28238
ethanndickson merged 1 commit into
mainfrom
fix/mcp-empty-selection

Conversation

@ethanndickson

@ethanndickson ethanndickson commented Aug 18, 2026

Copy link
Copy Markdown
Member

Removing the final optional MCP server from an existing chat produced an empty selection, but the message request omitted mcp_server_ids. The API interprets an omitted field as preserving the current selection.

Send the selected MCP server IDs for every message, including an empty array. Add a Storybook interaction test that removes the final MCP server and verifies the request contains mcp_server_ids: [].

Manual verification on a local dev instance

Setup: ./scripts/develop.sh, an Anthropic provider with claude-haiku-4-5, and a local test MCP server registered with availability default_on.

With this branch, chat 75285d9f:

  1. The new chat showed the MCP chip selected.
  2. Sent a message, then removed the chip with the X control.
  3. Sent a second message, then reloaded the page.
  4. No MCP chip appeared, and the picker toggle stayed off.
  5. GET /api/experimental/chats/{id} returned mcp_server_ids: [].

With the one-line change reverted, chat 751ac191 repeated the same flow. The chip returned as selected after the reload, and the API returned mcp_server_ids: ["b63a2a3a-..."].

Not covered: force_on servers, plan mode interaction, and queued messages during streaming.

Generated by Coder Agents.

@ethanndickson
ethanndickson marked this pull request as ready for review August 18, 2026 05:17
@ethanndickson
ethanndickson merged commit 30dc7eb into main Aug 18, 2026
61 of 62 checks passed
@ethanndickson
ethanndickson deleted the fix/mcp-empty-selection branch August 18, 2026 05:34
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