I maintain suga, a coding agent written in Go that I use for my own work every day. The thing I keep running into is long sessions: once the context fills up and gets summarized, the constraint I gave in turn 1 ("don't touch vendor/") is exactly what disappears.
What I ended up doing in suga: instead of summarizing, it starts a new segment that opens with a handoff in a fixed shape. The section with hard constraints and the user's own words is copied verbatim with no size limit. Every other section has a byte budget. Before the budgets, the handoff in one 14-turn session grew from 4.7 KB to 16 KB, because each one folded in the whole previous one.
Two things that surprised me:
I capped the output of the model call that writes the handoff. Unit tests and fake-model evals passed.…