From 06ba65d50c768e70cd007b92f45baaa5058ee0e0 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Thu, 12 Nov 2026 13:53:27 +0100 Subject: [PATCH] fix: a coding agent's error shows a technical dump with the whole system prompt (#34173) When the terminal refused to start a coding agent, for example because the system prompt was longer than Open Terminal accepts, the error under the reply was a technical dump of that refusal with the whole system prompt in it. Such a refusal now shows "Agent environment request failed". Refusals the terminal explains in plain words, such as another reply still running in the chat, keep showing that reason. Fixes #34172 --- backend/open_webui/utils/agents/transport.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/utils/agents/transport.py b/backend/open_webui/utils/agents/transport.py index 5a189f7fca..3dcfb50a58 100644 --- a/backend/open_webui/utils/agents/transport.py +++ b/backend/open_webui/utils/agents/transport.py @@ -51,7 +51,8 @@ class TerminalTransport: ) as response: data = await response.json() if response.status >= 400: - raise ValueError(data.get('detail', 'Agent environment request failed')) + detail = data.get('detail') + raise ValueError(detail if isinstance(detail, str) else 'Agent environment request failed') return data async def start(self, provider, options):