Skip to content

Commit dc09ad8

Browse files
masnwilliamsclaude
andcommitted
revert: use hosted_url for login, keep live_view_url for polling logs
Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent b91388c commit dc09ad8

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

cmd/agent_auth.go

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -120,28 +120,20 @@ func (a AgentAuthCmd) Invoke(ctx context.Context, in InvokeInput) error {
120120
pterm.Println(fmt.Sprintf(" Expires: %s", invocation.ExpiresAt.Format(time.RFC3339)))
121121
pterm.Println()
122122

123-
// Get the live view URL from the first poll
124-
state, err := a.invocations.Get(ctx, invocation.InvocationID)
125-
if err != nil {
126-
return util.CleanedUpSdkError{Err: err}
127-
}
128-
129-
if state.LiveViewURL != "" {
130-
pterm.Info.Println("Open this URL in your browser to log in:")
131-
pterm.Println()
132-
pterm.Println(fmt.Sprintf(" %s", state.LiveViewURL))
133-
pterm.Println()
123+
pterm.Info.Println("Open this URL in your browser to log in:")
124+
pterm.Println()
125+
pterm.Println(fmt.Sprintf(" %s", invocation.HostedURL))
126+
pterm.Println()
134127

135-
if !in.NoBrowser {
136-
if err := browser.OpenURL(state.LiveViewURL); err != nil {
137-
pterm.Warning.Printf("Could not open browser automatically: %v\n", err)
138-
} else {
139-
pterm.Info.Println("(Opened in browser)")
140-
}
128+
if !in.NoBrowser {
129+
if err := browser.OpenURL(invocation.HostedURL); err != nil {
130+
pterm.Warning.Printf("Could not open browser automatically: %v\n", err)
131+
} else {
132+
pterm.Info.Println("(Opened in browser)")
141133
}
142-
pterm.Println()
143134
}
144135

136+
pterm.Println()
145137
pterm.Info.Println("Polling for completion...")
146138

147139
startTime := time.Now()

0 commit comments

Comments
 (0)