Repository navigation
Keep MCP policy evaluation consistent with turn environments - #46335
Merged
copyberry[bot] merged 1 commit intoSep 18, 2026
Conversation
## Why Environment settings saved for the next turn must not change MCP tool availability during the active turn. ## What changed - Use one captured environment snapshot for MCP policy evaluation and runtime publication, including selections that are still starting or have failed. - Compare both captured selections and ready environment handles when deciding whether to refresh the runtime, and rebuild the startup configuration when resolved selections change. - Preserve the configuration origin of failed selections so MCP authority evaluation retains whether configuration comes from the thread. - Box the MCP refresh future to keep it off the sampling request's stack. ## Testing Add a regression test that updates the environment MCP policy while a turn waits for user input, verifies the tool remains visible when that turn resumes, and verifies it disappears on the next turn. Extend snapshot tests to cover starting and failed selections. GitOrigin-RevId: cc2744b5137be69f000d70b0c7009b14079f39ae
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/cc2744b5137be69f000d70b0c7009b14079f39ae
branch
from
September 18, 2026 00:59
2cdecfd to
7498521
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/cc2744b5137be69f000d70b0c7009b14079f39ae
branch
September 18, 2026 00:59
michabbb
temporarily deployed
to
issue-triage
September 18, 2026 01:04 — with
GitHub Actions
Inactive
michabbb
temporarily deployed
to
issue-triage
September 18, 2026 01:04 — with
GitHub Actions
Inactive
michabbb
temporarily deployed
to
issue-triage
September 18, 2026 01:04 — with
GitHub Actions
Inactive
michabbb
temporarily deployed
to
issue-triage
September 18, 2026 01:06 — with
GitHub Actions
Inactive
igorzep
temporarily deployed
to
issue-triage
September 18, 2026 01:32 — with
GitHub Actions
Inactive
igorzep
temporarily deployed
to
issue-triage
September 18, 2026 01:32 — with
GitHub Actions
Inactive
igorzep
temporarily deployed
to
issue-triage
September 18, 2026 01:32 — with
GitHub Actions
Inactive
NAEGYEIN
temporarily deployed
to
issue-triage
September 18, 2026 01:49 — with
GitHub Actions
Inactive
NAEGYEIN
temporarily deployed
to
issue-triage
September 18, 2026 01:49 — with
GitHub Actions
Inactive
NAEGYEIN
temporarily deployed
to
issue-triage
September 18, 2026 01:49 — with
GitHub Actions
Inactive
NAEGYEIN
temporarily deployed
to
issue-triage
September 18, 2026 01:50 — with
GitHub Actions
Inactive
cecilsg
temporarily deployed
to
issue-triage
September 18, 2026 02:01 — with
GitHub Actions
Inactive
cecilsg
temporarily deployed
to
issue-triage
September 18, 2026 02:01 — with
GitHub Actions
Inactive
cecilsg
temporarily deployed
to
issue-triage
September 18, 2026 02:01 — with
GitHub Actions
Inactive
Intimea01
temporarily deployed
to
issue-triage
September 18, 2026 02:04 — with
GitHub Actions
Inactive
Intimea01
temporarily deployed
to
issue-triage
September 18, 2026 02:04 — with
GitHub Actions
Inactive
Intimea01
temporarily deployed
to
issue-triage
September 18, 2026 02:04 — with
GitHub Actions
Inactive
anarchylimes
temporarily deployed
to
issue-triage
September 18, 2026 02:16 — with
GitHub Actions
Inactive
anarchylimes
temporarily deployed
to
issue-triage
September 18, 2026 02:16 — with
GitHub Actions
Inactive
gustavokurtz
temporarily deployed
to
issue-triage
September 18, 2026 02:32 — with
GitHub Actions
Inactive
gustavokurtz
temporarily deployed
to
issue-triage
September 18, 2026 02:32 — with
GitHub Actions
Inactive
stefanyrodriguesadv-a11y
temporarily deployed
to
issue-triage
September 18, 2026 02:34 — with
GitHub Actions
Inactive
stefanyrodriguesadv-a11y
temporarily deployed
to
issue-triage
September 18, 2026 02:34 — with
GitHub Actions
Inactive
stefanyrodriguesadv-a11y
temporarily deployed
to
issue-triage
September 18, 2026 02:34 — with
GitHub Actions
Inactive
stefanyrodriguesadv-a11y
temporarily deployed
to
issue-triage
September 18, 2026 02:35 — with
GitHub Actions
Inactive
bluesky129
temporarily deployed
to
issue-triage
September 18, 2026 02:36 — with
GitHub Actions
Inactive
bluesky129
temporarily deployed
to
issue-triage
September 18, 2026 02:36 — with
GitHub Actions
Inactive
bluesky129
temporarily deployed
to
issue-triage
September 18, 2026 02:36 — with
GitHub Actions
Inactive
ccaw616-ux
temporarily deployed
to
issue-triage
September 18, 2026 02:37 — with
GitHub Actions
Inactive
ccaw616-ux
temporarily deployed
to
issue-triage
September 18, 2026 02:37 — with
GitHub Actions
Inactive
ccaw616-ux
temporarily deployed
to
issue-triage
September 18, 2026 02:37 — with
GitHub Actions
Inactive
xsy070709
temporarily deployed
to
issue-triage
September 18, 2026 02:46 — with
GitHub Actions
Inactive
xsy070709
temporarily deployed
to
issue-triage
September 18, 2026 02:46 — with
GitHub Actions
Inactive
xsy070709
temporarily deployed
to
issue-triage
September 18, 2026 02:46 — with
GitHub Actions
Inactive
apiloian
temporarily deployed
to
issue-triage
September 18, 2026 02:47 — with
GitHub Actions
Inactive
apiloian
temporarily deployed
to
issue-triage
September 18, 2026 02:47 — with
GitHub Actions
Inactive
apiloian
temporarily deployed
to
issue-triage
September 18, 2026 02:47 — with
GitHub Actions
Inactive
xsy070709
temporarily deployed
to
issue-triage
September 18, 2026 02:47 — with
GitHub Actions
Inactive
apiloian
temporarily deployed
to
issue-triage
September 18, 2026 02:48 — with
GitHub Actions
Inactive
yydspanda
temporarily deployed
to
issue-triage
September 18, 2026 02:54 — with
GitHub Actions
Inactive
yydspanda
temporarily deployed
to
issue-triage
September 18, 2026 02:54 — with
GitHub Actions
Inactive
yydspanda
temporarily deployed
to
issue-triage
September 18, 2026 02:54 — with
GitHub Actions
Inactive
yydspanda
temporarily deployed
to
issue-triage
September 18, 2026 02:55 — with
GitHub Actions
Inactive
Caryan-Teng
temporarily deployed
to
issue-triage
September 18, 2026 03:23 — with
GitHub Actions
Inactive
Caryan-Teng
temporarily deployed
to
issue-triage
September 18, 2026 03:23 — with
GitHub Actions
Inactive
Caryan-Teng
temporarily deployed
to
issue-triage
September 18, 2026 03:23 — with
GitHub Actions
Inactive
This branch was previously 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.
Keep MCP policy evaluation consistent with turn environments
Why
Environment settings saved for the next turn must not change MCP tool availability during the active turn.
What changed
Testing
Add a regression test that updates the environment MCP policy while a turn waits for user input, verifies the tool remains visible when that turn resumes, and verifies it disappears on the next turn. Extend snapshot tests to cover starting and failed selections.