Summary
Auto-compaction appears to gate on the model's declared context window. Models that don't publish one (cloaked/stealth entries, some experimental routes) never trip the gate, so the conversation grows without bound until an upstream provider rejects it outright.
A session was observed reaching ~1.43M tokens (~5MB per request) with auto-compaction never firing. It fired only after the user manually switched to a model that does declare a limit and got back an explicit 400. That single pass then reclaimed ~920k tokens — proving compaction was both available and effective, just never triggered.
Separately, compaction also degenerates into no-op runs: in the same conversation it fired 14 consecutive times reclaiming 100-1,400 tokens each, succeeding every time and reclaiming essentially nothing.
Expected Behavior
- Auto-compaction triggers on an absolute payload/token threshold that does not depend on the model advertising a context window. A missing window should fall back to a conservative default, not disable the gate.
- Compaction should not re-fire when the previous pass reclaimed a negligible amount — that indicates it has nothing left to reclaim and the loop is wasted work.
Actual Behavior
- No compaction fired during a 25-minute window of back-to-back request failures, while every request carried the same ~5MB payload.
- Compaction fired only after a provider returned
Input length 1434353 exceeds the maximum allowed input length of 262112 tokens.
- Request-payload ceilings by model show the gate working and not working side by side. Models with a declared window are held under a hard ceiling; models without one run away:
| model |
p95 payload |
max payload |
declared window (e.g. deepseek/deepseek-v4-pro) |
1.88 MB |
3.84 MB (hard ceiling) |
no declared window (e.g. stealth/ox-alpha) |
2.39 MB |
13.5 MB |
no declared window (e.g. xiaomi/mimo-v2.5) |
5.59 MB |
16.6 MB |
Steps to reproduce the issue
- Select a model that does not declare a context window (e.g.
stealth/ox-alpha).
- Run a long agentic task that pins large tool output into the conversation — build logs, dependency installs, whole-file dumps.
- Watch
/context. It grows past the provider's real limit and auto-compaction never fires.
- Switch to a model that declares a limit — it immediately returns
400 Input length … exceeds the maximum allowed input length.
- Compaction then fires and reclaims most of the context in one pass.
Command Code Version
1.32.1
Operating System
Windows
Additional context
This is the upstream cause of a class of "repeated 500 errors" reports. Oversized payloads correlate strongly with mid-stream aborts — internal telemetry puts the failure rate at ~3.5% for requests under 1MB, rising monotonically to ~42% above 5MB. Because the gate never fires on these models, affected users sit in the worst band on every attempt and see what looks like a total outage.
The misleading 500 those users actually see is #755.
Summary
Auto-compaction appears to gate on the model's declared context window. Models that don't publish one (cloaked/stealth entries, some experimental routes) never trip the gate, so the conversation grows without bound until an upstream provider rejects it outright.
A session was observed reaching ~1.43M tokens (~5MB per request) with auto-compaction never firing. It fired only after the user manually switched to a model that does declare a limit and got back an explicit
400. That single pass then reclaimed ~920k tokens — proving compaction was both available and effective, just never triggered.Separately, compaction also degenerates into no-op runs: in the same conversation it fired 14 consecutive times reclaiming 100-1,400 tokens each, succeeding every time and reclaiming essentially nothing.
Expected Behavior
Actual Behavior
Input length 1434353 exceeds the maximum allowed input length of 262112 tokens.deepseek/deepseek-v4-pro)stealth/ox-alpha)xiaomi/mimo-v2.5)Steps to reproduce the issue
stealth/ox-alpha)./context. It grows past the provider's real limit and auto-compaction never fires.400 Input length … exceeds the maximum allowed input length.Command Code Version
1.32.1
Operating System
Windows
Additional context
This is the upstream cause of a class of "repeated 500 errors" reports. Oversized payloads correlate strongly with mid-stream aborts — internal telemetry puts the failure rate at ~3.5% for requests under 1MB, rising monotonically to ~42% above 5MB. Because the gate never fires on these models, affected users sit in the worst band on every attempt and see what looks like a total outage.
The misleading
500those users actually see is #755.