AI-374: Warn against passing secrets through MCP factory_argument - #1688
Merged
Conversation
`factory_argument` is serialized as an activity argument and therefore recorded in workflow history, which is not obvious from the API surface. Document that in the docstrings and READMEs for the MCP support in the openai_agents and google_adk_agents contrib plugins, and point users at resolving credentials worker-side inside the factory instead.
Fix the claim that factory_argument is sent to every MCP activity, which holds for stateless servers but not stateful ones, and document that a zero-parameter stateless factory silently discards the value while it is still written to history. Drop the maturity-badge glyph, qualify the web UI claim for users running a payload codec, and state the factory-side contract on the three provider docstrings.
dplyukhin
approved these changes
Jul 28, 2026
xumaple
enabled auto-merge (squash)
July 28, 2026 20:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a warning to the MCP
factory_argumentdocstrings and READMEs in theopenai_agentsandgoogle_adk_agentscontrib plugins: the value is serialized as an activity argument and therefore recorded in workflow history, so it must not carry secrets, credentials, or API keys. Points users at resolving credentials worker-side inside the server/toolset factory instead, passing only non-secret identifiers throughfactory_argument.Users have been passing auth material this way, and nothing in the API surface signals that
factory_argumentcrosses the workflow boundary.