Skip to content

claude login OAuth callback hangs when run inside the dev container (VS Code port forward) #1

Description

@MyKEms

Summary

When claude login (or the first ccd) is invoked inside the workspace container, the OAuth flow opens the host browser correctly, but the callback redirect to http://localhost:XXXX/callback never reaches
the CLI. The browser tab spins, the CLI sits waiting, and authentication never completes.

Steps to reproduce

  1. Fresh dev container with no ~/.claude/.credentials.json on the host
  2. Open project in VS Code → "Dev Containers: Reopen in Container"
  3. Inside the container terminal: ccd or claude
  4. Open/Copy the printed OAuth URL in the host browser, approve
  5. Browser redirects to http://localhost:XXXX/callback?code=...
  6. Tab hangs, CLI never receives the callback, eventually times out

Expected

Callback reaches the CLI's localhost listener inside the container, CLI prints "Login successful", credentials are written to /home/vscode/.claude/.credentials.json.

Actual

Callback never arrives at the in-container listener. CLI waits indefinitely (or until timeout).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions