From 28c1121a8f053eac066aa84b510dc9e42b60e58a Mon Sep 17 00:00:00 2001 From: Zamil Majdy Date: Fri, 13 Feb 2026 14:44:42 +0400 Subject: [PATCH] fix(chat/sdk): block built-in Bash via disallowed_tools and resolve merge conflicts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add disallowed_tools=["Bash"] to SDK options so the model never tries the built-in Bash tool (previously it tried Bash, got blocked by the security hook, then fell back to bash_exec — wasting a turn) - Resolve merge conflicts in tools/models.py (keep both HEAD additions and incoming BlockDetails/BlockDetailsResponse) - Fix pyright error in find_block.py (pass categories to BlockInfoSummary) --- .../backend/backend/api/features/chat/sdk/service.py | 1 + .../backend/backend/api/features/chat/tools/find_block.py | 1 + 2 files changed, 2 insertions(+) diff --git a/autogpt_platform/backend/backend/api/features/chat/sdk/service.py b/autogpt_platform/backend/backend/api/features/chat/sdk/service.py index 491fe9d710..f380610c6c 100644 --- a/autogpt_platform/backend/backend/api/features/chat/sdk/service.py +++ b/autogpt_platform/backend/backend/api/features/chat/sdk/service.py @@ -537,6 +537,7 @@ async def stream_chat_completion_sdk( "system_prompt": system_prompt, "mcp_servers": {"copilot": mcp_server}, "allowed_tools": COPILOT_TOOL_NAMES, + "disallowed_tools": ["Bash"], "hooks": security_hooks, "cwd": sdk_cwd, "max_buffer_size": config.claude_agent_max_buffer_size, diff --git a/autogpt_platform/backend/backend/api/features/chat/tools/find_block.py b/autogpt_platform/backend/backend/api/features/chat/tools/find_block.py index 55b1c0d510..c51317cb62 100644 --- a/autogpt_platform/backend/backend/api/features/chat/tools/find_block.py +++ b/autogpt_platform/backend/backend/api/features/chat/tools/find_block.py @@ -146,6 +146,7 @@ class FindBlockTool(BaseTool): id=block_id, name=block.name, description=block.description or "", + categories=[c.value for c in block.categories], ) )