Skip to content

bug: ssh to a multi-agent workspace from CLI is unintuitive #19812

Closed

Description

@matifali

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When I try to SSH into my workspace with multiple agents. It does not provide an intuitive way to do that successfully and instead misguides by printing wrong instructions.

Relevant Log Output

$ coder ls
WORKSPACE           TEMPLATE  STATUS   HEALTHY  LAST BUILT  CURRENT VERSION  OUTDATED  STARTS AT                      STOPS AFTER
★ matifali/dogfood  coder     Started  true     2h52m       3ac36b8          false     9:30AM Mon-Fri (Asia/Karachi)  12h

$ coder config-ssh
> The following changes will be made to your SSH configuration:

    * Update the coder section in /Users/matifali/.ssh/config

  Continue? (yes/no) yes

Updated "/Users/matifali/.ssh/config"
You should now be able to ssh into your workspace.
For example, try running:

        $ ssh dogfood.coder

$ ssh dogfood.coder
Encountered an error running "coder ssh", see "coder ssh --help" for more information
error: multiple agents found, please specify the agent name, available agents: [coder dev]

Expected Behavior

CLI should provide a clear example of how to SSH into a workspace.
I would expect instructions like

error: multiple agents found, please specify the agent name, available agents: [coder dev]
Try running:

        $ ssh dev.dogfood.me.coder
        $ ssh coder.dogfood.me.coder

Steps to Reproduce

  1. Run coder config-ssh
  2. Follow instructions and run ssh <workspace>
  3. Follow instructions and try to guess the correct format to connect to a workspace with multiple agents.

Environment

Additional Context

I have tested this on the latest version, The issue happens on multiple deployments, The issue occurs consistently

Activity

  1. added theissue type on Sep 15, 2025
  2. added
    cli
    s2
    on Sep 15, 2025
  3. self-assigned this
    on Sep 22, 2025
  4. added a commit that references this issue on Sep 25, 2025
    c8742ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

clis2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions