## Summary
Deployments that used the legacy Tasks (managed agents) feature in the
past keep seeing the license banner "You have built more workspaces with
managed agents than your license allows." even after installing a
freshly generated license. This removes that warning at its source,
along with its dashboard-only link mapping and stories.
## Why the banner is obsolete
- The warning was appended in `enterprise/coderd/license/license.go`
whenever `managedAgentCount >= limit` for the `managed_agent_limit`
feature.
- The count comes from `GetTotalUsageDCManagedAgentsV1`, which sums
historical `dc_managed_agents_v1` usage events. The only emitter of
those events (the `has_ai_task` start-build path) was removed in #29085,
so nothing produces them anymore and the count can never decrease.
- Premium licenses without an explicit claim get a grandfathered
`managed_agent_limit` default with a usage period spanning decades, so a
deployment that ever exceeded that count keeps the warning forever,
regardless of license renewal.
## What changed
- `enterprise/coderd/license/license.go`: stop appending the warning.
The feature still measures and reports `Actual` for the licenses page.
- `codersdk/licenses.go` and `site/src/api/typesGenerated.ts`: delete
the `LicenseManagedAgentLimitExceededWarningText` constant. This is the
breaking part of the change for external `codersdk` consumers, hence the
`!` in the title.
- `site/src/modules/dashboard/LicenseBanner/`: remove the "View AI
Governance" link mapping and the two stories that rendered the obsolete
message.
- Tests: the two cases that asserted the warning now assert no warning
while `Actual` is still reported. The existing `AgentRuntimeHours/*`
cases keep covering the Coder Agent runtime hours warnings unchanged.
The Coder Agents `agent_runtime_hours` warnings (`hb_agent_runtime_v1`
usage) are unchanged. The `managed_agent_limit` feature, its usage
query, and the `dc_managed_agents_v1` event type are intentionally kept
so that existing licenses and historical reporting keep working.
## Validation
- `go test ./enterprise/coderd/license/`
- `pnpm exec tsc --noEmit` and `biome check` on the touched frontend
files
- Repository pre-commit hook
> Xum acted on behalf of Mike (@ibetitsmike) to prepare this pull
request.