Solving the Issue Where Claude Code on Desktop Fails to Resume Conversation Sessions
TLDR
- When OAuth authentication expires, Claude Code triggers a 401 error, and the
/logincommand fails to function correctly. - This is a known bug in Claude Desktop (Windows/macOS).
- Temporary workaround: Manually close Claude Desktop and re-run the installer to restore the conversation session.
Symptoms and Causes
When you encounter this issue: When the OAuth authentication status of Claude Code expires due to inactivity, attempting to continue a conversation triggers an error.
Once authentication expires, the system returns the following error message:
API Error: 401 {"type":"error","error":{"type":"authentication_error","message":"OAuth token has expired. Please obtain a new token or refresh your existing token."},"request_id":"req_011CWWoXen3mpmsjy27LGmqn"} · Please run /loginHowever, when the user follows the prompt and enters the /login command, the following abnormal behavior occurs:
- After entering the command for the first time, there is no visual feedback from the system.
- After a short delay, the system reports
Unknown slash command: login.
This issue prevents the current conversation session from continuing. It has been confirmed as a known bug in Claude Desktop. Related discussions can be found here:
- GitHub Issue #13928: Claude Code for Windows unusable due to OAuth loop
- GitHub Issue #15007: /login Does Not Recover Active Session
Temporary Workaround
WARNING
The following is an unofficial temporary workaround. It is recommended to keep an eye on official updates and wait for a formal fix.
Before the official fix for the authentication reconnection mechanism is released, you can force the session to resume by following these steps:
- Manually close the Claude Desktop window (it is recommended to close it manually to avoid interference from residual processes).
- Re-run
Claude Setup.exe.
After performing the steps above, the conversation session will immediately resume, without the need to log in again or start a new conversation.
Changelog
- Initial version created.