How does context compaction work?
how does context compaction work?
what model is used for the summary generation?
how is it used with the AI sdk? generateText? or streamText?
nice. any reason why they don't let the stream fail and THEN compact, vs preemtively doing it?
are u sure they have a gap here? maybe they're handling it in another way?
do they compact with some threshhold? meaning idk, at 90% full?
what gets presented to the compaction agent? the full conversation in its context? or a path for it to read the convo in the filesystem?
cool. do they include recent messages after compaction? or just the summary and then straight to work?
doesn't the compaction agent get confused if they pass the full conversation as if they have been part of it? then ask it to summarize?
sounds fine. so they ignore the "system" role message? doesn't that kill prompt caching?
i meant the original system prompt, not the compaction agent's system prompt
gotcha, makes sense. do the compaction messages include all the tool calls and results? doesn't that make it super expensive?
END OF POST