Install
openclaw skills install codex-auth-sessionπ§© Codex Skill β Refresh your Codex CLI auth.json from a local ChatGPT web session. Essential for Codex users behind firewalls, in WSL/containers, or on remote desktops.
openclaw skills install codex-auth-sessionThis is an OpenClaw skill for Codex CLI. It provides Windows tooling to refresh Codex's
auth.jsonwith a fresh ChatGPT session token.
ι©η¨ζΌ Codex Β· For Codex CLI users
Codex CLI users who are stuck with any of these:
| π€ Pain | π₯ Why it sucks |
|---|---|
| Codex OAuth won't complete | Proxies, WSL, containers β browser never opens |
| OpenAI 2FA every time | Token expires every few hours |
| Forced to use API proxies | Can't get official auth working, settle for third-party |
| Token dies mid-session | Lose context, workflow destroyed |
Extracts a fresh access_token from your existing ChatGPT browser session and writes it directly to Codex's ~/.codex/auth.json. No reverse engineering. No MITM. No API abuse.
ιη¨δΊ Codex CLIοΌCodex θ΅°δΈδΊ OAuth ζΆηζζγ
git clone https://github.com/zcz-user/codex-auth-session-refresh.git
cd codex-auth-session-refresh
npm install
.\login-profile.ps1 # Login ChatGPT β press Enter
.\status.ps1 # Check Codex auth state
Then Codex will see the fresh token in ~/.codex/auth.json.
clawhub install codex-auth-session
| Command | What it does |
|---|---|
login-profile.ps1 | First login / re-login into ChatGPT (for Codex) |
run-refresh.ps1 | Refresh Codex's access token now |
status.ps1 | Check Codex auth.json status |
install-scheduled-task.ps1 | Auto-refresh Codex auth every N hours |
create-desktop-toolbox.ps1 | Desktop shortcuts for Codex auth management |
You (browser login to ChatGPT)
β
βΌ
Playwright β chatgpt.com/api/auth/session β accessToken
β
βΌ
~/.codex/auth.json
(backup created before update)
β
βΌ
Windows Scheduled Task
(auto-refresh, so Codex never loses auth)
delete safe.token before writeauth.json backed up with timestamp before every update.gitignore