fix(subagents): scope allowlist agent id for multi_subagent
This commit is contained in:
parent
cced8789f9
commit
ec891b4edf
1 changed files with 1 additions and 1 deletions
|
|
@ -306,10 +306,10 @@ func registerSharedTools(
|
|||
// spawn_status which are added below — preventing recursive
|
||||
// subagent spawning.
|
||||
subagentManager.SetTools(agent.Tools.Clone())
|
||||
currentAgentID := agentID
|
||||
if spawnEnabled {
|
||||
spawnTool := tools.NewSpawnTool(subagentManager)
|
||||
spawnTool.SetSpawner(NewSubTurnSpawner(al))
|
||||
currentAgentID := agentID
|
||||
spawnTool.SetAllowlistChecker(func(targetAgentID string) bool {
|
||||
return registry.CanSpawnSubagent(currentAgentID, targetAgentID)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue