v0.100.0 removed a critical user capability: hard 90% clamp nullifies user-defined compaction threshold

Resolved 💬 3 comments Opened Feb 14, 2026 by 99213 Closed Feb 14, 2026

What version of Codex CLI is running?

101

What subscription do you have?

pro

Which model were you using?

gpt-5.3-codex

What platform is your computer?

Linux 6.8.0-94-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

_No response_

What issue are you seeing?

v0.100.0 removed a critical user capability by introducing a hard clamp:
effective_auto_compact_limit = min(user_config_limit, context_window * 90%).

When context_window exists, higher user-defined model_auto_compact_token_limit values are silently ignored.
For default users this change adds almost no practical value (they were already on ~90% behavior), while for advanced users it removes intentional threshold control and causes earlier forced compaction.

What steps can reproduce the bug?

  1. Install and run rust-v0.99.0 (baseline).
  2. Set config:
  • model_context_window = 100
  • model_auto_compact_token_limit = 200
  1. Start a new session/thread and send prompts until token usage is >90 but <200.
  2. Observe on v0.99.0: no auto-compaction at 90; high configured limit is respected.
  3. Upgrade to rust-v0.100.0 (or v0.101.0) with the same config and repeat.
  4. Observe on v0.100.0+: auto-compaction triggers around 90% anyway.

Code snippet:

# ~/.codex/config.toml
model_context_window = 100
model_auto_compact_token_limit = 200

Thread ID:
N/A (local CLI regression; reproducible without a backend thread id)

What is the expected behavior?

If user sets model_auto_compact_token_limit, Codex should respect that explicit configured value (as pre-v0.100.0 behavior did), instead of silently clamping it to 90% of context window.

Additional information

  • Commit introducing clamp behavior:

https://github.com/openai/codex/commit/40de788c4d703b504ba13dd74b50f36863afc698

  • Clamp implementation:

https://github.com/openai/codex/blob/40de788c4d703b504ba13dd74b50f36863afc698/codex-rs/protocol/src/openai_models.rs#L259-L267

  • Validation test added in same commit:

https://github.com/openai/codex/blob/40de788c4d703b504ba13dd74b50f36863afc698/codex-rs/core/tests/suite/compact.rs#L2556-L2612

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗