This is exactly how it should work. I imagine it as a tree view showing both full and summarized token counts at each level, so you can immediately see what’s taking up space and what you’d gain by compacting it.
The agent could pre-select what it thinks is worth keeping, but you’d still have full control to override it. Each chunk could have three states: drop it, keep a summarized version, or keep the full history.
That way you stay in control of both the context budget and the level of detail the agent operates with.
I do find it really interesting that more coding agents don't have this as an toggleable feature, sometimes you really need this level of control to get useful capability
Yep; I've actually had entire jobs essentially fail due to a bad compaction. It lost key context, and it completely altered the trajectory.
I'm now more careful, using tracking files to try to keep it aligned, but more control over compaction regardless would be highly welcomed. You don't ALWAYS need that level of control, but when you do, you do.
Spent a lot of time experimenting with different AI coding tools (Claude Code, Gemini CLI, Cursor, Codex CLI, Antigravity...).
Boris's tips cover 90% of what I'd say.
The most important is to use Claude Code with Claude Max plan to have almost unlimited access to Opus 4.5 :) the agent and DX is top notch. It one shot most of my tasks with correct code quality. If you prefer Cursor like DX, you can use Zed with the free Claude Code integration in its UI. Before, I was multiplying $20 plans but it was really annoying to switch between products to get worse quality than Opus. Best investment I made this year.
Then as Boris told: give the model a way to verify its work, just telling it explicitly 'to test, run X command / check the db in container Y / make curl request with Z access token to test your endpoint'. Game changer.
Don't overload context. When switching tasks, clear and start fresh. Mixing old task context with new one creates confusion and worse output.
One observation on Gemini 3 vs Claude 4.5 Opus: Gemini is great for one-shot on fresh projects and UIs, but struggles more on large codebases and can get easily confused (might be the Windsurf agent though).
Just experiment a lot. Like coding itself, you build intuition over time on what works and what doesn't.
The agent could pre-select what it thinks is worth keeping, but you’d still have full control to override it. Each chunk could have three states: drop it, keep a summarized version, or keep the full history.
That way you stay in control of both the context budget and the level of detail the agent operates with.
reply