fix(agents): keep continuation bootstrap marker across short reads#108253
Merged
steipete merged 2 commits intoJul 15, 2026
Merged
Conversation
sunlit-deng
force-pushed
the
sunlit/fix/bootstrap-marker-short-read
branch
from
July 15, 2026 15:13
c9b6ce0 to
880d679
Compare
Co-authored-by: sunlit-deng <[email protected]>
Contributor
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 16, 2026
…penclaw#108253) * fix(agents): keep bootstrap markers across short reads * refactor(infra): share bounded file window reads Co-authored-by: sunlit-deng <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]>
steipete
pushed a commit
to Monkey-wusky/openclaw
that referenced
this pull request
Jul 16, 2026
Replace single-shot handle.read() calls in two session tail-read paths with readFileWindowFully so multibyte-range positional reads do not silently return incomplete tail data on network filesystems. - readRecentTranscriptTailLinesAsync: tail-window read for recent session messages now loops until the requested window fills - readLastMessagePreviewFromOpenTranscriptAsync: last-message preview tail read now loops until the requested window fills The same readFileWindowFully helper was introduced in openclaw#108253 and expanded with a sync variant in openclaw#108127 (both by sunlit-deng).
steipete
pushed a commit
to Monkey-wusky/openclaw
that referenced
this pull request
Jul 16, 2026
Replace single-shot handle.read() calls in two session tail-read paths with readFileWindowFully so multibyte-range positional reads do not silently return incomplete tail data on network filesystems. - readRecentTranscriptTailLinesAsync: tail-window read for recent session messages now loops until the requested window fills - readLastMessagePreviewFromOpenTranscriptAsync: last-message preview tail read now loops until the requested window fills The same readFileWindowFully helper was introduced in openclaw#108253 and expanded with a sync variant in openclaw#108127 (both by sunlit-deng).
steipete
pushed a commit
to Monkey-wusky/openclaw
that referenced
this pull request
Jul 16, 2026
Replace single-shot handle.read() calls in two session tail-read paths with readFileWindowFully so multibyte-range positional reads do not silently return incomplete tail data on network filesystems. - readRecentTranscriptTailLinesAsync: tail-window read for recent session messages now loops until the requested window fills - readLastMessagePreviewFromOpenTranscriptAsync: last-message preview tail read now loops until the requested window fills The same readFileWindowFully helper was introduced in openclaw#108253 and expanded with a sync variant in openclaw#108127 (both by sunlit-deng).
steipete
added a commit
that referenced
this pull request
Jul 16, 2026
…ads (#108655) * fix(sessions): complete tail-read windows despite short positional reads Replace single-shot handle.read() calls in two session tail-read paths with readFileWindowFully so multibyte-range positional reads do not silently return incomplete tail data on network filesystems. - readRecentTranscriptTailLinesAsync: tail-window read for recent session messages now loops until the requested window fills - readLastMessagePreviewFromOpenTranscriptAsync: last-message preview tail read now loops until the requested window fills The same readFileWindowFully helper was introduced in #108253 and expanded with a sync variant in #108127 (both by sunlit-deng). * fix(sessions): complete sync title preview reads --------- Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 17, 2026
…ads (openclaw#108655) * fix(sessions): complete tail-read windows despite short positional reads Replace single-shot handle.read() calls in two session tail-read paths with readFileWindowFully so multibyte-range positional reads do not silently return incomplete tail data on network filesystems. - readRecentTranscriptTailLinesAsync: tail-window read for recent session messages now loops until the requested window fills - readLastMessagePreviewFromOpenTranscriptAsync: last-message preview tail read now loops until the requested window fills The same readFileWindowFully helper was introduced in openclaw#108253 and expanded with a sync variant in openclaw#108127 (both by sunlit-deng). * fix(sessions): complete sync title preview reads --------- Co-authored-by: Peter Steinberger <[email protected]>
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.
What Problem This Solves
Fixes an issue where continuation sessions could re-inject full bootstrap context when the transcript tail read returned short before the full-bootstrap completion marker. On filesystems that allow short positional reads,
continuation-skipcould misread an existing completed turn as missing and restart the heavier bootstrap path.Why This Change Was Made
The continuation marker scanner now fills its bounded tail window until EOF or the requested window is read, preserving the existing scan size and compaction semantics.
User Impact
Continuation runs keep their intended lightweight bootstrap behavior even when the transcript file read completes in multiple chunks.
Evidence
node scripts/run-vitest.mjs src/agents/bootstrap-files.test.ts: 40 passed.git diff --check: passed.FileHandle.readcapped at 16 bytes per call:live-proof.mjs
AI-assisted: built with Codex