Files
codex/codex-rs/core/tests
rhan-oai 2fa67f03f3 Allow volatile World State sections to refresh after compaction (#58956)
## Why

Host-provided context such as budget reminders can become stale while compaction runs. Replaying a captured value or retaining its comparison snapshot can prevent the next step from emitting a fresh reminder, even when the remaining budget has changed.

## What changed

- Add `WorldStateSectionContribution::without_full_context()` to omit a section's fragment and comparison snapshot from initial and compacted context rebuilds while preserving ordinary step updates.
- Reset comparison state after prefix compaction for sections excluded at either capture or installation, including when their messages survive in the live suffix.
- Include step World State updates when building debug prompt input.

## Testing

Add regression coverage for budget reminders refreshing after remote compaction within the same threshold, unchanged request prefixes within a context window, refreshes with a retained live suffix, and step reminders in debug prompts.

GitOrigin-RevId: ea4456755e16c93b5d16e8c762b26a33f8571a86
2026-11-02 19:38:59 +00:00
..