You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Track task initialization phases as workspace app statuses #20749
PR #20692 introduced initialization messages for tasks by deriving status from the task status, workspace build status, and agent lifecycle. These messages are computed ad hoc in the API response.
A better approach would be to insert these as actual workspace_app_status records in the database. This would:
Provide a historical timeline of initialization phases
Make status changes queryable
Enable better debugging of initialization issues
Proposed approach
We can consider 2 stages of initialization for the 3 different components (workspaces, agents and apps):
Provisioning stage: when the workspace is still pending or starting (the agent is created on the workspace starting phase).
Agent/App initializing: when the agent and then the app are initializing
This means that the workspace pending phase would not be possible as an app status, but all other cases could be an app status, referring to a possible new TaskState (initializing).
For the second phase where agent/app exists (workspace starting onwards), we could insert app status records:
Option A: Agent explicitly reports status via PatchAppStatus on lifecycle transitions
Option B: Coderd automatically inserts app status on agent lifecycle changes
Activity
bpmct commentedon Sep 13, 2026
Closing as tasks is now deprecated in favor of Coder Agents.
This comment was generated by a Coder-managed AI agent on my behalf.