Page tool-output blobs by byte windows not line caps - #869
Merged
TheGreatAxios merged 1 commit intoSep 10, 2026
Conversation
A giant one-line spill was truncated at 2000 characters and the rest dropped, so the pager could not continue. Pretty-printed spills hit the source-file line cap even when they fit in the 50KB window. Blob reads now wrap long lines and page on the byte budget, reusing the existing cursor protocol.
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
read_fileof atool-output://URI pages by byte windows so a single huge line is readable in successive slices. Filesystem reads stay line-oriented. Continuation notices name the URI and the next window.The old 2,000-line cut fails both shapes of a spilled blob: pretty-printed JSON is thousands of lines, minified JSON is one 100k-character line that the pager cannot scroll.
read_fileof the cursor URI returns the remainder.Verification
bun run typecheck,bun run build, andbun run testpassbun run checkpassesbun test src/plugins/read-file-guard-plugin.test.tscovers one giant line, a pretty-printed object over the old line cap, and cursor remainderFixes CL-7620