Switching between two sessions with different GitHub accounts

Resolved 💬 3 comments Opened Apr 9, 2026 by Relkady84 Closed Apr 13, 2026

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?

Switching between two sessions with different GitHub accounts (Project1 and Project2) causes the wrong credentials to be used for git push.

What Should Happen?

In Code section, i have 2 sessions one for froject 1 account 1 in github and session 2 with project 2 account 2 in github, i have to push midification to project 2 after i switched from project 1 sessiom, i'm working on cloud environment, it keep telling me failed to connect to branch of project 2 still connected to project 1

Error Messages/Logs

Steps to Reproduce

Push Request failed

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Claude 1.1062.0 (b81bcd) 2026-04-06T21:20:28.000Z

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗