← Back to PRs

#11174: Fix/fried chicken error

by jfgrissom open 2026-02-07 14:00 View on GitHub →
docs agents stale
<!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adjusts the error-classification path for embedded Pi runs so that ambiguous auth-based provider rate-limit messages don’t get handled as “context overflow” ahead of failover detection. It adds an explicit guard in `src/agents/pi-embedded-runner/run.ts` and mirrors that guard in user-facing formatting/sanitization in `src/agents/pi-embedded-helpers/errors.ts`. The PR also adds internal documentation describing the “fried chicken” misclassification and suggested fallback configuration, and updates `.gitignore` to ignore a `dist.backup/` directory. These changes fit into the existing failover architecture by ensuring `classifyFailoverReason()` is consulted before the context-overflow compaction/return path, allowing the existing `FailoverError`/model fallback machinery to execute for rate-limit/overload/auth/billing/timeouts rather than being short-circuited by the context overflow handler. <h3>Confidence Score: 3/5</h3> - This PR is mostly safe to merge, but the new guard can misroute some true context-overflow messages if they contain rate-limit tokens like "429". - Core logic change is localized and consistent across runner + formatting helpers, but the guard relies on broad substring-based failover detection (notably matching "429" anywhere), which can suppress intended context overflow handling for certain error texts. Minor cleanup needed for unused variable in run.ts; docs heading style may affect published anchors. - src/agents/pi-embedded-helpers/errors.ts; src/agents/pi-embedded-runner/run.ts <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs