Problem
The coder port-forward CLI command throws an error when multiple agents are present in a workspace, rather than defaulting to the most common primary agents (main/dev).
Encountered an error running "coder port-forward", see "coder port-forward --help" for more information
error: multiple agents found, please specify the agent name, available agents: [custom-agent main]
Proposed Resolution
Primary: Update the usage examples in cli/portforward.go to clarify agent specification and reduce confusion.
Update usage from:
coder port-forward [flags] <workspace>
to:
coder port-forward [flags] <workspace>[.agent]
Alternative: Print a helpful message and assume main/dev as the intended endpoint when multiple agents exist.