on main help sign in
fix(config): correct Task agent ID in SetupAgents (#2101)
commit47ca98d0e29b0da47a6084bb0eaef132e1608369 authorM1xA <AnyCPU@users.noreply.github.com> dateTue 10 Feb 2026, 21:51 (8 months ago) parent22ed1e5
2 files changed+30−1
internal/config/agent_id_test.go+29 internal/config/config.go+1−1
internal/config/agent_id_test.gonew file+29
@@ -0,0 +1,29 @@
1+package config
2+
3+import (
4+ "testing"
5+
6+ "github.com/stretchr/testify/assert"
7+ "github.com/stretchr/testify/require"
8+)
9+
10+func TestConfig_AgentIDs(t *testing.T) {
11+ cfg := &Config{
12+ Options: &Options{
13+ DisabledTools: []string{},
14+ },
15+ }
16+ cfg.SetupAgents()
17+
18+ t.Run("Coder agent should have correct ID", func(t *testing.T) {
19+ coderAgent, ok := cfg.Agents[AgentCoder]
20+ require.True(t, ok)
21+ assert.Equal(t, AgentCoder, coderAgent.ID, "Coder agent ID should be '%s'", AgentCoder)
22+ })
23+
24+ t.Run("Task agent should have correct ID", func(t *testing.T) {
25+ taskAgent, ok := cfg.Agents[AgentTask]
26+ require.True(t, ok)
27+ assert.Equal(t, AgentTask, taskAgent.ID, "Task agent ID should be '%s'", AgentTask)
28+ })
29+}
internal/config/config.go+1−1
@@ -755,7 +755,7 @@ func (c *Config) SetupAgents() {
755755 },
756756
757757 AgentTask: {
758− ID: AgentCoder,
758+ ID: AgentTask,
759759 Name: "Task",
760760 Description: "An agent that helps with searching for context and finding implementation details.",
761761 Model: SelectedModelTypeLarge,