Repository navigation
Don't retry the built-in Factory MCP spawn with a token that already failed - #16660
Draft
luigi-facilgroup wants to merge 1 commit into
Draft
luigi-facilgroup wants to merge 1 commit into
luigi-facilgroup wants to merge 1 commit into
Conversation
…failed When the built-in Factory MCP server fails to start (e.g. a 403 from the server), every subsequent auth event (token refresh, user refresh) respawned it with the same bearer token, repeating the same failure indefinitely. Treat a failed spawn for the current token like a live one so we only retry once the token rotates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @luigi-facilgroup on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
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
When the built-in Factory MCP server fails to start (e.g. the server returns
403 Forbidden),sync_builtin_serversrespawned it on every subsequent auth event with the same bearer token, repeating the same failure indefinitely. The "same token, don't respawn" check only applied while the server was active.This adds
builtin_spawn_settled_for_token, which also treats aFailedToStartspawn for the current token as settled, so the built-in server is only retried once the token rotates. Behavior for an active/pending server is unchanged.Linked Issue
Fixes #16659
ready-to-specorready-to-implement.Testing
Added
builtin_spawn_with_failed_token_is_not_retried_until_token_rotatesintemplatable_manager_tests.rs(failed + same token is skipped, rotated token retries,NotRunningretries).cargo test -p warp --lib ai::mcp: 92 passed.cargo clippy -p warp --lib --tests -- -D warnings: clean.I have manually tested my changes locally with
./script/runNot manually tested: reproducing requires an account for which the Factory MCP endpoint returns 403.
Agent Mode
CHANGELOG-BUG-FIX: Warp no longer repeatedly retries starting the built-in Factory MCP server with a credential that already failed.
🤖 Generated with Claude Code