fix(subagent): inherit parent tool configuration

Preserve configured tool settings when building subagent registries while retaining the effective workspace restriction.

Co-authored-by: BillDwyer <BillDwyer@users.noreply.github.com>
This commit is contained in:
chengyongruandBillDwyer authored and chengyongru committed 2026-11-04 18:26:47 +08:00
1 parent 1c66b90088
commit 84d96d8a1e
2 files changed
+50 -5

No files matched your search

+2 -5
View File
@@ -507,11 +507,8 @@ class SubagentManager:
)
def _subagent_tools_config(self) -> ToolsConfig:
return ToolsConfig(
exec=self.tools_config.exec,
web=self.tools_config.web,
file=self.tools_config.file,
restrict_to_workspace=self.restrict_to_workspace,
return self.tools_config.model_copy(
update={"restrict_to_workspace": self.restrict_to_workspace},
)
def _build_tools(