altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

session: history images re-sent on every request break sessions once payload exceeds provider limits

Open devin-ai-integration[bot] opened this issue 3 weeks ago • 0 comments

Problem

Every image a user attaches (or a tool like read returns) stays in session history and is re-sent inline on every model request. Images cost almost no tokens, so compaction never removes them. After enough screenshots the request body passes provider limits and every subsequent turn fails with errors like Request body too large / multimodal data size is too large / HTTP 413. Those errors are not classified as context overflow, so auto-compaction never kicks in and the session is permanently stuck.

Upstream fix

anomalyco/opencode#62270 (bounded history images, also tracked as anomalyco/opencode#39929 / anomalyco/opencode#59794): once inline history images pass 25 MiB, the oldest are replaced with a placeholder until the remainder fits 15 MiB, and oversized-multimodal provider errors are treated as context overflow.

Tracked from #1478.