Random compaction bug blocking session completely.

Open 💬 10 comments Opened Aug 12, 2026 by Sorbe1

What version of Codex CLI is running?

codex-cli 0.128.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.5 medium

What platform is your computer?

CachyOS

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

bash - Konsole

Codex doctor report

■ Error running remote compact task: unexpected status 404 Not Found: {"detail":"Not Found"}, url: https://chatgpt.com/backend-api/codex/responses/compact, cf-ray: a2a1db60588c37cd-BKK, request id: 6a8baa3a-
11cd-45f7-a784-86a9de43e263

[tkb@TANELORN-CACHYOS SideraV7]$ codex doctor --json 
error: unexpected argument '--json' found

  tip: to pass '--json' as a value, use '-- --json'

Usage: codex [OPTIONS] [PROMPT]
       codex [OPTIONS] <COMMAND> [ARGS]

For more information, try '--help'.
[tkb@TANELORN-CACHYOS SideraV7]$

What issue are you seeing?

During compaction hit a status 404 error in codex.

What steps can reproduce the bug?

Uploaded thread: 019fe013-cc73-7780-a17f-7cc61998d68e

What is the expected behavior?

No error, keep working.

Additional information

_No response_

View original on GitHub ↗

10 Comments

Sorbe1 · 15 days ago

Token usage: total=24,177,136 input=20,178,048 (+ 965,125,760 cached) output=3,999,088 (reasoning 200,611)

Sorbe1 · 15 days ago

/status

╭────────────────────────────────────────────────────────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.128.0) │
│ │
│ Visit https://chatgpt.com/codex/settings/usage for up-to-date │
│ information on rate limits and credits │
│ │
│ Model: gpt-5.5 (reasoning medium, summaries auto) │
│ Directory: /data/bulk/SideraV7 │
│ Permissions: Custom (danger-full-access, on-request) │
│ Agents.md: AGENTS.md │
│ Account: xxxxx@gmail.com (Pro) │
│ Collaboration mode: Default │
│ Session: 019fe013-cc73-7780-a17f-7cc61998d68e │
│ │
│ Context window: 8% left (239K used / 258K) │
│ Weekly limit: [██████████████░░░░░░] 69% left (resets 10:52 on 18 Aug) │
│ GPT-5.3-Codex-Spark Weekly limit: [████████████████████] 100% left (resets 02:36 on 20 Aug) │
╰────────────────────────────────────────────────────────────────────────────────────────────────╯

Sorbe1 · 15 days ago

Still reproducible after 10+ hours across two separate Codex sessions. Public OpenAI status reports fully operational and contains no corresponding incident. Requests consistently return HTTP 404 from /backend-api/codex/responses/compact.

Sorbe1 · 15 days ago

Impact: Pro Level Customer Development with Codex now impossible. Customer operations completely BLOCKED.
This is now a Pri 1, Sev 1 class full work stoppage incident.

SunMaple11 · 14 days ago

The same error is appeared on my 0.147 codex cli
■ Error running remote compact task: unexpected status 404 Not Found: {"detail":"Not Found"}, url:
https://chatgpt.com/backend-api/codex/responses/compact, cf-ray: a2a63697bb8ea0de-NRT, request id:
39b24f5b-0bb3-4535-a643-d14319dcce5f
If I open a new session, when the context neally full, the error will be shown too.
The codex say this is the problem of openai backend. Hope it can be solved quickly.

Sorbe1 · 14 days ago

■ Error running remote compact task: unexpected status 404 Not Found: {"detail":"Not Found"}, url: https://chatgpt.com/backend-api/codex/responses/compact, cf-ray: a2a7ff321d25692e-BKK, request id: ef69eb19-23
26-40fc-86a1-2e4da2bf0923

SunMaple11 · 14 days ago

same problem. I asked codex in a new session and he told me it is caused by the backend server of openai.

SunMaple11 · 14 days ago

I have solved this problem.
■ Error running remote compact task: unexpected status 404 Not Found: {"detail":"Not Found"}, url:
https://chatgpt.com/backend-api/codex/responses/compact, cf-ray: a2a63697bb8ea0de-NRT, request id:
39b24f5b-0bb3-4535-a643-d14319dcce5f
This is my error
It's 2 reasons I've known to cause it:
1 codex version too old.
2 some wrong configurations. This is my problem. Open ~/.codex/config.toml and search any wrong configurations.
Because the remote compaction always error in the past so I add this config in my config.toml
[feature]
remote_compaction_v2 = false
local_thread_store_compression = true
It's wrong config. So I delete this three lines and continue my error session. It is work.
Hope to help you. @Sorbe1

jdcodes1 · 9 days ago

Root-caused this in #38323 (same unexpected status 404 from /backend-api/codex/responses/compact): when remote compaction fails, codex's only recovery is retrying the same remote endpoint with a fallback model (core/src/compact_model_fallback.rs#L9-L20), so a route-level 404 fails both attempts and the turn errors out. Because compaction fired due to a full context, every continuation re-triggers it — that's why the session blocks completely instead of recovering. The clean fix is falling back to the existing local compaction path (run_compact_task) when the remote endpoint 404s; details in the linked comment.

Sorbe1 · 6 days ago

_> [feature]

remote_compaction_v2 = false local_thread_store_compression = true_

This addition to ~/.codex/config.toml provided a temporary work around until the backend issue is fixed. Credit to SunMaple11

I also upgraded to gpt-5.6-sol (reasoning high) to supposedly improve my context size.