Preflight Checklist
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:
claude inside 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.119
gh auth status — logged in, repo + read:org + workflow scopes
claude 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-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.
Preflight Checklist
What's Wrong?
Summary
/web-setupconsistently returnsLogin failed. Please visit https://claude.ai/code and login using the GitHub Appeven though everyprerequisite 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 updatereports up to date)mainAuth 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:
claudeinside any git repo on macOS/web-setupLogin failed. Please visit https://claude.ai/code and login using the GitHub AppWhat 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/web-setupafter each change — identical error every timeCloud sessions spawned from the claude.ai web UI on the same repo work correctly (pull, hooks, commit, push all succeed). Only the CLI
/web-setuphandshake 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
the
/web-setupCLI code path is broken.~/.claude.jsonshowsclaudeAiMcpEverConnected: trueand a populatedoauthAccountblock withbillingType: stripe_subscription,subscriptionType: max, and a validorganizationUuid.