-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
[Feature]: Percentage-based compaction config #72790
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.enhancementNew feature or requestNew feature or requestimpact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.enhancementNew feature or requestNew feature or requestimpact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Percentage-based compaction config.
Problem to solve
Current compaction settings like
reserveTokensFloorandkeepRecentTokensuse absolute token values. This creates inconsistent behavior across models with different context windows.Example:
reserveTokensFloor: 20000means:Same config, wildly different behavior.
Proposed solution
Add support for percentage values in context-aware token settings:
{ "agents": { "defaults": { "compaction": { "reserveTokensFloor": "10%", "keepRecentTokens": "15%" } } } } ### Alternatives considered Auto-scale the default floor as % of context window, even if user sets absolute number. ### Impact Config becomes portable across models Users think in relative terms ("leave 10% headroom") not absolute numbers Reduces per-model config maintenance ### Evidence/examples _No response_ ### Additional information _No response_