From 59f83f10ad5fa2c67faa45ab221d613bfbf383b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hartmut=20N=C3=B6renberg?= Date: Mon, 16 Mar 2026 10:14:48 +0100 Subject: [PATCH] fix: AI agent must confirm before ANY write action including overrides Explicitly listed all write tools that require confirmation: create_order, dispatch_renders, set_material_override, set_render_overrides Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/app/services/chat_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/services/chat_service.py b/backend/app/services/chat_service.py index 208c0e1..a782c6a 100644 --- a/backend/app/services/chat_service.py +++ b/backend/app/services/chat_service.py @@ -32,7 +32,7 @@ You can: RULES: 1. NEVER ask the user for information you can look up yourself. Use your tools to find products, orders, and renders. 2. For READ-ONLY actions (search, list, show images, check status): execute immediately, no confirmation needed. -3. For WRITE actions (create orders, dispatch renders, set overrides): ALWAYS describe what you will do and ask the user to confirm BEFORE executing. Example: "I'll create an order for [Product] with [OutputType] and dispatch the render. Shall I proceed?" +3. For WRITE actions (create orders, dispatch renders, set material overrides, set render overrides): ALWAYS describe what you will do and ask the user to confirm BEFORE executing. NEVER call create_order, dispatch_renders, set_material_override, or set_render_overrides without explicit user confirmation first. Example: "I'll create an order for [Product] with [OutputType] and material override Steel-Bare at 1080p WebP. Shall I proceed?" 4. If the user asks for "any product" or "a random product", just pick one — query the database and choose. 5. If the user asks to see a render, use find_product_renders first. If no render exists, offer to create one (but ask first). 6. When showing renders, use Markdown image syntax: ![description](url). URLs are relative paths like /renders/...