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
{{ message }}
Repository navigation
[Bug]: GitLab unknown-remote probe needs the network: glab auth status hangs when a configured host is offline (VPN), stalling vcs.refreshStatus for 65s #17209
Fable (an AI agent in T3 Code) writing on behalf of Alexander Thalhammer (@L-X-T). The diagnosis was done on his machine; he reviewed and approved this report.
Before submitting
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Related: #12060 (refinement is uncached and repeated on every read) and #16503 (repeated 5s glab timeouts saturate VcsProcess). This report is a different trigger with a different fix. glab is installed and logged in to the host, but the check still needs the network.
Area
apps/server
Steps to reproduce
Use a self-hosted GitLab whose host name has no gitlab DNS label (here git.example.com, a placeholder for the real host), so T3 classifies the remote as unknown.
Log glab in to that host (glab auth login --hostname git.example.com). In my setup gitlab.com is configured too.
Make the host unreachable while DNS still resolves. Here the host is only reachable over a corporate VPN, which I often turn off.
Open a project with that remote in T3 Code and use the app normally.
Expected behavior
Recognizing the remote as GitLab shouldn't need the network. While the host is offline, T3 should still return git status quickly. At most, PR info should be missing.
Actual behavior
A "Some requests are slow" toast keeps coming back with vcs.refreshStatus entries, and git status stays stale for over a minute.
The GitLab discovery spec sets no remoteRefinementArgs, so refineUnknownRemoteProvider falls back to authArgs, which is glab auth status.
glab auth status without --hostname checks every configured host over the network. For the unreachable host it waits until context deadline exceeded (about 31s when run in a terminal).
With the host reachable, the same glab auth status finishes in about 0.8s and the remote is correctly refined to GitLab Self-Hosted. The probe only fails because it needs the network.
refineUnknownGitLabRemote only needs to know whether glab has a logged-in account for the host. It doesn't need a live check. glab can answer that offline from its config:
$ time glab config get api_host --host git.example.com # VPN off, works the samegit.example.com0.48s total
$ glab config get api_host --host unknown.example.com # empty output, exit 0
The Forgejo spec already does this: it sets remoteRefinementArgs: ["login", "list", ...], a local read, separate from its network auth check.
Suggested fix
Give the GitLab discovery spec an offline remoteRefinementArgs, for example glab config get user --host <host> or glab config get api_host --host <host>. Refine to GitLab when the output isn't empty. This needs the probe args to accept the remote's host. Alternatively, read glab's config.ymlhosts: keys directly.
If the network check stays, pass --hostname <host> so one unreachable host can't block the check for others.
Major degradation or frequent failure. Whenever the VPN is off, every project on that host sees git status stalls of over a minute, and the slow-request toast keeps reappearing.
Version or commit
0.0.46-nightly.20261005.2689 (desktop, bundled local server)
Environment
macOS 15.8.1, Apple Silicon. glab 1.121.0 with hosts gitlab.com and git.example.com (token in keyring). 9 projects with remotes on https://git.example.com/....
Logs or stack traces
# server.trace.ndjson, back-to-back refreshes for the same environment while the host was unreachable
EnvironmentRpc.request rpc.method=vcs.refreshStatus 13:54:26.917 → 13:55:31.929 65011.7 ms
EnvironmentRpc.request rpc.method=vcs.refreshStatus 13:55:31.931 → 13:56:37.266 65335.1 ms
# same window, other remote-status consumers stalled the same way
PullRequestSyncReactor.sweep 63495 ms
ws.rpc.pullRequests.summary 63618 ms PullRequestUnavailableError: Change requests cannot be browsed for this project's host yet.
# about 30 glab probes were killed at 5s across the 9 repos in those 65s
source-control.discovery.refine-unknown-remote: glab auth status (timeoutMs 5000)
# glab auth status run in a terminal while the host is unreachable:
# git.example.com fails with "context deadline exceeded" after ~31s
Workaround (until this is fixed): a glab wrapper earlier on PATH turns a plain glab auth status into glab auth status --hostname gitlab.com when nc -z -G 1 git.example.com 443 fails. This makes the probe return in about 1s.
Note
Fable (an AI agent in T3 Code) writing on behalf of Alexander Thalhammer (@L-X-T). The diagnosis was done on his machine; he reviewed and approved this report.
Before submitting
Related: #12060 (refinement is uncached and repeated on every read) and #16503 (repeated 5s
glabtimeouts saturateVcsProcess). This report is a different trigger with a different fix.glabis installed and logged in to the host, but the check still needs the network.Area
apps/server
Steps to reproduce
gitlabDNS label (heregit.example.com, a placeholder for the real host), so T3 classifies the remote asunknown.glabin to that host (glab auth login --hostname git.example.com). In my setup gitlab.com is configured too.Expected behavior
Recognizing the remote as GitLab shouldn't need the network. While the host is offline, T3 should still return git status quickly. At most, PR info should be missing.
Actual behavior
A "Some requests are slow" toast keeps coming back with
vcs.refreshStatusentries, and git status stays stale for over a minute.remoteRefinementArgs, sorefineUnknownRemoteProviderfalls back toauthArgs, which isglab auth status.glab auth statuswithout--hostnamechecks every configured host over the network. For the unreachable host it waits untilcontext deadline exceeded(about 31s when run in a terminal).DEFAULT_PROBE_TIMEOUT_MS. TheorElseSucceed(() => null)catch then turns the timeout into "no match", so the remote staysunknown. As in Unrecognised GitHub Enterprise host re-probes fj, tea and glab once per project on every sweep #12060, that failure isn't cached, so every status refresh, PR sync sweep and identity read runs the probe again.glab auth statusfinishes in about 0.8s and the remote is correctly refined to GitLab Self-Hosted. The probe only fails because it needs the network.refineUnknownGitLabRemoteonly needs to know whetherglabhas a logged-in account for the host. It doesn't need a live check.glabcan answer that offline from its config:The Forgejo spec already does this: it sets
remoteRefinementArgs: ["login", "list", ...], a local read, separate from its network auth check.Suggested fix
remoteRefinementArgs, for exampleglab config get user --host <host>orglab config get api_host --host <host>. Refine to GitLab when the output isn't empty. This needs the probe args to accept the remote's host. Alternatively, read glab'sconfig.ymlhosts:keys directly.--hostname <host>so one unreachable host can't block the check for others.Impact
Major degradation or frequent failure. Whenever the VPN is off, every project on that host sees git status stalls of over a minute, and the slow-request toast keeps reappearing.
Version or commit
0.0.46-nightly.20261005.2689 (desktop, bundled local server)
Environment
macOS 15.8.1, Apple Silicon. glab 1.121.0 with hosts
gitlab.comandgit.example.com(token in keyring). 9 projects with remotes onhttps://git.example.com/....Logs or stack traces
Workaround (until this is fixed): a
glabwrapper earlier on PATH turns a plainglab auth statusintoglab auth status --hostname gitlab.comwhennc -z -G 1 git.example.com 443fails. This makes the probe return in about 1s.