Skip to content

feat!: remove workspace app statuses - #30897

Open
matifali wants to merge 5 commits into
mainfrom
remove-workspace-app-statuses-atif
Open

matifali wants to merge 5 commits into
mainfrom
remove-workspace-app-statuses-atif

Conversation

@matifali

@matifali matifali commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Workspace app statuses only existed to drive the Coder Tasks UI. Tasks are gone, so this removes app statuses end to end. Follows #30742.

Breaking changes

  • Removed PATCH /api/v2/workspaceagents/me/app-status and agentsdk.PatchAppStatus / ProtoFromPatchAppStatus.
  • Removed codersdk.WorkspaceAppStatus, WorkspaceAppStatusState, WorkspaceApp.Statuses (statuses) and Workspace.LatestAppStatus (latest_app_status), and the latest_build.resources.agents.apps.statuses include_related path.
  • The Agent API UpdateAppStatus RPC is deprecated and now a no-op. coderd accepts and discards the request, so older agents keep working.
  • The agent socket UpdateAppStatus RPC is removed. Older in-workspace CLIs that call it get an unknown rpc error.
  • Reporting a working status no longer extends the workspace deadline.
  • Migration 000628 drops workspace_app_statuses and the workspace_app_status_state enum. Existing rows are deleted.

Release notes: Removed workspace app statuses, which only the removed Coder Tasks feature used. This drops the deprecated PATCH /api/v2/workspaceagents/me/app-status endpoint, the statuses and latest_app_status response fields, and stored status history. Older agents that still report statuses keep working and their reports are ignored. Older in-workspace CLIs that report through the agent socket now get an error.

Notes

  • The Agent API RPC stays as a deprecated no-op because no Agent API RPC has been removed before and DRPCAgentClient28 includes it. It can go in the next major Agent API version. The Agent API goes to v2.16 to record the deprecation. The wire protocol is unchanged.
  • The agent socket RPC is removed outright. Its only caller was removed in chore!: remove the coder_report_task MCP tool #30742. The socket API goes to v1.3 to record the removal.
  • Existing migrations are untouched.

@github-actions github-actions Bot added the release/breaking This label is applied to PRs to detect breaking changes as part of the release process label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

@nickvigilante nickvigilante left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedback from my robot incoming

@nickvigilante nickvigilante left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs look sufficient for this change.
The workspace-scheduling.md edit matches the activity-bump removal, the admin schedule page already lists only session-based activity, and the API reference is regenerated with no remaining references to app statuses, latest_app_status, or the app-status endpoint.

One optional suggestion, not blocking: docs/ai-coder/agents/tasks-to-chats-migration.md (open) covers the Tasks API but not the workspace-level surfaces this PR removes.
That file isn't in this diff, so here's the text instead of a suggestion block.
It would go at the end of 5. Update status handling, before 6. Replace delete with archive:

Coder also removed workspace app statuses, which agents running inside Coder Tasks workspaces used to report progress.
If your integration reports or reads these statuses, update it as follows:

- Stop calling `PATCH /api/v2/workspaceagents/me/app-status`.
  Requests to it fail.
- Stop reading `latest_app_status` from workspace responses and `statuses` from workspace app objects.
  These fields are no longer returned.
- Read the chat `status` instead, from `GET /api/v2/chats/{chat}` or from `status` events on `GET /api/v2/chats/{chat}/stream`.

A `working` status report no longer extends the workspace deadline.
For what does keep a workspace active, see [activity detection](../../user-guides/workspace-scheduling.md#activity-detection).

If agent modules reported statuses outside of Tasks too, the first sentence should be broader.
The release notes in the PR body already cover the removal, so skipping this is fine.


Generated by Coder Agents on behalf of @nickvigilante.

@matifali matifali added the experimental Changes that might not necessarily be merged, until its approved to proceed with. label Oct 16, 2026

@aslilac aslilac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love a second look from @spikecurtis or someone with more knowledge/thoughts about the protobuf stuff (especially wrt versioning) but overall I love removing code :)

Comment thread agent/agentsocket/proto/version.go Outdated
Comment thread agent/agent.go
Comment on lines -1023 to -1028
// The socket server accepts requests from processes running inside the workspace and forwards
// some of the requests to Coderd over the DRPC connection.
if a.socketServer != nil {
a.socketServer.SetAgentAPI(aAPI)
defer a.socketServer.ClearAgentAPI()
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what? this seems entirely unrelated. why is this being removed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related: SetAgentAPI / ClearAgentAPI only existed to hand the agent API client to the socket server so it could forward UpdateAppStatus to coderd. On main the only reader of agentAPI is DRPCAgentSocketService.UpdateAppStatus. With that RPC removed, nothing reads it, so I dropped the setter and the call here instead of leaving dead plumbing.

Comment thread tailnet/proto/version.go Outdated
@matifali
matifali force-pushed the remove-workspace-app-statuses-atif branch from 9479d26 to 35dbeea Compare October 17, 2026 02:36
@matifali

Copy link
Copy Markdown
Member Author

@spikecurtis quick versioning question. Agent API v2.13 through v2.15 are all unreleased (v2.38.0 ships v2.12). This PR adds v2.16 to record the UpdateAppStatus deprecation. Should unreleased minors get squashed before a release, or does each PR keep its own bump because builds from main may already negotiate them? I'll leave v2.16 as is unless you'd rather I fold it into v2.15.

Coder Tasks have been removed, and workspace app statuses only existed
to drive the Tasks UI. Remove the feature end to end:

- Drop the workspace_app_statuses table and workspace_app_status_state
  enum, and their queries, dbauthz, dbmetrics, and dbmock code.
- Remove the deprecated PATCH /api/v2/workspaceagents/me/app-status
  endpoint and agentsdk.PatchAppStatus / ProtoFromPatchAppStatus.
- Remove codersdk.WorkspaceAppStatus and WorkspaceAppStatusState, the
  WorkspaceApp.statuses and Workspace.latest_app_status fields, and the
  latest_build.resources.agents.apps.statuses include_related path.
- Turn the UpdateAppStatus RPC on the Agent API and the agent socket
  into deprecated no-ops so older agents and CLIs keep working, and
  drop the agent socket plumbing that forwarded it to coderd.
- Remove the app status UI from the workspace and workspaces pages.

BREAKING CHANGE: removes the PATCH /api/v2/workspaceagents/me/app-status
endpoint, the workspace app status SDK types and response fields, and
the workspace_app_statuses table. UpdateAppStatus requests are accepted
and discarded.
Only the in-workspace CLI called the agent socket UpdateAppStatus RPC,
and that caller is gone, so remove the RPC and its messages from the
agent socket outright. The Agent API UpdateAppStatus RPC stays as a
deprecated no-op because Agent API RPCs are only removed in a major
version.
Reporting a working app status no longer extends the workspace
deadline, so drop it from the list of activity that keeps a workspace
running. Also remove the activity bump reason only that path used.
@matifali
matifali force-pushed the remove-workspace-app-statuses-atif branch from f0051ae to cdb7244 Compare October 17, 2026 12:58

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

experimental Changes that might not necessarily be merged, until its approved to proceed with. release/breaking This label is applied to PRs to detect breaking changes as part of the release process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants