โ† Back to Skills Marketplace
zcz-user

Codex Auth Session Refresh

by zcz-user ยท GitHub โ†— ยท v1.0.3 ยท MIT-0
cross-platform โš  suspicious
32
Downloads
0
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install codex-auth-session
Description
๐Ÿงฉ 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...
README (SKILL.md)

๐Ÿงฉ Codex Skill: Codex Auth Session Refresh

This is an OpenClaw skill for Codex CLI. It provides Windows tooling to refresh Codex's auth.json with 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.token before write
  • auth.json backed 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
Usage Guidance
Install only if you deliberately want Codex authentication refreshed from an existing ChatGPT browser session. Treat the browser profile and ~/.codex/auth.json as sensitive credentials, use a dedicated trusted machine or profile, avoid shared systems and backups that copy these files, review any scheduled-task setup before enabling it, and know how to revoke the session if the files are exposed.
Capability Tags
cryptorequires-oauth-tokenrequires-sensitive-credentials
Capability Assessment
โš  Purpose & Capability
The core capability is extracting a ChatGPT browser-session access token and writing it into Codex auth storage. That is purpose-aligned for an auth-refresh helper, but it is sensitive bearer-token handling with account-access implications.
โš  Instruction Scope
The artifacts describe token extraction, auth.json writes, and optional scheduled refresh, but the supplied evidence shows limited explicit warning, confirmation, or tight scoping before credential capture and persistence.
โ„น Install Mechanism
The documented commands and scripts are visible and include management utilities such as login, refresh, status, desktop shortcuts, and scheduled-task setup; no hidden installer or obfuscation is evidenced.
โš  Credentials
Using a reusable browser profile/session and copying token material into ~/.codex/auth.json broadens credential exposure on the local machine. That may be acceptable for the stated workflow only on a trusted, single-user system with protected files.
โš  Persistence & Privilege
The skill can persist sensitive auth material and optionally install an automatic refresh task. Backups help reversibility, but scheduled refresh keeps credentials continuously available on disk.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install codex-auth-session
  3. After installation, invoke the skill by name or use /codex-auth-session
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.3
Add phone verification pain point โ€” key for Chinese users without overseas phone numbers
v1.0.2
Rewrite SKILL.md with pain-point-driven messaging for Codex users
v1.0.1
Mark as Codex Skill โ€” add ้ฉ็”จๆ–ผCodex markers, emphasize Codex CLI usage scenario
v1.0.0
Initial release: Playwright-based session extraction, Windows Scheduled Task auto-refresh, desktop toolbox, token-masked logging
Metadata
Slug codex-auth-session
Version 1.0.3
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

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.

๐Ÿ’ฌ Comments