Skip to content

fix: allow MCP supervisors to start after an explicit stop - #4716

Draft
rumpl wants to merge 1 commit into
docker:mainfrom
rumpl:fix/mcp-start-after-stop
Draft

rumpl wants to merge 1 commit into
docker:mainfrom
rumpl:fix/mcp-start-after-stop

Conversation

@rumpl

@rumpl rumpl commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Allow the existing supervisor Start method to reconnect after an explicit Stop, without public API changes.
  • Wait for session teardown, watcher exit, and late startup-handshake reaping before reusing the shared connector.
  • Preserve idempotent/concurrent Stop behavior and context cancellation while waiting to resume.
  • Cover repeated stop/start, stop-before-start, delayed watcher teardown, late handshakes, and real MCP stdio subprocess tool calls.

This lets embedders suspend idle MCP transports and let normal agent tool initialization start them on a later turn without rebuilding the chat.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
@rumpl
rumpl requested a review from a team as a code owner October 25, 2026 20:33
@rumpl
rumpl enabled auto-merge October 25, 2026 20:51
@aheritier aheritier added area/mcp MCP protocol, MCP tool servers, integration area/tools For features/issues/fixes related to the usage of built-in and MCP tools kind/fix PR fixes a bug (maps to fix:). Use on PRs only. labels Oct 25, 2026
@rumpl
rumpl disabled auto-merge October 26, 2026 09:33
@rumpl
rumpl marked this pull request as draft October 26, 2026 12:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/mcp MCP protocol, MCP tool servers, integration area/tools For features/issues/fixes related to the usage of built-in and MCP tools kind/fix PR fixes a bug (maps to fix:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants