[BUG] /web-setup returns "Login failed" in v2.1.119 despite valid claude.ai auth and connected GitHub Integration
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] 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 updatereports 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:
```json
{
"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
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:
claudeinside any git repo on macOS- Run
/web-setup - Output:
Login failed. Please visit https://claude.ai/code and login using the GitHub App
## What I already tried
claude update— already on latest 2.1.119gh auth status— logged in, repo + read:org + workflow scopesclaude auth status— claude.ai Max, firstParty provider, loggedIn: true- Visited https://claude.ai/code in browser — page loads, no install prompt appears
- Toggled Claude GitHub App from "All repos" → single repo → "All repos"
- Disconnected + reconnected the GitHub Integration in claude.ai → Settings → Connectors
- Retried
/web-setupafter 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.jsonshowsclaudeAiMcpEverConnected: trueand a populatedoauthAccountblock withbillingType: 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.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗