Files
coder/cli
Jake Howell 76ba2265c4 fix(cli): warn when support bundle agent is missing (#32579)
> 🤖 This PR was modified by Coder Agents on behalf of Jake Howell.

When a workspace agent cannot be found, `coder support bundle` records a
warning in its bundled CLI logs but does not show it in the terminal
unless verbose logging is enabled. The command succeeds with a partial
bundle, leaving the user unaware that agent diagnostics were skipped.

Print a warning to stderr using the latest build already fetched: show
the workspace name and build status when it has no agents, even without
an explicit agent name; otherwise identify the unknown agent and list
available agents. Continue generating the partial bundle with the
existing exit status and available diagnostics.

<details>
<summary>Validation evidence</summary>

- Updated regression cases fail on the previous implementation for the
expected warning mismatch: no agents in running or stopped workspaces,
stopped workspace with an explicit agent name, and an unknown agent with
available agents.
- All support bundle tests pass: `go test -tags=testsmallbatch ./cli
-run "^TestSupportBundle" -count=1 -timeout=5m`.
- CLI lint, new-code lint, parallel-test context checks, transaction
checks, formatting, diff checks, test audit, and documentation
self-check pass. No documentation changes are needed.

</details>
2026-11-24 17:55:56 +11:00
..
…
…
…