Skip to content

fix: brev-open-command-triggers-two-concurrent-interactive-login-prompts#387

Open
hakhandelwal11 wants to merge 1 commit into
mainfrom
BREV-8976/brev-open-triggers-two-concurrent-login-prompts
Open

fix: brev-open-command-triggers-two-concurrent-interactive-login-prompts#387
hakhandelwal11 wants to merge 1 commit into
mainfrom
BREV-8976/brev-open-triggers-two-concurrent-login-prompts

Conversation

@hakhandelwal11
Copy link
Copy Markdown
Contributor

Problem

brev open triggered two concurrent interactive login prompts when the user's access token was missing or expired. Both RunRefreshAsync and ResolveWorkspaceOrNode were kicking off independent auth flows in parallel, causing stdin to be misread which results in “declined to login” error.

Fix

Force a single, synchronous access-token acquisition at the very top of runOpenCommand before any concurrent work starts. If the user is logged out, this triggers the interactive login once; downstream calls reuse the cached token.

@hakhandelwal11 hakhandelwal11 requested a review from a team as a code owner May 12, 2026 12:10
@patelspratik
Copy link
Copy Markdown
Contributor

are there any other commands that have this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants