Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(cli): enhance error handling for multiple agents in SSH command#19943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kacpersaw merged 3 commits intomainfromkacpersaw/bug-ssh-multi-agent-unintuitive
Sep 25, 2025

Conversation

kacpersaw
Copy link
Contributor

Closes#19812

Problem

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.

This PR enhances the error handling to provide suggestions with SSH commands that users can copy and paste directly.

Before:

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

After:

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

@kacpersawkacpersaw marked this pull request as ready for reviewSeptember 25, 2025 08:31
Copy link
Member

@ethanndicksonethanndickson left a comment

Choose a reason for hiding this comment

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

I have one recommendation, but otherwise lgtm & I don't need to review again

ws,agent,_,err:=GetWorkspaceAndAgent(ctx,inv,client,!disableAutostart,hostname)

ws,agent,otherAgents,err:=GetWorkspaceAndAgent(ctx,inv,client,!disableAutostart,hostname)
iferr!=nil&&strings.Contains(err.Error(),"multiple agents found") {
Copy link
Member

@ethanndicksonethanndicksonSep 25, 2025
edited
Loading

Choose a reason for hiding this comment

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

Can we define the 'multiple agents found' error as a sentinel, and then useerrors.Is instead?

@kacpersawkacpersaw merged commitc8742ba intomainSep 25, 2025
33 checks passed
@kacpersawkacpersaw deleted the kacpersaw/bug-ssh-multi-agent-unintuitive branchSeptember 25, 2025 10:03
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 25, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@ethanndicksonethanndicksonethanndickson approved these changes

Assignees

@kacpersawkacpersaw

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

bug: ssh to a multi-agent workspace from CLI is unintuitive
2 participants
@kacpersaw@ethanndickson

[8]ページ先頭

©2009-2025 Movatter.jp