Skip to content

Load bounded context after empty wake turns - #41901

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/ae90c5f939c660ea539fbfc11128cc7259efaa9c
Aug 31, 2026
Merged

Load bounded context after empty wake turns#41901
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/ae90c5f939c660ea539fbfc11128cc7259efaa9c

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 31, 2026

Copy link
Copy Markdown

Load bounded context after empty wake turns

Why

Paginated threads can accumulate wake turns with no user-message boundary. The
reverse context scan could not use those turns as a bounded replay cutoff, even
when a compaction and its resume state provided everything needed to reconstruct
the latest model context.

What changed

Treat a full world-state snapshot that survives the latest compaction as a
durable baseline when it is paired with a compatible turn context. This lets the
scan stop at empty wake turns while still scanning further back for patches,
snapshots before compaction, or missing and mismatched turn contexts.

Testing

Add coverage for repeated empty wake turns and verify that bounded replay
matches full rollout reconstruction across successive compaction windows.

## Why

Paginated threads can accumulate wake turns with no user-message boundary. The
reverse context scan could not use those turns as a bounded replay cutoff, even
when a compaction and its resume state provided everything needed to reconstruct
the latest model context.

## What changed

Treat a full world-state snapshot that survives the latest compaction as a
durable baseline when it is paired with a compatible turn context. This lets the
scan stop at empty wake turns while still scanning further back for patches,
snapshots before compaction, or missing and mismatched turn contexts.

## Testing

Add coverage for repeated empty wake turns and verify that bounded replay
matches full rollout reconstruction across successive compaction windows.

GitOrigin-RevId: ae90c5f939c660ea539fbfc11128cc7259efaa9c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/ae90c5f939c660ea539fbfc11128cc7259efaa9c branch from d38fbf2 to f88ff94 Compare August 31, 2026 19:30
@copyberry
copyberry Bot merged commit f88ff94 into main Aug 31, 2026
27 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/ae90c5f939c660ea539fbfc11128cc7259efaa9c branch August 31, 2026 19:31
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 31, 2026
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.

1 participant