Repository navigation
Protect MCP OAuth persistence from stale credential writes - #60849
Merged
copyberry[bot] merged 1 commit intoNov 11, 2026
Conversation
## Why A pending token refresh must not overwrite a newer login or recreate credentials after logout. Legacy file entries also need to retain their stored identity across refreshes. ## What changed - Lock and revalidate stored credentials before persisting changed authorization-manager credentials, requiring authorization again if storage has changed. - Update file-backed refreshes only when the matched entry still contains the expected credentials, preserving its key, server name, and ownership. Compare only fields the file format can persist. - Remove matching legacy file entries when saving login credentials or deleting credentials, while preserving unrelated entries and profile-scoped enterprise credentials' separate local entries. ## Testing Add regression coverage for newer logins and logout during pending persistence, repeated refreshes of legacy and escaped-name entries, and cleanup that preserves unrelated credentials. Update guard-retention and telemetry assertions for the validation path. GitOrigin-RevId: 3d7c603950afcff72f0bcd943edae5ecfbcb5bd2
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/3d7c603950afcff72f0bcd943edae5ecfbcb5bd2
branch
from
November 11, 2026 19:19
859b46d to
392ced7
Compare
Contributor
Codex Review Summary: 🔄 RunningThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/3d7c603950afcff72f0bcd943edae5ecfbcb5bd2
branch
November 11, 2026 19:19
Gromhogg
temporarily deployed
to
issue-triage
November 11, 2026 19:31 — with
GitHub Actions
Inactive
Gromhogg
temporarily deployed
to
issue-triage
November 11, 2026 19:31 — with
GitHub Actions
Inactive
Gromhogg
temporarily deployed
to
issue-triage
November 11, 2026 19:31 — with
GitHub Actions
Inactive
Gromhogg
temporarily deployed
to
issue-triage
November 11, 2026 19:32 — with
GitHub Actions
Inactive
phooBarred
temporarily deployed
to
issue-triage
November 11, 2026 20:13 — with
GitHub Actions
Inactive
phooBarred
temporarily deployed
to
issue-triage
November 11, 2026 20:13 — with
GitHub Actions
Inactive
phooBarred
temporarily deployed
to
issue-triage
November 11, 2026 20:13 — with
GitHub Actions
Inactive
phooBarred
temporarily deployed
to
issue-triage
November 11, 2026 20:14 — with
GitHub Actions
Inactive
RShapiroWC
temporarily deployed
to
issue-triage
November 11, 2026 20:57 — with
GitHub Actions
Inactive
RShapiroWC
temporarily deployed
to
issue-triage
November 11, 2026 20:57 — with
GitHub Actions
Inactive
RShapiroWC
temporarily deployed
to
issue-triage
November 11, 2026 20:57 — with
GitHub Actions
Inactive
mwedeking-blip
temporarily deployed
to
issue-triage
November 11, 2026 20:57 — with
GitHub Actions
Inactive
mwedeking-blip
temporarily deployed
to
issue-triage
November 11, 2026 20:57 — with
GitHub Actions
Inactive
mwedeking-blip
temporarily deployed
to
issue-triage
November 11, 2026 20:57 — with
GitHub Actions
Inactive
mwedeking-blip
temporarily deployed
to
issue-triage
November 11, 2026 21:04 — with
GitHub Actions
Inactive
RShapiroWC
temporarily deployed
to
issue-triage
November 11, 2026 21:04 — with
GitHub Actions
Inactive
zotosupport
temporarily deployed
to
issue-triage
November 11, 2026 21:12 — with
GitHub Actions
Inactive
777genius
temporarily deployed
to
issue-triage
November 11, 2026 21:20 — with
GitHub Actions
Inactive
Maciej26code
temporarily deployed
to
issue-triage
November 11, 2026 21:40 — with
GitHub Actions
Inactive
Maciej26code
temporarily deployed
to
issue-triage
November 11, 2026 21:40 — with
GitHub Actions
Inactive
Maciej26code
temporarily deployed
to
issue-triage
November 11, 2026 21:40 — with
GitHub Actions
Inactive
iamhectorlopez
temporarily deployed
to
issue-triage
November 11, 2026 21:44 — with
GitHub Actions
Inactive
iamhectorlopez
temporarily deployed
to
issue-triage
November 11, 2026 21:44 — with
GitHub Actions
Inactive
iamhectorlopez
temporarily deployed
to
issue-triage
November 11, 2026 21:44 — with
GitHub Actions
Inactive
iamhectorlopez
temporarily deployed
to
issue-triage
November 11, 2026 21:45 — with
GitHub Actions
Inactive
vcpompeo
temporarily deployed
to
issue-triage
November 11, 2026 21:56 — with
GitHub Actions
Inactive
vcpompeo
temporarily deployed
to
issue-triage
November 11, 2026 21:56 — with
GitHub Actions
Inactive
vcpompeo
temporarily deployed
to
issue-triage
November 11, 2026 21:56 — with
GitHub Actions
Inactive
vcpompeo
temporarily deployed
to
issue-triage
November 11, 2026 21:57 — with
GitHub Actions
Inactive
leeassocind-rgb
temporarily deployed
to
issue-triage
November 11, 2026 21:58 — with
GitHub Actions
Inactive
leeassocind-rgb
temporarily deployed
to
issue-triage
November 11, 2026 21:58 — with
GitHub Actions
Inactive
leeassocind-rgb
temporarily deployed
to
issue-triage
November 11, 2026 21:58 — with
GitHub Actions
Inactive
777genius
temporarily deployed
to
issue-triage
November 11, 2026 22:06 — with
GitHub Actions
Inactive
777genius
temporarily deployed
to
issue-triage
November 11, 2026 22:06 — with
GitHub Actions
Inactive
777genius
temporarily deployed
to
issue-triage
November 11, 2026 22:06 — with
GitHub Actions
Inactive
777genius
temporarily deployed
to
issue-triage
November 11, 2026 22:07 — with
GitHub Actions
Inactive
bestalexandersson-rgb
temporarily deployed
to
issue-triage
November 11, 2026 22:09 — with
GitHub Actions
Inactive
bestalexandersson-rgb
temporarily deployed
to
issue-triage
November 11, 2026 22:09 — with
GitHub Actions
Inactive
bestalexandersson-rgb
temporarily deployed
to
issue-triage
November 11, 2026 22:09 — with
GitHub Actions
Inactive
EmergentMonk
temporarily deployed
to
issue-triage
November 11, 2026 22:18 — with
GitHub Actions
Inactive
EmergentMonk
temporarily deployed
to
issue-triage
November 11, 2026 22:18 — with
GitHub Actions
Inactive
EmergentMonk
temporarily deployed
to
issue-triage
November 11, 2026 22:18 — with
GitHub Actions
Inactive
EmergentMonk
temporarily deployed
to
issue-triage
November 11, 2026 22:19 — 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.
Protect MCP OAuth persistence from stale credential writes
Why
A pending token refresh must not overwrite a newer login or recreate credentials after logout. Legacy file entries also need to retain their stored identity across refreshes.
What changed
Testing
Add regression coverage for newer logins and logout during pending persistence, repeated refreshes of legacy and escaped-name entries, and cleanup that preserves unrelated credentials. Update guard-retention and telemetry assertions for the validation path.