You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Let an agent compact at its own window, below the model's.
I run several agents on one model: a planner and an implementor that should keep a long context, and short-lived workers that should compact early. Today automatic compaction plans for the model's window, so every agent on that model compacts at the same point. The per-model buffer in #43703 / #56443 can't separate them, since they share the model. (#34510 asked for per-agent on/off and was closed.)
Proposal: an agent may carry request.settings.compactionWindow (tokens). Automatic compaction uses the smaller of that and the model's window, with the usual buffer. It never raises the model's limit and doesn't change the summary request. A plugin sets it in agent.transform, so no config schema change is needed.
I have a small PR ready (core, about 20 lines plus tests).
Thanks for the clear write-up! You're asking for a per-agent compaction window: an agent could set a token window below its model's, and automatic compaction would then plan for the smaller of the two (with the usual buffer). That way, long-lived agents and short-lived workers on the same model could compact at different points.
Today the compaction threshold comes only from the model's limits and the global compaction settings, so this can't be done with a plugin yet. Maintainers will consider the proposal and your PR.
Activity
opencodejr commentedon Nov 4, 2026
Thanks for the clear write-up! You're asking for a per-agent compaction window: an agent could set a token window below its model's, and automatic compaction would then plan for the smaller of the two (with the usual buffer). That way, long-lived agents and short-lived workers on the same model could compact at different points.
Today the compaction threshold comes only from the model's limits and the global compaction settings, so this can't be done with a plugin yet. Maintainers will consider the proposal and your PR.
Related issues: