eca icon indicating copy to clipboard operation
eca copied to clipboard

Automatic compaction not always triggers

Open apalazzi opened this issue 2 months ago • 5 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Describe the bug

In some occasions automatic compaction does not trigger even if the chat is well beyond the established limit (in my case 80% of 256k context). I couldn't pinpoint the exact conditions to reproduce that, but it seems that user input or autocompact command is injected only from time to time, and sometimes it doesn't fire for the whole 50k context left when autocompaction threshold is passed.

To Reproduce

Not sure but try:

  1. run an autonomous, complex task that requires a long context
  2. see (sometimes) the autocompaction threshold be passed without compaction happening

Expected behavior

Autocompaction should start soon after the threshold is passed

apalazzi avatar Sep 22 '26 13:09 apalazzi

I've noticed something similar, looks to me that images has something to do with it. Do you know @apalazzi if your session used images as well? Did it look the same (the number of reported token is wrong)? I am using Opus 5.5 here.

Image

zikajk avatar Sep 24 '26 19:09 zikajk

No images and token count seems correct.

apalazzi avatar Sep 25 '26 06:09 apalazzi

I couldn't repro this yet 🤔

ericdallo avatar Oct 07 '26 17:10 ericdallo

I'm still suffering from this issue, it seems to me that during LLM turn context is not monitored, thus if this goes on context hits its hard limit and stops and recovering from that is a major PITA. Is it impossible to check context usage during LLM turn?

apalazzi avatar Nov 04 '26 18:11 apalazzi

#647 should fix this, LMK if still happens

ericdallo avatar Nov 05 '26 14:11 ericdallo