Are you breaking up your tasks and spawning new sessions for each, or are you just yoloing and letting it auto compact when it blows the context many times on such a long running task?
Yolo. I keep a large project markdown document + incident/logs/feature documents which its instructed to review and update as necessary. It still occasionally misses stuff but it's surprisingly effective. Disclaimer: this is for hobby software. For work I'm more cautious - usually.