#9893: Tools: downgrade tool execution failure logs
channel: telegram
agents
stale
Cluster:
Tool Execution and Error Handling
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
#6463: fix(telegram): improve timeout handling and prevent channel exits
by ai-fanatic · 2026-02-01
79.1%
#9511: feat: add tool error fallback toggle
by bolismauro · 2026-02-05
77.2%
#9085: fix: improve stability for terminated responses and telegram retries
by vladdick88 · 2026-02-04
76.5%
#8753: fix(telegram): add config option to disable acknowledgments
by revenuestack · 2026-02-04
76.2%
#7085: test: skip flaky workspace-paths & safe-bins tests on non-Linux/CI ...
by ThinkIbrokeIt · 2026-02-02
75.9%
#8888: fix: increase tool result/error context limits
by joetomasone · 2026-02-04
75.8%
#18187: fix: tool summaries silently dropped when reasoningLevel is stream
by ayanesakura · 2026-02-16
75.6%
#19632: fix: suppressToolErrors now suppresses exec tool failure notifications
by Gitjay11 · 2026-02-18
75.4%
#15050: fix: transcript corruption resilience — strip aborted tool_use bloc...
by yashchitneni · 2026-02-12
75.4%
#6447: fix(telegram): auto-restart polling when grammY runner exits silently
by AugmentAdvertise · 2026-02-01
75.2%