This guide covers the operational details that do not need to stay on the project homepage.
codex-probe follows the Codex CLI OAuth PKCE flow:
- Generate random
stateand PKCEverifier/S256 challenge - Open
https://auth.openai.com/oauth/authorize - Listen on
localhost:1455/auth/callback - Exchange
code + verifierforaccess_token,refresh_token, andid_token - Decode JWT claims to extract
account_idandemail
--renew evaluates each token file independently.
| Setting | Meaning |
|---|---|
renew_before_expiry_days |
Renew when a token will expire within this many days |
-f |
Force renew regardless of expiry time |
missing id_token |
Treat as renewable and try refresh |
invalid or missing expired |
Treat as renewable and try refresh |
Detailed rules:
- A token is renewed when any renew condition matches.
- A token is skipped when it is still fresh and
-fis not set. - Each refresh request retries up to 3 times internally.
--statuscan also auto-refresh on401or403.- After a successful renew, the CLI can prompt for
--syncwhen the refreshed file belongs tosync_dir.
Useful command variants:
# Force renew
codex-probe --renew -f ./tokens/me.json
# Use a custom config file
codex-probe --config ./config.json --sync
# Export CSV
codex-probe --status --apitest --output result.csv ./tokens/When --proxy is omitted, codex-probe checks proxy settings in this order:
HTTPS_PROXY,HTTP_PROXY,ALL_PROXY- macOS
scutil --proxy - Windows Internet Settings registry
- direct connection
--status columns:
| Column | Description |
|---|---|
file |
Credential file path |
account_id |
Account ID |
email |
|
plan_type |
Plan type |
5h_used_pct |
5-hour window usage percent |
5h_reset_at |
5-hour reset time |
weekly_used_pct |
Weekly usage percent |
weekly_reset_at |
Weekly reset time |
upstream_status |
HTTP status code |
error |
Error message when present |
--apitest columns:
| Column | Description |
|---|---|
file |
Credential file path |
account_id |
Account ID |
sample_models |
3 sampled model names separated by ; |
available |
true when at least one sampled model succeeds |