Skip to content

Speed up MCP OAuth credential reads - #37842

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f13512e6404d4919879ba5ba77a3e34e52b35640
Aug 10, 2026
Merged

Speed up MCP OAuth credential reads#37842
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f13512e6404d4919879ba5ba77a3e34e52b35640

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 10, 2026

Copy link
Copy Markdown

Speed up MCP OAuth credential reads

Why

Concurrent MCP startup and status checks should not serialize when they only read the shared credential store. Repeated reads of the encrypted MCP OAuth store also needlessly decrypted unchanged contents.

What changed

  • Use shared locks for File and Secrets credential reads while keeping saves and deletes exclusive.
  • Cache decrypted MCP OAuth secrets by store path, ciphertext, and passphrase, and invalidate the cache after writes.

Testing

  • Cover concurrent readers, reader/writer exclusion, shared credential loads, and cache invalidation after updates and deletes.

## Why

Concurrent MCP startup and status checks should not serialize when they only read the shared credential store. Repeated reads of the encrypted MCP OAuth store also needlessly decrypted unchanged contents.

## What changed

- Use shared locks for `File` and `Secrets` credential reads while keeping saves and deletes exclusive.
- Cache decrypted MCP OAuth secrets by store path, ciphertext, and passphrase, and invalidate the cache after writes.

## Testing

- Cover concurrent readers, reader/writer exclusion, shared credential loads, and cache invalidation after updates and deletes.

GitOrigin-RevId: f13512e6404d4919879ba5ba77a3e34e52b35640
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f13512e6404d4919879ba5ba77a3e34e52b35640 branch from 9e6f1f2 to 8b1b065 Compare August 10, 2026 15:44
@copyberry
copyberry Bot merged commit 8b1b065 into main Aug 10, 2026
22 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f13512e6404d4919879ba5ba77a3e34e52b35640 branch August 10, 2026 15:44
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant