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
cmd update reports a network failure on a single transient registry miss #1048
cmd update (cmdc update on Windows) prints a network failure when one registry read misses, then the same command succeeds immediately. The check has no retry, and the catch hides the real error.
Transcript
Windows, Git Bash, command-code@1.84.0. No network change between the two runs.
$ cmdc update
✖ Failed to check for updates
Please check your internet connection or try again later.
$ cmdc update
✔ Up to date (1.84.0)
npm latest was 1.84.0 at the time, so the second run was a true up-to-date, not an install.
Check path (from dist/cli.mjs of 1.84.0)
buildCliUpdateCheckOutcome maps a null updateInfo to kind check-failed, spinner fail, message Failed to check for updates, detail Please check your internet connection or try again later. An up-to-date result is spinner succeed with Up to date (${currentVersion}).
updateInfo is null only when fetchVersions() returns null:
execAsync is util.promisify(child_process.exec). YP is `npm view ${zP} versions --json` with zP = "command-code".
So the check is one npm view command-code versions --json, 5000ms, through a shell. Any timeout, non-zero exit, or non-JSON stdout becomes null. normalizeVersionsResponse also returns null when any entry is not a valid semver, so a registry warning on stdout fails the same way as a dead network.
There is no retry.
Why this is not "no internet"
~/.commandcode/logs/command.log records Starting async update check and never records the failure. ~/.commandcode/updates.json stores lastCheckedAt and pending only. A failed check leaves no cause.
npm cache logs from the same evening show GET https://registry.npmjs.org/command-code returning 200 in 130-287ms.
No proxy, VPN, or custom registry is configured. ~/.npmrc only sets prefix and allow-scripts.
Ask
Retry a failed registry read (3 tries, short backoff) before printing the failure.
Print the underlying error (timeout, DNS, HTTP status, npm exit code), not only "check your internet".
Hi @vipulgupta2048 , I'd like to take this one if you haven't started on a
fix yet. Plan: retry transient registry failures (3 tries, short backoff),
return structured failure reasons from fetchVersions instead of null,
show the real cause in the check-failed message, and log it to
~/.commandcode/logs/command.log. Happy to adjust scope or hand it back if
you already have something in progress.
Activity
vipulgupta2048 commentedon Oct 21, 2026
Looking into this, thanks for reporting @pizofreude
Gurugokul05 commentedon Oct 22, 2026
Hi @vipulgupta2048 , I'd like to take this one if you haven't started on a
fix yet. Plan: retry transient registry failures (3 tries, short backoff),
return structured failure reasons from fetchVersions instead of null,
show the real cause in the check-failed message, and log it to
~/.commandcode/logs/command.log. Happy to adjust scope or hand it back if
you already have something in progress.