Skip to content

Round MCP timeout durations in error messages#31612

Merged
jif-oai merged 1 commit into
mainfrom
jif/clean-mcp-timeout-duration
Jul 8, 2026
Merged

Round MCP timeout durations in error messages#31612
jif-oai merged 1 commit into
mainfrom
jif/clean-mcp-timeout-duration

Conversation

@jif-oai

@jif-oai jif-oai commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

MCP operation timeout errors currently print the full debug precision of the remaining timeout budget. That makes a configured 30-second timeout show up as something like 29.999999875s.

This PR rounds the displayed duration to a whole unit, so the error is clean and stable:

timed out awaiting tools/list after 30s

The timeout behavior itself is unchanged; this only affects the human-facing error text. A regression test covers the reported tools/list case.

@jif-oai jif-oai merged commit 48cf582 into main Jul 8, 2026
35 checks passed
@jif-oai jif-oai deleted the jif/clean-mcp-timeout-duration branch July 8, 2026 17:58
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant