Commit graph

1 commit

Author SHA1 Message Date
Mads Hvelplund
c91e4ca1b9
fix: bypass image-strip recovery for ContextWindowExceededError
ContextWindowExceededError carries status_code=400, which matched the
_INPUT_REJECTION_CODES guard and triggered image-strip retry logic.
Image stripping cannot reduce token count, so the agent wasted up to
3 retry cycles before parking as failed.

Add an explicit isinstance check before the status-code guard to detect
context-window overflow and park the agent as 'failed' immediately.
2026-06-19 13:40:45 +02:00