openai / openai/codex

Windows Desktop 26.901 / core 0.153.0: `remote_compaction_v2 = false` now routes to retired `/responses/compact` (404) and kills the thread; earlier desktop builds ignored the flag

Open
#42,468 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug config context windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Environment
  • OS: Windows 11 Pro (build 26200), x64
  • Codex Desktop (ChatGPT for desktop, Store package) 26.901.1978.0, bundled core codex-cli 0.153.0-alpha.5
  • Auth: ChatGPT, Pro plan
  • Models: gpt-5.6-sol / gpt-5.6-terra
  • Region: Cloudflare edge BKK
Symptom

Immediately after "Context automatically compacted":

Error running remote compact task: unexpected status 404 Not Found: {"detail":"Not Found"},
url: https://chatgpt.com/backend-api/codex/responses/compact

Request IDs / cf-ray (all 2026-09-02/03 UTC):

  • a7464b74-3f05-4a8d-b781-e43e1e546ac7 / a35286a55bbe7b5e-BKK
  • 277efcfe-dbe6-498f-829c-07707e00cc1e / a34f4abccb41ee3d-BKK
  • 73d3d18f-fde4-48b1-9b25-f69d2a67c850 / a34f8e641ec37b70-BKK

The turn ends with no assistant message. The thread stays above model_auto_compact_token_limit, so every subsequent turn retries compaction and fails the same way. The thread is unrecoverable. Every compaction attempt since updating to 26.901 has failed; none succeeded.

Reproduction
  1. ~/.codex/config.toml contains:
    [features]
    remote_compaction_v2 = false
    
    (codex features list on 0.153.0 reports remote_compaction_v2 stable false.)
  2. Start any thread in Codex Desktop 26.901 with ChatGPT auth and run it past the auto-compact threshold.
  3. Observe the 404 above.

Setting remote_compaction_v2 = true (or removing the line) restores working compaction.

Analysis

codex-rs/core/src/session/turn.rs (run_auto_compact) and tasks/compact.rs dispatch:

  • provider V2 + feature enabled → compact_remote_v2 (normal /responses stream with compaction_trigger)
  • provider V2 + feature disabled → legacy compact_remotePOST /responses/compact
  • Unsupported → local

Per the maintainer comment in #38856, the harness stopped using /responses/compact months ago and the backend no longer serves it, yet the legacy path is still reachable by config, and compact_remote.rs has no fallback on a 404 (only the model-fallback retry for retryable errors), so the turn hard-fails.

Why this only surfaced with 26.901: the flag has been false in this config since May 2026 (set as a workaround for the v2 context_compaction / 400 invalid_enum_value issue at the time, which is long fixed). Local core tracing (logs_2.sqlite, effective feature set logged per request) shows that under earlier desktop builds (26.7xx to 26.831, cores 0.146 to 0.152) the desktop ran with RemoteCompactionV2 effectively enabled in ~39,600 of ~39,800 requests despite the file saying false, and only 10 legacy /responses/compact requests were ever made (3 on Aug 5 returned 200; the 7 after the 26.901 update returned 404). Since 26.901, every request has the feature disabled and compaction goes to the retired endpoint. The app-server / feature-registry / dispatcher sources are identical across 0.151.0, 0.152.1 and 0.153.0 and the runtime enablement whitelist never included this key, so the earlier override appears to have come from the desktop layer (the pre-update desktop logged Features enabled enabledFeatures="... remote_compaction_v2 ..."; the 26.901 bundle no longer references the key). In effect 26.901 made the user's config.toml value authoritative for this flag for the first time.

Same 404 reported by users on older clients: #38370, #38513, #38525, #38706, #38856, #39014, #39217.

Expected

Given the endpoint is retired, one of:

  1. Mark remote_compaction_v2 as Stage::Removed (or ignore false) so no config can select /responses/compact, with a warning like other removed compatibility flags; or
  2. On a 404 from /responses/compact, fall back to v2 (or local compaction) instead of failing the turn, and surface a clear "legacy compaction endpoint unavailable, set remote_compaction_v2 = true" message.

Either way the current failure mode (silent turn death and an unrecoverable thread from a stale but still-documented config key) should not be reachable.

Workaround

remote_compaction_v2 = true in ~/.codex/config.toml, then fully restart Codex.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with codex-rs/core/src/session/turn.rs, tasks/compact.rs, and compact_remote.rs, then reproduce auto-compaction with remote_compaction_v2 = false. Trace the disabled-feature dispatch and 404 handling; done means a stale configuration cannot send the retired endpoint or silently kill the turn, with behavior matching one of the expected recovery paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.