Skip to content

[BUG] /web-setup returns "Login failed" in v2.1.119 despite valid claude.ai auth and connected GitHub Integration #53673

Description

@brianfofficial

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Summary

/web-setup consistently returns Login failed. Please visit https://claude.ai/code and login using the GitHub App even though every
prerequisite is satisfied. Cloud sessions spawned from the claude.ai web UI work correctly against the same repo, so the failure is isolated
to the CLI handshake itself.

Environment

  • Claude Code: v2.1.119 (latest, claude update reports up to date)
  • OS: macOS Darwin 25.5.0
  • Shell: zsh
  • Repo: private, on GitHub, clean working tree on main

Auth state (verified)

claude auth status:

{
  "loggedIn": true,
  "authMethod": "claude.ai",
  "apiProvider": "firstParty",                                                                                                                
  "subscriptionType": "max"
}                                                                                                                                             
         
gh auth status: logged in, scopes gist, read:org, repo, workflow.                                                                             
 
claude.ai → Settings → Connectors → GitHub Integration: shows connected (Disconnect button visible).                                          
         
GitHub App "Claude" installed on the account, scoped to the target repo (also tested with All repos).

### What Should Happen?

**What Should Happen?**                                                                                                                       
 
```markdown                                                                                                                                   
`/web-setup` either succeeds and links the local CLI to claude.ai cloud sessions, or returns a more specific error indicating which side of
the handshake failed (missing GitHub App slug, missing OAuth scope, expired token, etc.).    

### Error Messages/Logs

```shell
Login failed. Please visit https://claude.ai/code and login using the GitHub App
                                                                                                                                              
(Also: claude -p --debug=api "/web-setup" rejects with /web-setup isn't available in this environment, so the failing request body cannot be  
inspected from headless mode.)

Steps to Reproduce

Steps to Reproduce:

  1. claude inside any git repo on macOS
  2. Run /web-setup
  3. Output: Login failed. Please visit https://claude.ai/code and login using the GitHub App

What I already tried

  1. claude update — already on latest 2.1.119
  2. gh auth status — logged in, repo + read:org + workflow scopes
  3. claude auth status — claude.ai Max, firstParty provider, loggedIn: true
  4. Visited https://claude.ai/code in browser — page loads, no install prompt appears
  5. Toggled Claude GitHub App from "All repos" → single repo → "All repos"
  6. Disconnected + reconnected the GitHub Integration in claude.ai → Settings → Connectors
  7. Retried /web-setup after each change — identical error every time

Cloud sessions spawned from the claude.ai web UI on the same repo work correctly (pull, hooks, commit, push all succeed). Only the CLI
/web-setup handshake fails.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.119 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

  • Cloud sessions work fine when spawned from the claude.ai web UI directly. They pull the repo, run hooks, commit, and push successfully. Only
    the /web-setup CLI code path is broken.
  • ~/.claude.json shows claudeAiMcpEverConnected: true and a populated oauthAccount block with billingType: stripe_subscription,
    subscriptionType: max, and a valid organizationUuid.
  • Happy to share more debug output if there's a flag that surfaces the failing request body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:autharea:claude-code-webClaude Code on the web. claude.com/codebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions