diff --git a/apps/desktop/src/components/assistant-ui/tool/fallback-model/index.ts b/apps/desktop/src/components/assistant-ui/tool/fallback-model/index.ts index a718358efee3..5c6fd8c9b034 100644 --- a/apps/desktop/src/components/assistant-ui/tool/fallback-model/index.ts +++ b/apps/desktop/src/components/assistant-ui/tool/fallback-model/index.ts @@ -676,10 +676,12 @@ function toolErrorText(part: ToolPart, result: Record): string // stage's code, etc. — all routinely produce useful output and aren't // failures. Only treat it as an error when the command produced no real // output to show; otherwise render the output normally (not red). + // `output_preview` counts as output: background-process polls report their + // text under that name, so omitting it painted healthy `process` rows red. const exit = numberValue(result.exit_code) if (exit !== null && exit !== 0) { - const hasOutput = Boolean(firstStringField(result, ['output', 'stdout', 'stderr'])?.trim()) + const hasOutput = Boolean(firstStringField(result, ['output', 'stdout', 'stderr', 'output_preview'])?.trim()) return hasOutput ? '' : `Command failed with exit code ${exit}.` }