Skip to content

Random compaction bug blocking session completely. #38240

Open

Description

@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

Activity

  1. added
    CLIIssues related to the Codex CLI
    contextIssues related to context management (including compaction)
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Aug 12, 2026
  2. Sorbe1 commented on Aug 12, 2026

    @Sorbe1
    Author

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

  3. Sorbe1 commented on Aug 12, 2026

    @Sorbe1
    Author

    /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) │
    ╰────────────────────────────────────────────────────────────────────────────────────────────────╯

  4. Sorbe1 commented on Aug 13, 2026

    @Sorbe1
    Author

    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.

  5. Sorbe1 commented on Aug 13, 2026

    @Sorbe1
    Author

    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.

  6. SunMaple11 commented on Aug 13, 2026

    @SunMaple11

    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.

  7. Sorbe1 commented on Aug 13, 2026

    @Sorbe1
    Author

    ■ 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

  8. SunMaple11 commented on Aug 13, 2026

    @SunMaple11

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

  9. SunMaple11 commented on Aug 14, 2026

    @SunMaple11

    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

  10. jdcodes1 commented on Aug 18, 2026

    @jdcodes1

    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.

  11. Sorbe1 commented on Aug 22, 2026

    @Sorbe1
    Author

    _> [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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIbugSomething isn't workingconnectivityIssues involving networking or endpoint connectivity problems (disconnections)contextIssues related to context management (including compaction)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions