Skip to content

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

Merged
nisolanki1209 merged 1 commit into
mainfrom
BREV-8976/brev-open-triggers-two-concurrent-login-prompts
Jun 11, 2026
Merged

fix: brev-open-command-triggers-two-concurrent-interactive-login-prompts#387
nisolanki1209 merged 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?

@vivansh12

Copy link
Copy Markdown
Contributor

are there any other commands that have this issue?

@patelspratik ,
There are three additional commands brev shell , brev copy , and brev port-forward that follow the same code path and can trigger the same concurrent login flow issue. We have created a separate ticket to address fixes for those commands.

@hakhandelwal11 hakhandelwal11 self-assigned this Jun 2, 2026
@nisolanki1209 nisolanki1209 merged commit 1682510 into main Jun 11, 2026
9 checks passed
@nisolanki1209 nisolanki1209 deleted the BREV-8976/brev-open-triggers-two-concurrent-login-prompts branch June 11, 2026 17:21
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.

5 participants