-
Notifications
You must be signed in to change notification settings - Fork 924
fix(cli)!: enforce selection for multiple agents rather than use randomness #18427
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0a47fd1
to
647181e
Compare
1c6193a
to
f923edb
Compare
IMO if you have to ask yourself if this is a breaking change, it's best to err on the side of caution and label it as breaking (obligatory: https://xkcd.com/1172/). |
@mafredri my understanding of this change is as follows: Given: workspace foo, agent smith, no sub-agents
Given: workspace foo, agents smith, jones
Given: workspace foo, agents smith, sub-agents johnson
Given: workspace foo, agents smith, sub-agents johnson, thompson
Given: workspace foo, agents smith, johnes, sub-agents johnson, thompson
Am I correct? |
@johnstcn Close, just two correction (as sub agents are prioritized same as in the Web UI). Given: workspace foo, agents smith, sub-agents johnson
Given: workspace foo, agents smith, sub-agents johnson, thompson
|
On the surface I find this mildly surprising, but given that it's predicated on the presence of a sub-agent and that it corresponds with the UI's prioritization, that seems fine to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving pending any blocking concerns from @deansheather
In the past we randomly selected workspace agent if there were multiple. Unless both are running on the same machine with the same configuration, this would be very confusing behavior for a user. With the introduction of sub agents (devcontainer agents), it was decided prioritize them if present. Similarly as before, selecting a devcontainer randomly would be confusing. We now error out if the agent name is not specified and there are multiple agents. Fixes coder/internal#696
f923edb
to
8319ea6
Compare
In the past we randomly selected workspace agent if there were multiple.
Unless both are running on the same machine with the same configuration,
this would be very confusing behavior for a user.
With the introduction of sub agents (devcontainer agents), we have now
made this an error state and require the specifying of agent when there
is more than one (either normal agent or sub agent).
This aligns with the behavior of e.g. Coder Desktop.
Fixes coder/internal#696