mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 23:40:45 +00:00
When Claude CLI credentials (anthropic:claude-cli) expire, automatically refresh using the stored refresh token instead of failing with "No credentials found" error. Changes: - Read refreshToken from Claude CLI and store as OAuth credential type - Implement bidirectional sync: after refresh, write new tokens back to Claude Code storage (file on Linux/Windows, Keychain on macOS) - Prefer OAuth over Token credentials (enables auto-refresh capability) - Maintain backward compatibility for credentials without refreshToken This enables long-running agents to operate autonomously without manual re-authentication when OAuth tokens expire. Co-Authored-By: Claude <noreply@anthropic.com>