feat: add Responses compaction support - #144
Merged
Merged
Conversation
franciscojavierarceo
force-pushed
the
codex/compaction-support
branch
from
July 27, 2026 14:48
485fea4 to
c269fb7
Compare
franciscojavierarceo
marked this pull request as ready for review
July 27, 2026 15:26
franciscojavierarceo
requested review from
bbrowning,
jiahuei,
leseb,
maralbahari,
noobHappylife,
qandrew and
tjtanaa
as code owners
July 27, 2026 15:26
maralbahari
reviewed
Jul 28, 2026
maralbahari
left a comment
Collaborator
There was a problem hiding this comment.
@franciscojavierarceo Thanks for the work. I have added some inline comment one is to clarify the auto compaction logic and another comment is for incorrect error type mapping.
franciscojavierarceo
force-pushed
the
codex/compaction-support
branch
from
July 28, 2026 04:07
c269fb7 to
8461b63
Compare
maralbahari
reviewed
Jul 28, 2026
Add explicit and automatic Responses context compaction with reusable checkpoints, persistence, and usage accounting. Include OpenAI replay cassettes, structured-input recorder support, integration coverage, and public documentation. Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
franciscojavierarceo
force-pushed
the
codex/compaction-support
branch
from
July 28, 2026 14:26
8461b63 to
f1b46bd
Compare
maralbahari
approved these changes
Jul 29, 2026
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
POST /v1/responses/compact, reusable compaction items, previous-response rehydration, persistence, and automatic threshold-based context compactionencrypted_contentinto assistant context for upstream inference, and accumulate compaction usage across gateway tool loopsrecord_cassette.pyworkflowTest Plan
cargo testcargo clippy --all-targets -- -D warningscargo fmt -- --checkuv tool run pre-commit run --all-filesrecord_cassette.pystructured-input loading againsttests/cassettes/compaction/inputs/basic.json