r/PiCodingAgent • u/Forsaken_Code_9135 • Sep 11 '26
Question Session eventually get stuck when using a small context.
I am using pi.dev with a local Qwen-3.8 running on an RTX-5080 with 16GB VRAM. I had to find the right balance between model quantization, cache quantization and context size, and right now I use a 48k tokens context.
While pi.dev is working really well with it during some time, all sessions end up being stuck at some point. The context reaches 80%, then compaction is started automatically, it goes down to maybe 50%, then compaction starts again soon after, compactions more and more often until the system is stuck and Pi.dev itself sends queries to the model with a length limit = 1. When that happens it's over I can't recover the session. What happens also is that compaction fails because there is not enough context remaining (I guess), and therefore the session is stuck as well.
I am wondering what would be the best approach to avoid these problems. Also more generally what are the good practices to use pi.dev with a small context, maybe planning and dividing tasks in several smaller tasks handled independantly, but if it could be managed automatically it would help a lot I guess.
Any help would be appreciated.



