Skip to content

fix: make McpWorkbench.stop() idempotent instead of raising RuntimeError#7384

Open
SinzoL wants to merge 1 commit intomicrosoft:mainfrom
SinzoL:fix/7226-mcp-workbench-stop-no-raise
Open

fix: make McpWorkbench.stop() idempotent instead of raising RuntimeError#7384
SinzoL wants to merge 1 commit intomicrosoft:mainfrom
SinzoL:fix/7226-mcp-workbench-stop-no-raise

Conversation

@SinzoL
Copy link

@SinzoL SinzoL commented Mar 13, 2026

McpWorkbench.stop() raises RuntimeError when the actor has not been initialized. This is problematic because del calls stop() via asyncio.create_task - if the workbench was never started (or start() failed), the RuntimeError propagates as an unhandled exception in the background task. Make stop() idempotent by silently returning when there is nothing to stop, consistent with DockerCommandLineCodeExecutor.stop(). Fixes #7226

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