fix(mcp): resolve tool-call timeouts via the unified deadline layer (#85125 2g) - #93830
Merged
kshitijk4poor merged 1 commit intoAug 24, 2026
Conversation
…ousResearch#85125 2g) Both readers of the per-server MCP tool timeout (the connection's run() and the cache-path registration) read config.get("timeout", 300) as their own private resolution. Route them through _resolve_tool_timeout: per-server mcp_servers.<name>.timeout still ALWAYS wins (most specific), then timeouts.mcp.tool_call from the unified timeouts: section, then the unchanged 300s default. Values pass through resolve_timeout's platform clamp; resolution failure falls back to the historical default. Default-behavior invariance pinned by contract tests (nothing configured -> exactly 300, per-server beats section, section beats default, invalid/failed resolution falls back).
kshitijk4poor
enabled auto-merge
August 24, 2026 11:45
Closed
1 task
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
…-mcp-timeout-resolution fix(mcp): resolve tool-call timeouts via the unified deadline layer (NousResearch#85125 2g)
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.
#85125 Phase 2g. Both readers of the per-server MCP tool-call timeout — the connection's
run()(self.tool_timeout) and the cache-path tool registration — each did their own privateconfig.get("timeout", 300). They now route through one_resolve_tool_timeouthelper wired to the unified deadline layer.Documented precedence (most specific wins):
mcp_servers.<name>.timeout— per-server config, always wins (unchanged)timeouts.mcp.tool_call— the unifiedtimeouts:section (feat(agent): unified deadline layer — bounded execution primitive + timeout resolver (#85125 Phase 1) #85147)Values resolved through the section pass
resolve_timeout's platform clamp; a failed resolution falls back to the historical default. No default changes — with nothing configured every resolved value equals today's, pinned by contract tests per the tracker's regression policy (rule 1).Verification
tests/tools/test_mcp_timeout_resolution.py: 5 contract tests (default invariance, per-server-beats-section, section-beats-default, invalid-value fallback, resolution-failure fallback)tests/tools/ -k mcp): 639 passedPart of #85125 (Phase 2g).