fix(oauth): resolve Kiro login flow before blocking on manual paste#232
Merged
Merged
Conversation
loginKiro() called ctrl.onManualCodeInput() without first calling ctrl.onAuth(), so startLoginFlow() never resolved and the HTTP response never reached the GUI. The dashboard showed a Cancel button but no instructions or paste field, leaving the user stuck. Call ctrl.onAuth() with instructions immediately before blocking on manual code input, so the server responds and the GUI renders the paste-input field.
Wibias
force-pushed
the
codex/fix-kiro-login-hang
branch
from
July 21, 2026 22:58
d907092 to
cec8c1a
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Clicking "Login" on Kiro in the Accounts tab does nothing visible. The button changes to "Cancel" but no instructions, paste field, or browser window appears. The user is stuck with no way to complete the login.
Root cause
loginKiro()insrc/oauth/kiro.tsis an import-first flow: it tries kiro-cli SQLite, thenKIRO_ACCESS_TOKENenv, then falls back toctrl.onManualCodeInput()which blocks waiting for a pasted token. But it never callsctrl.onAuth()before blocking, sostartLoginFlow()never resolves, the HTTP response is never sent, and the GUI'sfetchhangs indefinitely.The GUI sets
busystate before the fetch (showing the Cancel button), but since the response never arrives,loginInfois never populated and the paste-input field never renders.Fix
Call
ctrl.onAuth()with instructions immediately before blocking onctrl.onManualCodeInput(). This resolves the login flow, sends the HTTP response with instructions, and the GUI renders the paste-input field so the user can enter their Kiro access token.Verification
bun x tsc --noEmitpassessrc/oauth/kiro.ts