Conversation
Workspace actions could appear idle while blocking operations were still running. In particular, the Coder CLI start command can wait for external authentication, while its detached coroutine returned immediately and separated the command from the action's progress and error handling. Workspace actions now publish indeterminate progress for as long as their CLI or REST work is running. The blocking start command remains within the existing action lifecycle while executing on the IO dispatcher, which keeps progress and error handling active and allows the previous description and workspace state to be restored when appropriate; tests cover both execution paths.
Workspace starts can spend time waiting for provisioning or external authentication, while Toolbox previously displayed only a static message. Stream Coder CLI output into the environment progress so users can see what the start command is doing without changing the complete output retained for logs and failures.
Workspace update, update-and-restart, and stop requests can return before their builds finish, leaving Toolbox without useful progress while it waits for another workspace refresh. Keep the environment description aligned with pending, starting, and stopping build states reported by the poller. This preserves progress across environment replacement and restores the normal description when the build finishes.
Workspace actions can continue provisioning after their initial request returns, leaving Toolbox with only a generic build status while it waits for the workspace to become ready. Use each poll update to display the latest provisioner output for active builds. Progress lookup failures keep the SSH session correlation when one exists and remain ordinary logs when no session is available.
fioan89
marked this pull request as ready for review
September 15, 2026 19:36
Collaborator
Author
demo-progress-tracking-1.mp4demo-progress-tracking-2.mp4 |
Collaborator
Author
|
If you don't mind I'll leave this open for a bit, in the hope that @code-asher or @jeremyruppel will also take a look over the implementation and how we stream build data. |
code-asher
approved these changes
Sep 17, 2026
| .exitValues(0) | ||
|
|
||
| showTextProgress?.let { reportProgress -> | ||
| processExecutor.redirectOutput(reportProgress::invoke) |
Member
There was a problem hiding this comment.
Probably not something we have to actually worry about, but do you know if this buffers by newline or anything like that? Thinking it could be weird (although unlikely) if half a sentence appears, then is replaced by the next half, just depending on how the output happens to be buffered.
| fun update(newWorkspace: Workspace, newAgent: WorkspaceAgent?) { | ||
| suspend fun update(newWorkspace: Workspace, newAgent: WorkspaceAgent?) { | ||
| applyWorkspaceSnapshot(newWorkspace, newAgent) | ||
| updateBuildProgress(newWorkspace) |
Member
There was a problem hiding this comment.
I wonder if we should add follow=true to the build log request? That turns it into a web socket and lets us watch the logs.
Otherwise we may be sitting there without more logs unless/until update runs again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Workspace actions could appear idle while blocking operations were still running. In particular, the Coder CLI start command can wait for external authentication, while its detached coroutine returned immediately and separated the command from the action's progress and error handling. This was especially confusing when a workspace start paused for external authentication or when an update, restart, or stop continued after the initial request had completed.
Toolbox now keeps the environment description in sync with the active workspace action. Workspace starts display live output from the Coder CLI, while other ongoing builds use the status and latest provisioner output retrieved during workspace polling. Once the build finishes, the normal environment description is restored.
Failures while retrieving progress are recorded without interrupting workspace monitoring. They retain the SSH session correlation when a session is available and remain ordinary logs when the workspace has no active session.