fix: deliver tool result media when verbose is off (#16679)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 6e16feb164
Co-authored-by: christianklotz <69443+christianklotz@users.noreply.github.com>
Co-authored-by: christianklotz <69443+christianklotz@users.noreply.github.com>
Reviewed-by: @christianklotz
This commit is contained in:
Christian Klotz
2026-02-15 02:18:57 +00:00
committed by GitHub
parent 906c32da12
commit 68c78c4b43
6 changed files with 393 additions and 0 deletions

View File

@@ -128,6 +128,10 @@ export async function runAgentTurnWithFallback(params: {
return { skip: true };
}
if (!text) {
// Allow media-only payloads (e.g. tool result screenshots) through.
if ((payload.mediaUrls?.length ?? 0) > 0) {
return { text: undefined, skip: false };
}
return { skip: true };
}
const sanitized = sanitizeUserFacingText(text, {