From 15499722d2cafd764009f7ea8dcbb353c41e3856 Mon Sep 17 00:00:00 2001 From: anvyle Date: Fri, 24 Apr 2026 06:45:37 +0200 Subject: [PATCH] fix(copilot): stronger prompt to end turn after decompose_goal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The LLM sometimes called decompose_goal mid-turn and continued to find_block or create_agent without waiting for user approval. The existing "STOP" instruction wasn't forceful enough. Rewrite to explicitly state decompose_goal MUST be the last tool call in the turn — no other tools, no text after the result, end the turn immediately so the user can review and respond. Co-Authored-By: Claude Sonnet 4.6 --- .../backend/copilot/sdk/agent_generation_guide.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md b/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md index bec82f0c29..468ac93893 100644 --- a/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md +++ b/autogpt_platform/backend/backend/copilot/sdk/agent_generation_guide.md @@ -33,8 +33,14 @@ Before running the workflow below, ALWAYS decompose the goal first: 1. Analyze the user's request and break it into logical build steps (e.g. "add input block", "add AI summarizer", "wire blocks together"). 2. Call `decompose_goal` with those steps. -3. **STOP — do not proceed until the user approves the plan.** -4. Only after approval, continue with "Workflow for Creating/Editing Agents". +3. **STOP your turn immediately after `decompose_goal` returns.** Do not + call any other tools. Do not generate any text after the tool result. + End the turn so the user can review the plan and respond. +4. Only after the user responds, continue with "Workflow for Creating/ + Editing Agents". + +`decompose_goal` MUST be the last tool call in the turn. Never combine +it with `find_block`, `create_agent`, or any other tool in the same turn. For simple goals (1-2 blocks), keep steps brief (2-3 steps). For complex goals, use as many steps as needed.