mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
## Why Changing the incremental tools setting on resume should not move tool declarations and base instructions within an existing context window. ## What changed - Determine the current window's tool declaration mode from its history, and apply the incremental tools setting when building a new window after compaction or a context reset. - Use that mode consistently for sampling, remote compaction, startup prewarm, prompt debugging, and Guardian input budgeting. - Preserve tool declarations alongside their comparison baseline in full-history agent forks, including compacted histories; remove them together when rebuilding context. ## Testing Add request snapshots covering legacy resume, migration after remote compaction or a context reset, disabling incremental tools, and tool updates after restart. Extend agent fork and WebSocket startup prewarm tests to cover retained declarations and incremental tools. GitOrigin-RevId: 7c46849a1788027a8435082e4d1f7e7f48d2700c