Troubleshoot installation and login changedtroubleshoot-install
Upstream edited this page at 28 Oct 2026 18:37 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 28 Oct 2026 19:07 UTC.
Upstream edited
Recorded here
Lines+23added
Lines−13removed
From line
1,165
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits27to this page, all time
The whole hunk
from line 1165, old and new numbered
/
from line 1165
11651165
11661166### OAuth login fails in WSL2, SSH, or containers
11671167
1168When Claude Code runs in WSL2, on a remote machine over SSH, or inside a container, the browser usually opens on a different host and its redirect can't reach Claude Code's local callback server. After you sign in, the browser shows a login code instead of redirecting back automatically. Paste that code into the terminal at the `Paste code here if prompted` prompt to complete login.
1168If no browser opens, or the browser signs you in and then shows a connection error for a `localhost` address, you can finish signing in without fixing either problem. Sign in through the separate login URL that the terminal shows above its paste prompt instead:
11691169
1170If the browser doesn't open at all from WSL2, set the `BROWSER` environment variable to your Windows browser path:
1170**1. Copy the login URL**
11711171
1172```bash theme={null}
1173export BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
1174claude
1175```
1172At the interactive login prompt, press `c` to copy the URL, or select it in the terminal. With `claude auth login`, copy the URL that it prints.
11761173
1177Alternatively, press `c` at the interactive login prompt to copy the OAuth URL, or copy the URL that `claude auth login` prints, and open it in a browser on your local machine.
1174**2. Sign in through that URL**
11781175
1176Open the URL in a browser on your local machine and sign in. The browser then shows a code instead of returning to `localhost`.
1177
1178**3. Paste the code**
1179
1180Paste that code into the terminal at the prompt that begins `Paste code here`.
1181
11791182If pasting the code into the interactive prompt does nothing, your terminal's paste binding likely isn't reaching the input field. Try your terminal's alternate paste shortcut, often right-click or Shift+Insert in Windows Terminal, or use `claude auth login` instead, which reads the pasted code from standard input:
11801183
11811184```bash theme={null}
from line 1186
11831186```
11841187
11851188This fallback also applies on native Windows or any terminal where pasting into the interactive prompt fails.
1189
1190On WSL2, if no browser opened, you can also let Claude Code open your Windows browser next time by setting the `BROWSER` environment variable to that browser's path:
1191
1192```bash theme={null}
1193export BROWSER="/mnt/c/Program Files/Google/Chrome/Application/chrome.exe"
1194claude
1195```
11861196
11871197### Not logged in or token expired
11881198
No line in this hunk matches that.