What
In headless mode, a program drives Claude Code without its usual screen, for example through the SDK. That program can send control requests to change MCP servers (add-ons that supply extra tools). How those requests run has changed:
- A new queue runs MCP control requests such as
mcp_set_serversandmcp_reconnectbeside the main loop. mcp_set_serversno longer waits inline. It goes through the queue, its response carriesheldLoop, and its errors are logged only in some modes.mcp_reconnectcan now wait behind other work instead of running inline.- In the
reload_pluginsoutput,mcpServersnow comes from a different source, anddynamicMcpConfigis passed to the check of how a change affects the cache. - Records of an interrupt now include the messages that were cancelled.
Why
If you build on the SDK, the timing of MCP server updates and reconnects may look different, because they now wait their turn in a queue rather than running at the moment the request arrives.
Names in the bundlemcp_set_servers