Skip to content

Commit 687a0eb

Browse files
committed
fix: skip OAuth transfer prompt when remote is already authenticated
1 parent baa8bf2 commit 687a0eb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pkg/cmd/open/open.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,8 +1101,7 @@ func openCodex(t *terminal.Terminal, sshAlias string, path string, codexArgs []s
11011101

11021102
// Auto-authenticate: try API key first, then OAuth token transfer
11031103
apiKey := resolveCodexAPIKey(t, sshAlias)
1104-
if apiKey == "" {
1105-
// No API key found; try transferring OAuth session from local auth.json
1104+
if apiKey == "" && !isRemoteCodexAuthenticated(sshAlias) {
11061105
tryTransferCodexOAuthSession(t, sshAlias)
11071106
}
11081107

0 commit comments

Comments
 (0)