diff --git a/pkg/agent/loop.go b/pkg/agent/loop.go index 6d0a61375..142181dda 100644 --- a/pkg/agent/loop.go +++ b/pkg/agent/loop.go @@ -119,6 +119,8 @@ func registerSharedTools(cfg *config.Config, msgBus *bus.MessageBus, registry *A // Spawn tool with allowlist checker subagentManager := tools.NewSubagentManager(provider, agent.Model, agent.Workspace, msgBus) + // Share the agent's tools with subagent so it can execute file operations, etc. + subagentManager.SetTools(agent.Tools) spawnTool := tools.NewSpawnTool(subagentManager) currentAgentID := agentID spawnTool.SetAllowlistChecker(func(targetAgentID string) bool {