You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Builds on the authoritative credential lifecycle from #4170.
Problem
Each ACP conversation can launch a separate codex-acp process with its own in-memory Codex authentication manager. Two live processes can therefore hold the same refresh-token generation R0 and both attempt to exchange it upstream.
A shared CODEX_HOME, file writeback, or store-level compare-and-swap cannot prevent the second process from presenting R0 to the provider. No production incident has been attributed to this race yet, but current deployment topologies do not provide a single refresh owner.
Scope
Establish one refresh authority per underlying Codex subscription credential.
Serialize and fence upstream refreshes across every process that can use that credential.
Return the current authoritative generation to a caller that presents a stale generation instead of refreshing upstream again.
Reconcile all participating working copies with the winning generation.
Make lock acquisition, retries, crashes, restarts, and teardown safe.
Cover SaaS sandboxes, OSS App Server Docker sandboxes, and direct Agent Server deployments.
Cover both brokered CODEX_AUTH_JSON credentials and ambient/shared CODEX_HOME authentication, or explicitly reject an unsupported concurrent path.
Acceptance criteria
Two callers holding R0 cause at most one upstream refresh.
Both callers converge on the same authoritative successor generation.
A stale caller cannot overwrite a newer generation or resurrect a deleted credential.
Lock expiry or process failure cannot permit an unfenced stale refresh or leave the credential permanently unavailable.
Multi-process tests cover shared-file, local broker, and distributed broker topologies.
Credential and broker authorization values never appear in logs or persisted conversation output.
[Automatic Post]: This issue has been waiting for triage. @xingyaoww@neubig@enyst, could you
please take a look and add the appropriate priority label when you have a chance?
This comment was generated by an AI agent (OpenHands) on behalf of the user.
[Automatic Post]: This issue has been waiting for triage. @xingyaoww@neubig@enyst, could you
please take a look and add the appropriate priority label when you have a chance?
This comment was created by an AI agent (OpenHands) on behalf of the user.
Closing, evidence-based. This issue's own text already says it: "No production incident has been attributed to this race yet." Production telemetry in OpenHands/enterprise#120 independently confirmed that — zero credential rotations were detected in a 15-day production window, and the concurrent-refresh race this describes requires rotation to be happening at all.
Not building the concurrent-refresh-owner behavior. Re-open if a real incident ever traces to this specifically.
Activity
all-hands-bot commentedon Jul 23, 2026
[Automatic Post]: This issue has been waiting for triage. @xingyaoww @neubig @enyst, could you
please take a look and add the appropriate priority label when you have a chance?
This comment was generated by an AI agent (OpenHands) on behalf of the user.
all-hands-bot commentedon Jul 24, 2026
[Automatic Post]: This issue has been waiting for triage. @xingyaoww @neubig @enyst, could you
please take a look and add the appropriate priority label when you have a chance?
This comment was created by an AI agent (OpenHands) on behalf of the user.
simonrosenberg commentedon Aug 7, 2026
Closing, evidence-based. This issue's own text already says it: "No production incident has been attributed to this race yet." Production telemetry in OpenHands/enterprise#120 independently confirmed that — zero credential rotations were detected in a 15-day production window, and the concurrent-refresh race this describes requires rotation to be happening at all.
Not building the concurrent-refresh-owner behavior. Re-open if a real incident ever traces to this specifically.