Conversation
Load bounded .hacb/CODEX_STATE-style checkpoints and inject them into the relay payload ahead of the conversation so long sessions can rely on cheap repo-local state instead of huge chat history. Only exact configured filenames inside checkpointDir are read; traversal entries are ignored; missing files are skipped; content is capped at maxCheckpointChars with an explicit truncation marker. Defaults: on, .hacb directory, four standard checkpoint files, 4,000 chars. enableCheckpointMemory false disables all filesystem access.
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 changed
Approximates "compact chat" without spending Hyperagent credits on summaries: the bridge injects a bounded checkpoint from repo-local
.hacb/files into the relay payload (beforeconversation), so long sessions can drop old turns instead of re-sending them.loadCheckpoint(config, reader?): reads only exact configured filenames insidecheckpointDir, skips missing files, rejects path traversal, caps combined content atmaxCheckpointCharswith an explicit truncation marker. Reader injectable for tests.buildRelayPrompt(...)gains an optional 5thcheckpointparam emitted as aproject_checkpointpayload key placed beforeconversation.enableCheckpointMemory: false(zero filesystem access)..hacb/added to.gitignore.Config defaults:
enableCheckpointMemory: true,checkpointDir: '.hacb', four standard files,maxCheckpointChars: 4000. No Hyperagent calls are ever spent generating checkpoints — Codex maintains them through its normal local file tools.Why it saves credits
Durable local memory replaces long chat history: old turns can be dropped while task state survives.
Testing
npm test: 81 pass, 0 fail. New tests cover labelled multi-file loading, capping, traversal rejection, disabled-means-no-I/O, payload ordering beforeconversation, and old-turn dropping with the checkpoint retained.