← Back to PRs

#9511: feat: add tool error fallback toggle

by bolismauro open 2026-02-05 09:15 View on GitHub →
docs gateway agents stale
## 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