[BUG] GitHub connection silently binds to whichever account is active in the browser session, with no account picker or indicator
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?
When (re)connecting the GitHub integration in Claude Code, the OAuth flow uses whichever GitHub account is currently logged into the user's browser — without showing an account picker or displaying which account was actually connected. If a user has multiple GitHub accounts and a different account's session happens to be active in their browser, the integration silently binds to the wrong account.
Impact observed: A Claude Code session correctly scoped to one GitHub account/repo had its GitHub access silently switch to a completely different, unrelated account after the browser's active GitHub session changed. This caused every git push and every GitHub tool call to fail with a generic "repository not found" error, with no indication of the real cause. Diagnosing this took significant back-and-forth, since neither the git errors nor the tool errors show which account is currently authenticated.
Observed and reproduced on desktop/PC. Not tested on mobile yet, but the same browser-session-based OAuth behavior likely applies there too.
What Should Happen?
Claude Code should show an explicit account picker when connecting/reconnecting GitHub instead of silently using the browser's active session, clearly display which account is currently connected, and give a clearer error when an operation fails due to an account/repo mismatch.
Error Messages/Logs
Steps to Reproduce
- Start a Claude Code session scoped to a specific GitHub account/repo (e.g. accountA/repo).
- In your browser, make sure a DIFFERENT GitHub account (accountB) is the active logged-in session on github.com.
- Trigger any GitHub-related reconnection in Claude Code (e.g. attempting to add a new repo via the repo-attach tool, even if that specific call fails/errors out).
- Subsequent git push and GitHub tool calls to accountA/repo now fail with "repository not found", even though the session's configured repo never changed.
- Checking the currently authenticated GitHub identity confirms the session switched to accountB instead of accountA.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
N/A — using Claude Code on the web (claude.ai), not the CLI
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗