openclaw - 💡(How to fix) Fix Bug: openai-codex OAuth token shows 'expires in 0m' despite valid JWT (display issue) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#53723Fetched 2026-04-08 01:24:22
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
1
Participants

openclaw models status consistently reports openai-codex:default ok expires in 0m even when the underlying JWT access token has a valid expiry well into the future.

Root Cause

openclaw models status consistently reports openai-codex:default ok expires in 0m even when the underlying JWT access token has a valid expiry well into the future.

Fix Action

Workaround

None for the display. The token actually works fine — this is a cosmetic/UX issue but causes confusion and unnecessary re-auth attempts.

Code Example

openai-codex:default: exp=1775224102 (~April 1 2026, ~10 days from now)
stored_expires field in auth-profiles.json: 1775224101451 (correct timestamp)
openclaw models status display: expires in 0m  ← wrong
RAW_BUFFERClick to expand / collapse

Summary

openclaw models status consistently reports openai-codex:default ok expires in 0m even when the underlying JWT access token has a valid expiry well into the future.

Steps to Reproduce

  1. Run openclaw models auth login --provider openai-codex and complete the OAuth flow
  2. Run openclaw models status
  3. Observe: openai-codex:default ok expires in 0m

Expected Behavior

The expiry time should reflect the actual JWT exp claim from the access token.

Actual Behavior

Reports expires in 0m regardless of how fresh the token is.

Evidence

After a fresh OAuth login, decoding the JWT directly confirms the token is valid:

openai-codex:default: exp=1775224102 (~April 1 2026, ~10 days from now)
stored_expires field in auth-profiles.json: 1775224101451 (correct timestamp)
openclaw models status display: expires in 0m  ← wrong

The stored_expires value in auth-profiles.json is correct. The display calculation appears to be the issue.

Workaround

None for the display. The token actually works fine — this is a cosmetic/UX issue but causes confusion and unnecessary re-auth attempts.

Environment

  • OpenClaw version: 2026.3.23-2
  • OS: macOS 15.7.4 (ARM64)
  • Provider: openai-codex (OAuth)
  • Profile: openai-codex:default

extent analysis

Fix Plan

The issue seems to be related to the calculation of the expiry time in the openclaw models status command. To fix this, we need to update the code that calculates the expiry time.

Here are the steps to fix the issue:

  • Update the openclaw models status command to correctly calculate the expiry time from the stored_expires field in auth-profiles.json.
  • Use the following code snippet as an example:
import json
import datetime

# Load auth-profiles.json
with open('auth-profiles.json', 'r') as f:
    auth_profiles = json.load(f)

# Get the stored_expires value
stored_expires = auth_profiles['openai-codex:default']['stored_expires']

# Calculate the expiry time
expiry_time = datetime.datetime.fromtimestamp(stored_expires /

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Bug: openai-codex OAuth token shows 'expires in 0m' despite valid JWT (display issue) [1 participants]