fix(context): single-shot artifact_read to avoid paging loops - #15
Merged
Conversation
Raise artifact_read's default read limit 8000 -> 24000 so retrieval typically returns the whole artifact in one call. Paginated reads (repeated "call again with offset…") could make weaker models loop rather than converge on an answer. Adds a gated live regression (liveContextSiftNoArtifactReadLoop) that runs a >8k tool output through a ContextManager against glm-5.2:cloud and asserts the run finishes without an artifact_read spiral (observed 0 reads across repeated runs after the fix). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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.
Context
Follow-up to #14. Live-testing the ContextSift fix against
glm-5.2:cloudsurfaced a second, related weakness: with a >8k tool output, retrieval is paginated (artifact_readreturns 8k at a time with "call again with offset…"), and a weaker model can loop on the paging instead of converging — one run hitmaxTurnsReached(8).Fix
artifact_read's default readlimit8000 → 24000, so a retrieval usually returns the whole artifact in a single call. The model can still page explicitly viaoffset/limitfor very large artifacts.Validation
liveContextSiftNoArtifactReadLoop: a ~22k listing (sentinel past the inline preview) through aContextManager, asserting the run finishes with no retrieval spiral. 3/3 passes, 0artifact_readcalls each run after the fix.🤖 Generated with Claude Code