Opus 4.7 Context Window Bug (200K vs 1M)

Description

Correctness bug patched in v2.1.117: Opus 4.7 sessions computed context-utilization percentages against a 200K window instead of the model's native 1M window. The 200K value was the pricing boundary (above which premium pricing applies) reused as the context ceiling in an internal constant — the same confusion documented in GitHub #23432. Consequence: autocompact fired at ~20% actual utilization, prematurely compacting context the user still had headroom to use.

Key claims

Relations

Sources

src-20260423-542f02260352