Repository navigation
Preserve inherited context in prediction forks - #53678
Merged
copyberry[bot] merged 1 commit intoOct 13, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why Prediction forks need to retain their parent's context even when it exceeds the automatic compaction threshold. Compaction or context resets can otherwise replace the history used for the prediction. ## What changed - Apply a thread-local `AutoCompactionDisabled` policy to experimental prediction forks without changing model or skill budgets. - Skip automatic compaction before, during, and after turns, including context-limit recovery, and suppress new token-budget reminders. - Reject `new_context` requests for these threads and report context-limit failures without compacting their history. ## Testing Add regression tests for legacy and paginated prediction forks across compaction thresholds, unchanged parent compaction and skill/tool inputs, context-limit failures, and rejected context resets. Add a request-history snapshot verifying inherited context and reminders survive without compaction or additional reminders after a tool call. GitOrigin-RevId: 7df374287f4142f776981bb6c22e5caa564d74a5
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/7df374287f4142f776981bb6c22e5caa564d74a5
branch
from
October 13, 2026 14:17
2f1e7ca to
044e74f
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/7df374287f4142f776981bb6c22e5caa564d74a5
branch
October 13, 2026 14:17
mwangshunli2022-creator
deployed
to
issue-triage
October 13, 2026 14:50 — with
GitHub Actions
Active
mwangshunli2022-creator
deployed
to
issue-triage
October 13, 2026 14:50 — with
GitHub Actions
Active
mwangshunli2022-creator
deployed
to
issue-triage
October 13, 2026 14:50 — with
GitHub Actions
Active
mwangshunli2022-creator
deployed
to
issue-triage
October 13, 2026 14:51 — with
GitHub Actions
Active
This branch was successfully 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Preserve inherited context in prediction forks
Why
Prediction forks need to retain their parent's context even when it exceeds the automatic compaction threshold. Compaction or context resets can otherwise replace the history used for the prediction.
What changed
AutoCompactionDisabledpolicy to experimental prediction forks without changing model or skill budgets.new_contextrequests for these threads and report context-limit failures without compacting their history.Testing
Add regression tests for legacy and paginated prediction forks across compaction thresholds, unchanged parent compaction and skill/tool inputs, context-limit failures, and rejected context resets. Add a request-history snapshot verifying inherited context and reminders survive without compaction or additional reminders after a tool call.