Codex CLI prematurely auto-compacts context; effective threshold clamped to 90% of window
KernelBypass · ghdev · 2026-10-17
A detailed openai/codex issue (#54825) reports that Codex CLI 0.162.0-alpha.17.2 repeatedly auto-compacts long coding conversations at around 600k–700k tokens, despite a configured 1M-token context window and 900k compaction threshold, interrupting work earlier than the UI suggests.
Diagnostics confirm the 900k setting was loaded, yet compaction triggered at 917,130 tokens while the immediately preceding response reported only 638,856 total tokens — an unexplained accounting/UI discrepancy.
Offline tests with the same executable also show that setting the threshold above the context window (even to the max signed 64-bit integer) does not disable auto-compaction: the effective threshold is clamped to 90% of the selected context window.
More from coding & agent
- Claude cut a 2.6-hour video export to 20 minutes — but only after being told to rebuild the server — byhewar · 2026-10-23
- 3 flight-booking rules my AI agent checks that I'd never do by hand — Efistoffeles · 2026-10-23
- OpenJet claims Qwen3.8-27B coding runs 1.9x faster than llama.cpp on one RTX 3090 — JeremyCMorgan · 2026-10-23
- Building an autonomous SEO agent in Hermes with three skills: programmatic pages, Keywords Everywhere, DataForSEO — EXM7777 · 2026-10-23
- Building a sports betting AI agent with onchain execution and human approval by default: architecture and lessons — Dry-Comfortable-2678 · 2026-10-23
- How do you audit AI agent decisions in regulated workflows? A field survey — Ok_Way_1993 · 2026-10-23