Fix --follow not killing the progress indicator

Fixes --follow not stopping the progress indicator. Also includes a nice message to indicate what is happening because even after we create the agent task, there's a period of time where we poll and receive nothing as the task session starts. We want there to be some sort of feedback in that period of time to not make the user panic and think it has hanged.
This commit is contained in:
Kynan Ware 2025-10-07 23:19:45 -06:00
parent 67bf27bf0c
commit a78bb5e899

View file

@ -166,6 +166,8 @@ func createRun(opts *CreateOptions) error {
}
if opts.Follow {
opts.IO.StopProgressIndicator()
fmt.Fprintf(opts.IO.Out, "Displaying session logs for job %s. Press Ctrl+C to stop.\n", job.ID)
return followLogs(opts, client, job.SessionID)
}