Repository navigation
Long sessions open at their end: a tail-first window, the full read behind it - #877
Merged
Merged
Conversation
…pt's end Opening a session read from disk waited for the engine host to list every subagent and read the whole transcript from its first byte (about 3 s for a 636 MiB file) before answering a window that needs its last 1%. - A `session.events` read with the new `provisional: true` (minor 62) is answered by a tail-first read (src/engine-host/fs/tail-first.ts): a quiet follow from the first line past size - rung, on rungs of 8, 32 and 128 MiB, its offsets and ids the file's own (the follower's new `startAt`). Follow.tailWindow takes the window only when the tail holds a turn before it, each rewind's target, each notified task's start and the chain's root; otherwise the next rung, and past the last the read from the start. - Agent metas come from the agents written since the tail's first Agent tool use (SubagentReader.recent); the session's listing and the read from the start follow the tail (or 250 ms). - The renderer asks for a provisional window for this machine's sessions, holds the follow's batches back while it is drawn, and at the follow's `following` rebuilds the key, staged, from the host's window. Scheduled rows are keyed by store and id, so rows already drawn keep their items when older ones arrive. - Main sends `provisional` only to an engine host that lists engine.provisionalWindow. - Lane B: historySeam places a live launch's seam from the same tail when it can. - The follower now skips every record type it drops by its first key. - A measured bound (unit:darwin): src/engine-host/fs/tail-first-bench.test.ts. Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
- Follow.tailWindow: no record from the window on that the tail could not root (a branch walk or a rewind anchor reaching before the tail), even when a later compaction restarted the chain; a whole warm-up turn before the window; every tool result's call in the tail; a chain that says whether the end gets the synthesised exit. - No tail for a session a follow already reads (its cut of the file) or that MAWS and a foreign process contest; a tail is dropped at its next rung once its read is answered without it or its app session is rebound. - A follow that fails to start after the tail answered emits fs.followState error, and the renderer reads again. - The renderer lets an older page or a jump in flight finish before the swap, and keeps what it took in. - Lane B's seam goes back to the read from the start: a tail cannot place it reliably (Decision Log). - Tracker: four shipped residues of the review. Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
The transcript slot's and the shell's IPC-source tests pinned the open's request; a session on this machine now asks for a provisional window. Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
…omes minor 63 The subagent tell (#876) took WIRE_MINOR 62; session.events' provisional and engine.provisionalWindow move to 63, the manifest and fingerprint written by the generator with both. Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
Author
SSFSKIM
added a commit
that referenced
this pull request
Nov 24, 2026
…tool card's retirement Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Nov 24, 2026
…t) into question sheet C3 Tail-first took WIRE_MINOR 63; the sheet's namespace moves to 64 and the pinned manifest and fingerprint are regenerated over master's. Sminos-Session: question-sheet-design#23738737 (MAWS on macbook)
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.
A long session on this machine now opens at its end. Before, the engine host listed every subagent and then read the whole transcript from its first byte before it answered the newest window. On a 636 MiB transcript, the first window came back in about 3 s. It now comes back in 0.13 to 0.35 s, and it is identical as JSON to the window the full read gives.
src/engine-host/fs/tail-first.ts: asession.eventsread that carriesprovisional: trueis answered from the transcript's tail. The tail grows 8, then 32, then 128 MiB. Offsets and ids stay the file's own.engine.provisionalWindow. Main dropsprovisionalfor an older host that doesn't list it.pager.refresh()swaps it in, so the rows on screen stay until the full window is whole. A jump or an older page that's in flight finishes first. Scheduled rows are keyed by store and id, so they aren't remounted when older crons arrive.docs/doperpowers/plans/2026-10-30-long-transcript-window.md, dated 2026-11-24.Gates at 06a5b22 (master 6304d31 merged in):
src/engine-host/fs/tail-first-bench.test.ts(unit:darwin), on a generated 300 MB transcript: before 710 ms, after 63 ms, the same 561 events (load 4.8). On the 636 MiB transcript that prompted this change, a local probe measured before 2.9–3.1 s and after 0.13–0.35 s, with the same window, compared as JSON.High review: 4 P1 and 8 P2. All P1s and most P2s are fixed. Four are logged in docs/tech-debt-tracker.md, and the existing long-transcript row is updated.
Sminos-Session: ux-wave#10d85d03 (MAWS on macbook)