fix: write RFC 3339 timestamps to codex auth.json#46
Draft
Conversation
…mpatibility Agent-Logs-Url: https://github.com/bubbuild/republic/sessions/bec5de29-5d89-4de9-bea2-0ef97ad4cc65 Co-authored-by: frostming <16336606+frostming@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix codex auth.json time format to RFC3339
fix: write RFC 3339 timestamps to codex auth.json
Apr 17, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Codex CLI changed its
auth.jsonschema to expect RFC 3339 date-time strings forexpires_atandlast_refresh.bub login openaiwas writing raw Unix integers, causing codex to fail on startup with:Changes
save_openai_codex_oauth_tokens: writesexpires_atandlast_refreshas RFC 3339 strings ("2026-04-17T08:24:40Z") instead of integers_parse_tokens: accepts both RFC 3339 strings and legacy integer timestamps for backward compatibility when reading existing files_unix_to_rfc3339(ts)and_rfc3339_to_unix(value)for clean conversion in both directionsResulting
auth.jsonstructure:{ "tokens": { "access_token": "...", "refresh_token": "...", "expires_at": "2026-04-17T08:24:40Z" }, "last_refresh": "2026-04-17T08:56:01Z" }