Claude Code: Could not refresh your login because another process is refreshing it
Another Claude Code process holds the login refresh lock. Wait a minute, close that session, or /login—don’t treat it as a bad password. Short answer: 5 steps. 1) Confirm it’s the refresh-lock message, not token expired; 2) Wait about a minute and retry once; 3) Close other Claude Code windows and stuck processes; 4) If nothing else is running, sign in again with /login; 5) Separate disk-full refresh failures from lock contention.
Last updated: · This page is the decision checklist; the tools list for “Fix Claude Code OAuth refresh locked by another process” is a separate URL.
How do I wait, close the other process, or /login when Claude Code can’t refresh the login?
Confirm it’s the refresh-lock message, not token expired
Match `Could not refresh your login because another Claude Code process is refreshing it (or exited mid-refresh)` (interactive) or `Failed to refresh OAuth token: another Claude Code process is refreshing it or exited mid-refresh` (`-p` / Agent SDK, structured `server_error`). Claude Code stopped before sending the model request; this is not Invalid API key and not a usage limit. Error index: https://code.claude.com/docs/en/errors
Wait about a minute and retry once
If another window finishes the refresh first, this session picks up the renewed login automatically. Send the message again (or rerun the same `claude -p` command) before you wipe credentials.
Close other Claude Code windows and stuck processes
Quit extra IDE terminals, desktop Claude Code windows, background `claude` CLI jobs, and Agent SDK runners on the same machine that share `~/.claude` (or `CLAUDE_CONFIG_DIR`). A process that exited mid-refresh can leave the lock behind until you clear those sessions.
If nothing else is running, sign in again with /login
Run `/login` (or `claude auth login`) in this session. A fresh sign-in doesn’t wait on the refresh lock. Auth docs: https://code.claude.com/docs/en/authentication
Separate disk-full refresh failures from lock contention
If the message instead says the disk holding the Claude Code config directory is full, free space (or inodes) on that disk—signing in again won’t help until a new login can be saved. Default config dir is `~/.claude` unless `CLAUDE_CONFIG_DIR` points elsewhere.
Which tools are best to fix Claude Code OAuth refresh locked by another process?
Claude Code error reference
Official text and recovery for the shared refresh-lock error.
Authentication
/login and credential renewal when refresh stalls.
CLI reference
claude auth login / status for non-interactive recovery.
Troubleshoot installation and login
Broader login recovery when sign-in still fails after unlock.
Open: 1 spot per week
One labeled sponsor for this topic each week; this week's spot is open. See open weeks →
All tools for “Fix Claude Code OAuth refresh locked by another process” →
Related fixes
- Stop a Cursor agent loopHow to fix a Cursor agent loop (same edit, or work after Stop)Fix →
- Claude Code vs Codex vs Cursor ~$20 plansClaude Code vs Codex vs Cursor $20 plan limits: how to pick without burning the weekFix →
- Scan a vibe-coded app for leaked API keysCheck a vibe-coded app for leaked API keys before you share itFix →
- Add an MCP server to Claude Code, Cursor, or CodexHow to add an MCP server to Claude Code, Cursor, or CodexFix →
See also AI tools launched today on the daily board.
NewAIToolsToday Daily
Top 3 AI launches, one model or news item that matters, and one simple fix. A 5-minute read, every weekday.