feat: add messages.suppressToolErrors config option (#16620)

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

Prepared head SHA: 9ae4394b81
Co-authored-by: vai-oro <258511217+vai-oro@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
This commit is contained in:
Vai
2026-02-14 22:28:58 -05:00
committed by GitHub
parent 8189949549
commit 2c8b921054
7 changed files with 46 additions and 1 deletions

View File

@@ -233,7 +233,9 @@ export function buildEmbeddedRunPayloads(params: {
const isMutatingToolError =
params.lastToolError.mutatingAction ??
isLikelyMutatingToolName(params.lastToolError.toolName);
const shouldShowToolError = isMutatingToolError || (!hasUserFacingReply && !isRecoverableError);
const shouldShowToolError =
isMutatingToolError ||
(!hasUserFacingReply && !isRecoverableError && !params.config?.messages?.suppressToolErrors);
// Always surface mutating tool failures so we do not silently confirm actions that did not happen.
// Otherwise, keep the previous behavior and only surface non-recoverable failures when no reply exists.