My wishlist for 2026: Anthropic / OpenAI expose “how compaction is executed” to plugin authors for their CLI tools.
This technique should be something you could swap in for whatever Claude Code bakes in — but I don’t think the correct hooks or functionality is exposed.
Isn’t codex open source and you can just go read what they do?
I have read the gemini source and it’s a pretty simple prompt to summarize everything when the context window is full