← Back to PRs

#9893: Tools: downgrade tool execution failure logs

by ai-fanatic open 2026-02-05 20:49 View on GitHub →
channel: telegram agents stale
Summary: Downgrade tool execution failures to warn logs to reduce noise for expected failures. Tests: not run (pre-commit hook requires oxfmt spawn fix on Windows). <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR reduces log noise by downgrading tool execution failure logging in the Pi tool definition adapter from error-level to warn-level, while still returning a structured `{ status: "error" }` tool result. It also tightens Telegram runner retry behavior by reducing grammY runner `maxRetryTime` from 5 minutes to 2 minutes and expands the polling restart logic to retry additional network/timeout-like failures with bounded restart attempts and clearer retry logging. Tests were updated to reflect the new `maxRetryTime` value. <h3>Confidence Score: 4/5</h3> - This PR appears safe to merge with low risk of functional regressions. - Changes are localized (logging level adjustment and Telegram polling retry tuning) and the only behavioral change with user impact is retry timing/criteria, which is guarded by an explicit max restart cap and matching test updates. No definite runtime errors were identified in the modified code paths. - src/telegram/monitor.ts (retry classification and abort handling semantics) <!-- greptile_other_comments_section --> **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