From c3c1424db35e1158377c8d2beb7168d3dd104573 Mon Sep 17 00:00:00 2001 From: "zhangxiaoyu.york" Date: Tue, 31 Mar 2026 00:09:01 +0800 Subject: [PATCH] fix:register exec when enable exec_config --- nanobot/agent/subagent.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nanobot/agent/subagent.py b/nanobot/agent/subagent.py index c1aaa2d0d..9d936f034 100644 --- a/nanobot/agent/subagent.py +++ b/nanobot/agent/subagent.py @@ -115,12 +115,13 @@ class SubagentManager: tools.register(WriteFileTool(workspace=self.workspace, allowed_dir=allowed_dir)) tools.register(EditFileTool(workspace=self.workspace, allowed_dir=allowed_dir)) tools.register(ListDirTool(workspace=self.workspace, allowed_dir=allowed_dir)) - tools.register(ExecTool( - working_dir=str(self.workspace), - timeout=self.exec_config.timeout, - restrict_to_workspace=self.restrict_to_workspace, - path_append=self.exec_config.path_append, - )) + if self.exec_config.enable: + tools.register(ExecTool( + working_dir=str(self.workspace), + timeout=self.exec_config.timeout, + restrict_to_workspace=self.restrict_to_workspace, + path_append=self.exec_config.path_append, + )) tools.register(WebSearchTool(config=self.web_search_config, proxy=self.web_proxy)) tools.register(WebFetchTool(proxy=self.web_proxy))