Skip to content

Preserve inherited context in prediction forks - #53678

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/7df374287f4142f776981bb6c22e5caa564d74a5
Oct 13, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/7df374287f4142f776981bb6c22e5caa564d74a5

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

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

  • 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.

## 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
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/7df374287f4142f776981bb6c22e5caa564d74a5 branch from 2f1e7ca to 044e74f Compare October 13, 2026 14:17
@copyberry
copyberry Bot merged commit 044e74f into main Oct 13, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/7df374287f4142f776981bb6c22e5caa564d74a5 branch October 13, 2026 14:17
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 13, 2026
@fox988r
fox988r deployed to issue-triage October 13, 2026 14:23 — with Image GitHub Actions Active
@fox988r
fox988r deployed to issue-triage October 13, 2026 14:23 — with Image GitHub Actions Active
@fox988r
fox988r deployed to issue-triage October 13, 2026 14:23 — with Image GitHub Actions Active
@fox988r
fox988r deployed to issue-triage October 13, 2026 14:25 — with Image GitHub Actions Active
@CSousa-Dev
CSousa-Dev deployed to issue-triage October 13, 2026 14:30 — with Image GitHub Actions Active
@CSousa-Dev
CSousa-Dev deployed to issue-triage October 13, 2026 14:30 — with Image GitHub Actions Active
@CSousa-Dev
CSousa-Dev deployed to issue-triage October 13, 2026 14:30 — with Image GitHub Actions Active
@CSousa-Dev
CSousa-Dev deployed to issue-triage October 13, 2026 14:31 — with Image GitHub Actions Active
@Saru6
Saru6 deployed to issue-triage October 13, 2026 14:38 — with Image GitHub Actions Active
@Saru6
Saru6 deployed to issue-triage October 13, 2026 14:38 — with Image GitHub Actions Active
@Saru6
Saru6 deployed to issue-triage October 13, 2026 14:38 — with Image GitHub Actions Active
@zz-zigzag
zz-zigzag deployed to issue-triage October 13, 2026 14:41 — with Image GitHub Actions Active
@zz-zigzag
zz-zigzag deployed to issue-triage October 13, 2026 14:41 — with Image GitHub Actions Active
@zz-zigzag
zz-zigzag deployed to issue-triage October 13, 2026 14:41 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 044e74fe Deployed Oct 13, 2026 by codealxcubed via Translate non-English issue #19840
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.