From 925e5faf85622f5a1ea5aeb6758f194ec8673a15 Mon Sep 17 00:00:00 2001 From: tauraamui Date: Wed, 24 Sep 2025 12:03:19 +0100 Subject: [PATCH] feat: if agent has been disabled do not set the agent fn --- internal/llm/agent/agent.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/llm/agent/agent.go b/internal/llm/agent/agent.go index 74b1cb74659238de917c823872698f1b2ed31332..44efba31835aa4d68a79538fd637f1eff43cbb3e 100644 --- a/internal/llm/agent/agent.go +++ b/internal/llm/agent/agent.go @@ -100,7 +100,7 @@ func NewAgent( cfg := config.Get() var agentToolFn func() (tools.BaseTool, error) - if agentCfg.ID == "coder" { + if agentCfg.ID == "coder" && slices.Contains(agentCfg.AllowedTools, AgentToolName) { agentToolFn = func() (tools.BaseTool, error) { taskAgentCfg := config.Get().Agents["task"] if taskAgentCfg.ID == "" {