This repository was archived by the owner on Feb 15, 2026. It is now read-only.
fix: prevent login from hanging in CLI environments#3
Merged
NicolasRitouet merged 1 commit intokeywaysh:mainfrom Jan 5, 2026
Merged
Conversation
- Run browser.OpenURL() in a goroutine to avoid blocking - Add helpful message for manual URL copying when browser doesn't open - Fixes issue where login hangs in VS Code terminal, SSH sessions, and headless environments The browser.OpenURL() function can block indefinitely in certain CLI environments, preventing the OAuth polling loop from starting. This change makes the browser opening non-blocking so the CLI can immediately start polling for completion.
NicolasRitouet
approved these changes
Jan 5, 2026
Member
|
@Alan-221b thanks a lot for your contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1
Summary
browser.OpenURL()in a goroutine to avoid blockingProblem
When running
keyway loginin certain CLI environments (VS Code integrated terminal, SSH sessions, headless servers), the login flow hangs after displaying the verification URL. The CLI never starts polling for OAuth completion.Root Cause
The
browser.OpenURL()call blocks in these environments, waiting for the browser process to complete, which prevents the polling loop from starting.Before
After
Test Plan
keyway loginin VS Code integrated terminalkeyway loginin standard terminal (macOS/Linux)keyway loginvia SSH session