Repository navigation
Conversation
… it is enabled A 429 is sent again up to twice, after the response's "Wait N seconds" or else 3 s, so one rate-limited call no longer fails a whole codemode script. A wait over 10 s, a third refusal or an abort still comes back as a tool error and keeps the connection. Tool Gateway's tool_gateway_enable_backend sends tools/list_changed only after its result, so the next listing raced the refresh and missed the backend's tools; agents then guessed tool names. A successful *enable_backend* call now lists the tools again before it returns, and a listing waits for a refresh still in flight.
Owner
|
Thanks, the failure counts are very useful. We're keeping this open as a reference rather than merging: a guessed name after enable_backend is now handled generically by #506, which relists and returns the real tool names, and a 429 already comes back as a tool error carrying the server's wait hint, which a script can retry. We'd rather not keep a vendor-specific name regex and parsing of the wait text in the core. |
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.
Two failures with Tool Gateway's MCP server, seen over a week of agent use (221 of 665
mcpcalls failed):Now a 429 is retried up to twice. It waits for the response's "Wait N seconds", or 3 s when there is none. A wait over 10 s, a third refusal, or an abort still comes back as a tool error and keeps the connection.
tool_gateway_enable_backendsendstools/list_changedonly after its result. The nextmcp {server}listing raced the refresh and missed the backend's tools, so agents guessed names (161 failures).Now a successful call to a tool named like
*enable_backend*lists the tools again before it returns, and a listing waits for any refresh still in flight.Tests:
extensions/mcp/test/mcp.test.tscovers a call that succeeds after two 429s, one that fails after three (with the request count), and a listing right afterenable_backendthat includes the new tool. Without the server change, both new checks fail.Checked once and not committed: no hint waits 3 s twice (3 requests, ~6 s); "Wait 60 seconds" fails at once (1 request); an abort during the wait stops at once and the server stays connected.