mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Legacy shell snapshots could retain exports excluded by `shell_environment_policy` and restore captured values over explicit overrides when replayed. ## What changed - Build snapshots with the resolved environment's policy and omit filtered exports and original values for variables overridden by `set`. - Skip eager snapshot creation when configuration is unavailable, and reject snapshots whose policy differs from the current turn's policy. ## Testing Add a regression test covering default and custom exclusions, `include_only`, preservation of multiline values, and `set` overrides that survive snapshot replay. Verify excluded and overridden captured values are absent from the snapshot file. GitOrigin-RevId: 4b785130f6c5a4d268ab86fd36ab9d77d8c4a3b9