fix(mcp,go): size tool-call timeouts from accept maxTimeoutSeconds - #20
Closed
PhilBot402 wants to merge 1 commit into
Closed
PhilBot402 wants to merge 1 commit into
PhilBot402 wants to merge 1 commit into
Conversation
Paid MCP tool calls were forwarding the parent context unchanged, so slow-finality settlements could abort while TypeScript waits through the accept window. Probe with a 300s ceiling when the caller sets no deadline, and size paid retries from accepted.maxTimeoutSeconds. Co-authored-by: phdargen <phdargen@users.noreply.github.com>
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.
Port of x402-foundation#3430 from TypeScript to Go SDK.
Go
X402MCPClientnow sizes paid tool-call timeouts from the accept'smaxTimeoutSeconds(default 300s) and uses a 300s ceiling for the initial 402 probe, matching TypeScript@x402/mcp. Slow-finality settlements were aborting in Go while TypeScript waited through the advertised window. A caller context deadline still overrides both defaults. Related to x402-foundation#3439 (this PR does not fully resolve that tracking issue).AI disclosure: Automated by @phdargen. Use your own judgement