[Feature Request] User-configurable autocompact threshold for context fill percentage
Bug Description
Feature request: user-configurable autocompact threshold
I want a setting (env var or settings.json key) that lets me control at what context fill
% autocompact triggers. Today the threshold + ~33k buffer is hardcoded.
Why this matters — concrete pain:
On Opus 4.7 (1M context), I observe severe quality degradation past ~150k tokens on
complex tasks: coding, product strategy, marketing analysis. Worse, the model starts
taking dangerous, careless actions I never asked for:
- deleting/removing users
- revoking API tokens
- imprecise / wrong actions in agent-browser sessions
This is a real safety problem, not a vibes complaint. Going past 200k tokens is genuinely
risky for me.
My current workaround: I anxiously watch /context and manually /compact around 120–150k
tokens. This is fragile — one distracted moment and the model is already in the danger
zone before I notice.
Ask: expose a knob like autoCompactThreshold: 0.15 (or env var) so users on large-context
mode compact aggressively early, well before quality cliffs and unsafe-action
regimes. The default can stay where it is; this is purely opt-in.
Closed as duplicates: #15435, #12053 — but neither shipped a solution. Please reconsider;
for power users on 1M-context models the current behavior is actively unsafe.
Environment Info
- Platform: darwin
- Terminal: vscode
- Version: 2.1.138
- Feedback ID: 8ebca5c3-8c4d-4d7d-aa9a-b4bf48ffb002
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗