Skip to content

fix(mcp,go): size tool-call timeouts from accept maxTimeoutSeconds - #20

Closed
PhilBot402 wants to merge 1 commit into
mainfrom
philbotmcp-tool-call-timeout-0f66
Closed

PhilBot402 wants to merge 1 commit into
mainfrom
philbotmcp-tool-call-timeout-0f66

Conversation

@PhilBot402

Copy link
Copy Markdown
Owner

Port of x402-foundation#3430 from TypeScript to Go SDK.

Go X402MCPClient now sizes paid tool-call timeouts from the accept's maxTimeoutSeconds (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

Open in Web Open in Cursor 

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>
@PhilBot402 PhilBot402 closed this Sep 10, 2026
@github-actions github-actions Bot added the go label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant