fix: remove false positive context overflow detection#7567
Closed
kaigritun wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix: remove false positive context overflow detection#7567kaigritun wants to merge 1 commit intoopenclaw:mainfrom
kaigritun wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Remove isContextOverflowError check from sanitizeUserFacingText to prevent false positives when the assistant mentions phrases like "context overflow" in normal conversation. Real context overflow errors are already handled by formatAssistantErrorText, which properly checks msg.stopReason === "error" before applying error transformations. Fixes openclaw#7483
Contributor
|
Fixed in #12988. This will go out in the next OpenClaw release. If you still see this after updating to the first release that includes #12988, please open a new issue with:
Link back here for context. |
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.
Remove isContextOverflowError check from sanitizeUserFacingText to prevent false positives when the assistant mentions phrases like "context overflow" in normal conversation.
Real context overflow errors are already handled by formatAssistantErrorText, which properly checks msg.stopReason === "error" before applying error transformations.
Fixes #7483
Greptile Overview
Greptile Summary
This PR removes the
isContextOverflowError()rewrite fromsanitizeUserFacingText()to avoid false positives when normal assistant text mentions phrases like “context overflow”. Actual LLM error strings are still rewritten byformatAssistantErrorText(), which gates error-specific formatting onmsg.stopReason === "error"(or an expliciterrorMessage).The change is localized to
src/agents/pi-embedded-helpers/errors.tsand narrows the scope of “context overflow” handling to the error-formatting path rather than the general user-facing text sanitization path.Confidence Score: 5/5