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
{{ message }}
Repository navigation
Keep the native-main login in memory while Codex rewrites auth.json #7345
Keep native-main requests working while Codex clears or rewrites ~/.codex/auth.json, without needing a fix on the Codex side.
What prevents this today?
In "codex" refresh mode (#7048), OpenCodex still reads auth.json directly for each request and in several other places. While Codex clears the file (codex login does this before it writes the new login, openai/codex#46430) or rewrites it, that read returns nothing, and the request continues without a login. I explained this in #2999 (#2999 (comment)) and asked whether you want the change; that question is still open, so I am opening this issue with the pull request ready.
What should OpenCodex do?
Keep the native-main login in memory with one point of reading (a watcher that adopts only complete, valid content) and one point of writing (used only in "opencodex" refresh mode). An empty or briefly missing file is a hiccup, not a logout; a missing file becomes a logout only after a grace period.
Example usage or interface
No new setting or command. Pull request #7344 implements it on top of dev and keeps #7048's "codex" mode and #7035's behavior as they are.
Alternatives or workarounds
Keep reading the file directly and rely on Codex never leaving it empty or partial. That needs a Codex-side change (reproduction: openai/codex#40267 (comment)).
Additional context
It is up to you. If you do not want it, close this issue and the pull request, and I will drop the branch.
Checks
I searched existing issues and documentation.
This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
Linked to Draft #7344. This is a change to native-main credential ownership and logout semantics, rather than only a file-read optimization. The ten-minute missing-file grace and retention of a last-good grant during rewrites need an explicit owner decision: distinguish transient empty/partial replacement, intentional logout, account switch, pause/revocation and a writer that lost ownership. Preserve #7048 refresh-mode ownership and #7035's request-local refreshed-token behavior independently.
I am keeping this as needs-design while that decision and the required authentication-boundary review remain open. The PR's frozen/missing-write, directory-event-loss, rename-boundary and shutdown fixtures are relevant evidence; they do not themselves approve the retention policy. No live auth/config/service change or new scan was run.
Activity
github-actions commentedon Oct 19, 2026
Automated translation bookkeeping — detected language: English.
Ingwannu commentedon Oct 19, 2026
Linked to Draft #7344. This is a change to native-main credential ownership and logout semantics, rather than only a file-read optimization. The ten-minute missing-file grace and retention of a last-good grant during rewrites need an explicit owner decision: distinguish transient empty/partial replacement, intentional logout, account switch, pause/revocation and a writer that lost ownership. Preserve #7048 refresh-mode ownership and #7035's request-local refreshed-token behavior independently.
I am keeping this as needs-design while that decision and the required authentication-boundary review remain open. The PR's frozen/missing-write, directory-event-loss, rename-boundary and shutdown fixtures are relevant evidence; they do not themselves approve the retention policy. No live auth/config/service change or new scan was run.