feat: add configurable retry mechanism to MCP client (#675)#847
Closed
vamgan wants to merge 2 commits into
Closed
Conversation
Author
|
Hi @dbschmigelski / @Unshure, if this CR can be reviewed by next week. Thanks! |
afarntrog
reviewed
Oct 17, 2025
727aec3 to
96fe37d
Compare
96fe37d to
ea61f40
Compare
Add a configurable retry mechanism with multiple strategies to handle transient failures in MCP tool calls. Implementation uses the tenacity library for battle-tested retry functionality. Features: - Multiple retry strategies: NoRetry, ExponentialBackoff, LinearBackoff, Custom - Global and per-tool retry configuration - Retry metadata tracking for observability - Built on tenacity library for reliability Changes: - Add tenacity as a dependency in pyproject.toml - Implement MCPRetryStrategy classes wrapping tenacity's AsyncRetrying - Add retry configuration support to MCPClient - Comprehensive test coverage for all retry strategies
ea61f40 to
2b55adc
Compare
Contributor
|
Hey, sorry for the significant delay on this. We just introduced a new retry mechanism through Hooks for model invocations. Instead of the approach you currently have, what I think we are going to attempt to do, is provide a more general purpose Tool retry mechanism so we can address the problem for both MCP and non-mcp tools Thanks and sorry for the delay on this |
zastrowm
pushed a commit
that referenced
this pull request
Jun 2, 2026
zastrowm
added a commit
that referenced
this pull request
Jun 2, 2026
Merge latest docs/main (6 commits): - Propose a mono-repository (#811) - design: add long term memory design (#844) - docs(blogs): added strands-evals multimodal evaluation blog (#869) - docs: add EdgeConditionWithContext and invocation_state to graph docs (#847) - feat: add interventions primitive (#861) - docs: add deploy guide for Nx Plugin for AWS (#766) No conflicts.
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.
Description
Related Issues
#675
Documentation PR
Type of Change
New feature
Testing
How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli
hatch run prepareChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.