Summary
When multiple sessions are open and each logs in with different accounts/apps, the default context marker is not consistent with the active session context.
Reproduction
- Open Session 1 and log in with app/account App A (set as default at that time).
- Open Session 2 and log in with app/account App B (set as default at that time).
- Return to Session 1 and run:
Get-GitHubConfig → shows App B as default context.
Get-GitHubContext → returns info about App A.
Get-GitHubContext -ListAvailable → default marker is on App B.
Get-GitHubApp (current session was logged in using an app) shows session/account behavior inconsistent with default marker.
Actual behavior
Default context marker/state appears to be updated globally across sessions, while session-resolved context still points to the session login.
Expected behavior
Behavior should be predictable in multi-session usage and configurable:
-
Operational default should be session-local by default
- A session keeps its selected active/default context stable unless changed in that same session.
-
A separate global startup default should exist for new sessions
- New sessions initialize from a global default context, but existing sessions do not switch automatically.
-
Shared contexts should remain available across sessions
- Sessions can list/select shared contexts, but accessing them should not implicitly change another session's active default.
-
Configuration option for default scope
- Add a setting (for example,
DefaultContextScope) to choose behavior:
Session (recommended)
Global
- Optionally pair with
StartupDefaultContext for session initialization.
Commands should consistently reflect the same effective context model:
Get-GitHubConfig
Get-GitHubContext
Get-GitHubContext -ListAvailable
Get-GitHubApp
Summary
When multiple sessions are open and each logs in with different accounts/apps, the default context marker is not consistent with the active session context.
Reproduction
Get-GitHubConfig→ shows App B as default context.Get-GitHubContext→ returns info about App A.Get-GitHubContext -ListAvailable→ default marker is on App B.Get-GitHubApp(current session was logged in using an app) shows session/account behavior inconsistent with default marker.Actual behavior
Default context marker/state appears to be updated globally across sessions, while session-resolved context still points to the session login.
Expected behavior
Behavior should be predictable in multi-session usage and configurable:
Operational default should be session-local by default
A separate global startup default should exist for new sessions
Shared contexts should remain available across sessions
Configuration option for default scope
DefaultContextScope) to choose behavior:Session(recommended)GlobalStartupDefaultContextfor session initialization.Commands should consistently reflect the same effective context model:
Get-GitHubConfigGet-GitHubContextGet-GitHubContext -ListAvailableGet-GitHubApp