Repository navigation
Experiment with journal history prefix caching - #260
Open
Stephen Belanger (Qard) wants to merge 4 commits into
Open
Stephen Belanger (Qard) wants to merge 4 commits into
Stephen Belanger (Qard) wants to merge 4 commits into
Conversation
Stephen Belanger (Qard)
requested review from
Abhijeet Prasad (AbhiPrasad) and
Andrew Kent (realark)
November 3, 2026 13:45
Stephen Belanger (Qard)
marked this pull request as ready for review
November 3, 2026 13:50
Codex Review SummaryThis 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. |
Stephen Belanger (Qard)
force-pushed
the
experiment/journal-history-prefixes
branch
from
November 3, 2026 16:35
48a9980 to
c79402a
Compare
Abhijeet Prasad (AbhiPrasad)
approved these changes
Nov 5, 2026
Collaborator
Author
|
I'll probably hold off on landing this one for the moment until we've defined a more general spec for how to describe history evolution generically. |
This branch has not been deployed
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.
Reduces repeated message-history storage in long coding-agent sessions while preserving complete histories for live processing and recovery.
The journal stores each event’s new messages alongside a file offset, prefix length, and checksum referencing an earlier record in the same session. Bounded fingerprint caches recognize shared prefixes and returning branches. Adaptive full checkpoints keep reconstruction chains manageable; cache misses store the complete history.
Live events retain their original payloads and flow directly into processing. Recovery reconstructs histories from the journal, validates backward references and record checksums, and parses record metadata into concrete types. Native payload contents remain opaque JSON. Both recovery caching and live queue budgeting account for expanded payloads. Reference targets become available only after their records are durably written.
Released journal formats remain readable. Older daemons reject the new versioned records. History hashing still costs CPU proportional to the incoming history size.
Validation: 23 journal/codec tests, codec coverage under alternate JSON features, the all-agent live/recovery span-equivalence matrix, formatting, and Clippy passed. Coverage includes branching, compaction, restarts, cache eviction, malformed records, native JSON depth limits, and interrupted writes.