Skip to content

fix: close ephemeral Google ADK MCP toolsets#1668

Open
Sakshamm-Goyal wants to merge 1 commit into
temporalio:mainfrom
Sakshamm-Goyal:agent/1663-adk-toolset-cleanup
Open

fix: close ephemeral Google ADK MCP toolsets#1668
Sakshamm-Goyal wants to merge 1 commit into
temporalio:mainfrom
Sakshamm-Goyal:agent/1663-adk-toolset-cleanup

Conversation

@Sakshamm-Goyal

Copy link
Copy Markdown

closes #1663

This PR closes each factory-created Google ADK McpToolset after the generated list-tools and call-tool activities complete. The existing per-activity factory semantics are preserved; the change ensures the MCP session manager releases stdio subprocesses and other transport resources even when tool discovery or invocation raises.

Details

Validation:

  • pytest -q -n0 tests/contrib/google_adk_agents/test_google_adk_agents.py -k mcp_toolset_provider_closes_factory_toolsets
  • ruff check temporalio/contrib/google_adk_agents/_mcp.py tests/contrib/google_adk_agents/test_google_adk_agents.py
  • ruff format --check temporalio/contrib/google_adk_agents/_mcp.py tests/contrib/google_adk_agents/test_google_adk_agents.py

@Sakshamm-Goyal
Sakshamm-Goyal requested review from a team as code owners July 22, 2026 05:01
@CLAassistant

CLAassistant commented Jul 22, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

contrib.google_adk_agents: MCP toolset connections are never closed (resource/subprocess leak), unlike sibling contribs

2 participants