From b4e27dc52b5e91aaadbb434b88367c40cbd71680 Mon Sep 17 00:00:00 2001 From: "Otto (AGPT)" Date: Wed, 18 Feb 2026 16:28:30 +0000 Subject: [PATCH] Update credential error message to guide LLM behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a block requires credentials the user hasn't connected, the tool response now tells the LLM that a sign-in button is visible in the chat UI, and instructs it to stop and wait rather than suggesting workarounds or directing users to settings. This message is never shown to the end user — the frontend suppresses the raw tool response and shows the ChatCredentialsSetup widget instead. Resolves SECRT-2011 --- .../backend/backend/copilot/tools/run_block.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/autogpt_platform/backend/backend/copilot/tools/run_block.py b/autogpt_platform/backend/backend/copilot/tools/run_block.py index 32f249626b..bdaa7548f6 100644 --- a/autogpt_platform/backend/backend/copilot/tools/run_block.py +++ b/autogpt_platform/backend/backend/copilot/tools/run_block.py @@ -202,8 +202,11 @@ class RunBlockTool(BaseTool): return SetupRequirementsResponse( message=( - f"Block '{block.name}' requires credentials that are not configured. " - "Please set up the required credentials before running this block." + f"Block '{block.name}' requires credentials that the user has not yet connected. " + "A sign-in button has appeared in the chat for the user to connect their account. " + "STOP HERE and tell the user to click the sign-in button shown above in the chat. " + "Do NOT send further messages, suggest workarounds, or direct them to settings. " + "Wait for the user to complete sign-in before continuing." ), session_id=session_id, setup_info=SetupInfo(