Repository navigation
Defer environment selection changes until the next turn - #46310
Merged
copyberry[bot] merged 1 commit intoSep 17, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why Updating environment selections while a turn is running must not redirect its tools or prevent its pending environment setup from completing. ## What changed - Store future environment selections separately from active environments, and activate them when preparing new work with no task running. - Keep turn contexts and MCP workspace roots tied to the active environment snapshot. Report saved selections through thread settings and `environment_selections()`. - Route environment configuration and failure callbacks to matching active or future selections so each can finish setup independently. - Stop the running task before manual compaction adopts the saved environments. ## Testing Add regression tests that preserve a running task's working directory and workspace roots, then adopt the saved selection for the next task. Add remote environment coverage showing that future setup can complete while the active turn waits, with each turn receiving its own capability roots. GitOrigin-RevId: 09a6b90131d2ab2441ce2fe9b0368a3668889f31
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/09a6b90131d2ab2441ce2fe9b0368a3668889f31
branch
from
September 17, 2026 21:47
f9f1372 to
c775dd3
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/09a6b90131d2ab2441ce2fe9b0368a3668889f31
branch
September 17, 2026 21:47
edwardswhiskeyblues-alt
deployed
to
issue-triage
September 17, 2026 22:46 — with
GitHub Actions
Active
edwardswhiskeyblues-alt
deployed
to
issue-triage
September 17, 2026 22:46 — with
GitHub Actions
Active
edwardswhiskeyblues-alt
deployed
to
issue-triage
September 17, 2026 22:46 — with
GitHub Actions
Active
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defer environment selection changes until the next turn
Why
Updating environment selections while a turn is running must not redirect its tools or prevent its pending environment setup from completing.
What changed
environment_selections().Testing
Add regression tests that preserve a running task's working directory and workspace roots, then adopt the saved selection for the next task. Add remote environment coverage showing that future setup can complete while the active turn waits, with each turn receiving its own capability roots.