When a session accumulates many images (screenshots, file reads), the Anthropic API enforces a 2000px dimension limit for "many-image requests" and returns a 400 error. Previously this error was not classified as retryable, causing the session to get permanently stuck in an error loop with no recovery path. This adds automatic recovery: detect the specific "image dimensions exceed max allowed size for many-image requests" error, strip older images from the conversation history (keeping the 5 most recent), and auto-retry. Also handles manual retry (continue/retry) by downsizing before retrying. Closes #2874 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cli | ||
| core | ||
| modes | ||
| resources/extensions/memory | ||
| tests | ||
| utils | ||
| cli.ts | ||
| config.ts | ||
| index.ts | ||
| main.ts | ||
| migrations.ts | ||