You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Install gh older than 2.81.0 (e.g. 2.74.2) on the machine running T3 Code.
Run gh auth login, and confirm gh auth status shows you logged in.
Open Settings → Source Control, then click Rescan.
Expected behavior
GitHub is reported as authenticated, since gh auth status confirms the user is signed in.
Actual behavior
GitHub shows "Not authenticated" and Rescan never clears it, even though the user is fully signed in. Because the message tells you to sign in, users run gh auth login over and over — which never helps, since the real problem is the CLI version, not the login.
Root cause: the server detects auth by running gh auth status --json hosts and parsing the JSON:
On older gh, the command fails with unknown flag: --json (exit 1), so parseGitHubAuthStatus returns { parsed: false }, and parseGitHubAuth falls into the exitCode !== 0 branch (GitHubSourceControlProvider.ts:70) → "unauthenticated". gh --version is never consulted, and the raw error is hidden behind a generic badge — so the UI conflates "your CLI is too old" with "you're logged out," which have opposite fixes.
Impact
Major degradation or frequent failure
Version or commit
Environment
gh 2.74.2 (reproduces on any gh < 2.81.0).
Logs or stack traces
$ gh auth status --json hosts
unknown flag: --json
Screenshots, recordings, or supporting files
Before / after:
Workaround
Upgrade gh to v2.81.0 or newer.
Proposed fix (implemented in a draft PR): distinguish an outdated source-control auth status from unauthenticated — when gh rejects --json (or the parsed gh --version is < 2.81.0), report outdated with an "Outdated CLI" badge instead of "Not authenticated".
Before submitting
Area
apps/server
Steps to reproduce
gholder than 2.81.0 (e.g.2.74.2) on the machine running T3 Code.gh auth login, and confirmgh auth statusshows you logged in.Expected behavior
GitHub is reported as authenticated, since
gh auth statusconfirms the user is signed in.Actual behavior
GitHub shows "Not authenticated" and Rescan never clears it, even though the user is fully signed in. Because the message tells you to sign in, users run
gh auth loginover and over — which never helps, since the real problem is the CLI version, not the login.Root cause: the server detects auth by running
gh auth status --json hostsand parsing the JSON:apps/server/src/sourceControl/GitHubSourceControlProvider.ts:91—authArgs: ["auth", "status", "--json", "hosts"]--jsonflag was only added togh auth statusin gh v2.81.0 (Add JSON output togh auth statuscli/cli#11544, merged 2025-09-25).On older
gh, the command fails withunknown flag: --json(exit 1), soparseGitHubAuthStatusreturns{ parsed: false }, andparseGitHubAuthfalls into theexitCode !== 0branch (GitHubSourceControlProvider.ts:70) → "unauthenticated".gh --versionis never consulted, and the raw error is hidden behind a generic badge — so the UI conflates "your CLI is too old" with "you're logged out," which have opposite fixes.Impact
Major degradation or frequent failure
Version or commit
Environment
gh2.74.2 (reproduces on anygh< 2.81.0).Logs or stack traces
Screenshots, recordings, or supporting files
Before / after:
Workaround
Upgrade
ghto v2.81.0 or newer.Proposed fix (implemented in a draft PR): distinguish an
outdatedsource-control auth status fromunauthenticated— whenghrejects--json(or the parsedgh --versionis< 2.81.0), reportoutdatedwith an "Outdated CLI" badge instead of "Not authenticated".