feat: add messages.suppressToolErrors config option

This commit is contained in:
Vai
2026-02-14 18:02:09 -05:00
committed by Sebastian
parent 8189949549
commit fdb4d235fc
5 changed files with 7 additions and 1 deletions

View File

@@ -233,7 +233,7 @@ 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.

View File

@@ -325,6 +325,8 @@ export const FIELD_HELP: Record<string, string> = {
"Max reply-back turns between requester and target (05).",
"channels.telegram.customCommands":
"Additional Telegram bot menu commands (merged with native; conflicts ignored).",
"messages.suppressToolErrors":
"When true, suppress ⚠️ tool-error warnings from being shown to the user. The agent already sees errors in context and can retry. Default: false.",
"messages.ackReaction": "Emoji reaction used to acknowledge inbound messages (empty disables).",
"messages.ackReactionScope":
'When to send ack reactions ("group-mentions", "group-all", "direct", "all").',

View File

@@ -219,6 +219,7 @@ export const FIELD_LABELS: Record<string, string> = {
"browser.remoteCdpHandshakeTimeoutMs": "Remote CDP Handshake Timeout (ms)",
"session.dmScope": "DM Session Scope",
"session.agentToAgent.maxPingPongTurns": "Agent-to-Agent Ping-Pong Turns",
"messages.suppressToolErrors": "Suppress Tool Error Warnings",
"messages.ackReaction": "Ack Reaction Emoji",
"messages.ackReactionScope": "Ack Reaction Scope",
"messages.inbound.debounceMs": "Inbound Message Debounce (ms)",

View File

@@ -82,6 +82,8 @@ export type MessagesConfig = {
ackReactionScope?: "group-mentions" | "group-all" | "direct" | "all";
/** Remove ack reaction after reply is sent (default: false). */
removeAckAfterReply?: boolean;
/** When true, suppress ⚠️ tool-error warnings from being shown to the user. Default: false. */
suppressToolErrors?: boolean;
/** Text-to-speech settings for outbound replies. */
tts?: TtsConfig;
};

View File

@@ -114,6 +114,7 @@ export const MessagesSchema = z
ackReaction: z.string().optional(),
ackReactionScope: z.enum(["group-mentions", "group-all", "direct", "all"]).optional(),
removeAckAfterReply: z.boolean().optional(),
suppressToolErrors: z.boolean().optional(),
tts: TtsConfigSchema,
})
.strict()