Repository navigation
fix: don't warn about expired OAuth tokens with valid refresh tokens - #4593
Merged
shakkernerd merged 1 commit intoJan 30, 2026
Merged
Conversation
OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-Authored-By: Ayush Ojha <[email protected]>
shakkernerd
force-pushed
the
fix/doctor-oauth-refresh-token-warning
branch
from
January 30, 2026 15:37
f20a6c9 to
a2c0d05
Compare
This was referenced Jan 30, 2026
GodsBoy
added a commit
to GodsBoy/openclaw
that referenced
this pull request
Jan 31, 2026
Add Claude Code CLI credential sync to external-cli-sync, matching the existing Qwen CLI pattern. When ~/.claude/.credentials.json contains full OAuth credentials (access + refresh token), they are imported as type: oauth profiles enabling automatic token refresh. Changes: - external-cli-sync.ts: add Claude CLI sync (OAuth + setup-token fallback) - doctor-auth.ts: un-deprecate anthropic:claude-cli profile - external-cli-sync.test.ts: integration tests - isExternalProfileFresh: accept optional provider param Supersedes openclaw#4615. Complements openclaw#4593.
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Jan 31, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Jan 31, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Jan 31, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Jan 31, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Jan 31, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Jan 31, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Jan 31, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Jan 31, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Jan 31, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ayushozha
added a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
GodsBoy
added a commit
to GodsBoy/openclaw
that referenced
this pull request
Feb 1, 2026
Add Claude Code CLI credential sync to external-cli-sync, matching the existing Qwen CLI pattern. When ~/.claude/.credentials.json contains full OAuth credentials (access + refresh token), they are imported as type: "oauth" profiles enabling automatic token refresh. This solves three problems: 1. Token expiry requires manual re-auth (auto-refresh via refresh token) 2. Re-onboarding with setup-token loses user:profile scope (full OAuth preserves all scopes including usage tracking) 3. No easy path to import Claude Code credentials (automatic sync) Changes: - external-cli-sync.ts: add Claude CLI sync (OAuth + setup-token fallback) - doctor-auth.ts: un-deprecate anthropic:claude-cli profile, update hint to recommend `claude login` for refresh - external-cli-sync.test.ts: integration tests using temp credential files - isExternalProfileFresh: accept optional provider param for multi-CLI use - Refactored Qwen sync to use shared syncExternalCliCredentialsForProvider Supersedes openclaw#4615 (scope hint) by addressing the root cause. Complements openclaw#4593 (don't warn about expired tokens with refresh tokens).
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Feb 1, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
mf-yang
added a commit
to mf-yang/openclaw-cn
that referenced
this pull request
Feb 2, 2026
…upstream openclaw#4593) Suppress misleading warnings when OAuth tokens have valid refresh tokens.
HashWarlock
pushed a commit
to HashWarlock/openclaw
that referenced
this pull request
Feb 4, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
uxcu
pushed a commit
to uxcu/kook-openclaw
that referenced
this pull request
Feb 5, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
bestNiu
pushed a commit
to bestNiu/clawdbot
that referenced
this pull request
Feb 5, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
Geravant
pushed a commit
to anthillnet/openclaw
that referenced
this pull request
Feb 27, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
lhfer
pushed a commit
to lhfer/openclaw
that referenced
this pull request
Oct 11, 2026
…penclaw#4593) OAuth credentials with a refresh token auto-renew on first API call, so the doctor should not warn about access token expiration when a refresh token is present. This avoids unnecessary "expired" warnings that prompt users to re-auth when no action is needed. Fixes openclaw#3032 Co-authored-by: Ayush Ojha <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buildProfileHealth()inauth-health.tsnow checks for a refresh token before marking status as "expired" or "expiring"Test plan
Fixes #3032