fix: stop LLM retry loop when browser control service is unavailable#17673
Merged
sebslight merged 3 commits intoopenclaw:mainfrom Feb 16, 2026
Merged
fix: stop LLM retry loop when browser control service is unavailable#17673sebslight merged 3 commits intoopenclaw:mainfrom
sebslight merged 3 commits intoopenclaw:mainfrom
Conversation
7f47d98 to
2ba8e56
Compare
2ba8e56 to
90f47fe
Compare
Member
|
Merged via squash. Thanks @tag-assistant! |
treygoff24
pushed a commit
to treygoff24/openclaw
that referenced
this pull request
Feb 16, 2026
…penclaw#17673) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 90f47fe Co-authored-by: tag-assistant <[email protected]> Co-authored-by: sebslight <[email protected]> Reviewed-by: @sebslight
This was referenced Feb 17, 2026
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.
Summary
Change Type
Scope
Root Cause
src/browser/client-fetch.tsenhanceBrowserFetchError()generated error messages containing "try again" — language that LLMs interpret as an instruction to retry the tool call. Combined with pi-agent-core's agent loop having no tool-call iteration cap (while (true)), this creates an unbounded retry loop.Fix
The error message now includes:
Operator-facing hints (restart gateway, check sandbox) are preserved for diagnostics.
User-visible / Behavior Changes
Security Impact
Evidence
Diagnosed from production logs: three consecutive 300s timeouts on the same session, all caused by browser tool then "Can't reach... try again" then model retries then timeout.
Compatibility
Greptile Summary
Modified error messages in
enhanceBrowserFetchError()to prevent LLM retry loops when the browser control service is unreachable. The fix replaces "try again" language with explicit instructions telling the model NOT to retry the browser tool and to use alternative approaches instead. This prevents unbounded tool-call loops that previously caused 5-10 minute agent timeouts with no user response.Confidence Score: 5/5
Last reviewed commit: 7f47d98