mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
## Why An extension that manages its own credentials needs to refresh them without restarting an MCP session, while keeping each session tied to the identity that opened it. ## What changed Add `McpServerContribution::SetWithAuthProvider` for host-local Streamable HTTP servers. Codex asks the provider for fresh headers on each request. It reuses the connection across credential refreshes for the same owner, rejects requests whose owner differs from the session owner, and rebuilds the connection when the active owner changes. Provider-backed servers reject conflicting credential configuration, disable HTTP redirects, and bypass the shared startup tool catalog. Rebuilding the catalog disables a provider-backed registration if its transport changes. ## Testing Add coverage for credential rotation, owner changes, conflicting auth configuration, transport changes, and tool discovery for the current owner. GitOrigin-RevId: 409cbb2237ff306932491335461e87cf5a9ec890