#9511: feat: add tool error fallback toggle
docs
gateway
agents
stale
Cluster:
Tool Execution and Error Handling
## Summary
- Add `messages.toolErrorFallback` config to suppress tool failure fallback messages.
- Gate tool-error fallback in `buildEmbeddedRunPayloads`.
- Add unit test and docs update.
## Testing
- `pnpm build`
- `pnpm check` (failed: `src/discord/monitor/allow-list.ts` type errors unrelated to this PR)
- `pnpm test` (not run; blocked by `pnpm check`)
## AI Assistance
- AI-assisted: yes.
- Prompts + session log: https://gist.github.com/bolismauro/11658730786072307c5282785cd1354c
- I understand the code changes and verified local tests as noted above.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new `messages.toolErrorFallback` configuration flag that controls whether a generic “tool failure fallback” message is emitted when tool execution fails. The change wires the flag through config typing + Zod session schema, gates the fallback message in the embedded runner payload builder, and updates docs plus a unit test to cover the new behavior.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk.
- Changes are scoped to adding a single config flag, updating schema validation, and gating an existing fallback message; no correctness issues were found in the modified code paths based on repository cross-references.
- No files require special attention
<!-- greptile_other_comments_section -->
<sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#15864: feat: add deliverOnlyToolMessages config for clean messaging channe...
by gandalf-the-engineer · 2026-02-14
80.5%
#19632: fix: suppressToolErrors now suppresses exec tool failure notifications
by Gitjay11 · 2026-02-18
80.3%
#9339: fix: enhance OpenAI compatibility for tool calling
by 0xrushi · 2026-02-05
78.5%
#18708: feat(messages): add suppressToolErrorWarnings config option
by codexGW · 2026-02-17
78.0%
#3655: auto-reply: adicionar notificações automáticas de conclusão de tarefas
by Heldinhow · 2026-01-29
77.7%
#16064: feat: add contact-based tool permissions with verification
by jamiequint · 2026-02-14
77.5%
#9893: Tools: downgrade tool execution failure logs
by ai-fanatic · 2026-02-05
77.2%
#18466: fix: suppress recoverable mutating tool errors when agent already r...
by stijnhoste · 2026-02-16
77.1%
#18847: docs(#18153): document suppressToolErrors configuration option
by cedillarack · 2026-02-17
76.7%
#4445: fix: resolve Antigravity "unsupported version" and tool_use schema ...
by harry2690 · 2026-01-30
76.4%