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
This commit is contained in:
Classic298
2026-11-12 21:53:27 +09:00
committed by GitHub
parent 64471947ab
commit 06ba65d50c
+2 -1
View File
@@ -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):