From a78bb5e89940c9cc7a6d4d28f05c01e8ade3a507 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 7 Oct 2025 23:19:45 -0600 Subject: [PATCH 1/2] 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. --- pkg/cmd/agent-task/create/create.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cmd/agent-task/create/create.go b/pkg/cmd/agent-task/create/create.go index 9c9b8ed68..cf5f7fd11 100644 --- a/pkg/cmd/agent-task/create/create.go +++ b/pkg/cmd/agent-task/create/create.go @@ -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) } From 91c6bc609a8a324fe7c984d631791a574b7ffeb8 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 7 Oct 2025 23:37:43 -0600 Subject: [PATCH 2/2] Add new displaying message to test expectation Updated the Test_createRun test to expect a message indicating that session logs are being displayed for the job --- pkg/cmd/agent-task/create/create_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/cmd/agent-task/create/create_test.go b/pkg/cmd/agent-task/create/create_test.go index ef7f529ac..aa02150ba 100644 --- a/pkg/cmd/agent-task/create/create_test.go +++ b/pkg/cmd/agent-task/create/create_test.go @@ -488,6 +488,7 @@ func Test_createRun(t *testing.T) { } }, wantStdout: heredoc.Doc(` + Displaying session logs for job job123. Press Ctrl+C to stop. (rendered:) (rendered:) `),