Codex Auth Session Refresh
/install codex-auth-session
๐งฉ Codex Skill: Codex Auth Session Refresh
This 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
๐ฏ Who Is This For?
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 |
What This Does
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 ๆถ็ๆๆใ
Quick Install (on Windows)
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.
Installation via ClawHub
clawhub install codex-auth-session
Commands (for Codex auth management)
| 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 |
How It Works
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)
Security
- Token values are never logged โ
delete safe.tokenbefore write auth.jsonbacked up with timestamp before every update- All sensitive paths excluded via
.gitignore
Requirements
- OS: Windows 10/11
- Runtime: Node.js 18+
- Browser: Chrome or Microsoft Edge
- Target: Codex CLI by OpenAI
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install codex-auth-session - After installation, invoke the skill by name or use
/codex-auth-session - Provide required inputs per the skill's parameter spec and get structured output
What is Codex Auth Session Refresh?
๐งฉ 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 remo... It is an AI Agent Skill for Claude Code / OpenClaw, with 32 downloads so far.
How do I install Codex Auth Session Refresh?
Run "/install codex-auth-session" in the OpenClaw or Claude Code chat to install it in one step โ no extra setup required.
Is Codex Auth Session Refresh free?
Yes, Codex Auth Session Refresh is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Codex Auth Session Refresh support?
Codex Auth Session Refresh is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Codex Auth Session Refresh?
It is built and maintained by zcz-user (@zcz-user); the current version is v1.0.3.