Codex Desktop App hangs indefinitely on “Automatically compacting context” even for no-op prompt

Open 💬 3 comments Opened May 9, 2026 by psyche314
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

Codex Desktop App

What issue are you seeing?

Codex Desktop App can get stuck indefinitely at:

Automatically compacting context

This happens before the actual user prompt is processed. Even sending a no-op test prompt still hangs during the automatic context compaction step.

In my latest repro, I sent a prompt whose entire purpose was to test the context compaction bug:

Do not do anything. This message is only testing the Codex automatic context compaction bug.

The app still entered “Automatically compacting context” and stayed there.

I also tried reducing reasoning effort to the lowest setting and switching the model from GPT-5.5 to GPT-5.4. It did not help. This suggests the problem is not model reasoning effort or the specific model, but the compaction pipeline / session state / handoff path itself.

Actual behavior

  • Desktop App triggers automatic context compaction.
  • The UI remains stuck on “Automatically compacting context”.
  • The prompt is never answered.
  • Lowering reasoning effort does not help.
  • Switching from GPT-5.5 to GPT-5.4 does not help.
  • The current session becomes effectively unusable.

Expected behavior

Automatic context compaction should either:

  1. complete and resume the conversation, or
  2. fail with a visible, actionable error, or
  3. provide a recovery option such as retry, skip compact, create handoff/checkpoint, or open a fresh continuation session.

It should not hang indefinitely with no recovery path.

Why this is especially painful

This is a critical-path failure for Codex Desktop App. Once a long-running coding session reaches this state, the user cannot continue the session, and there is no reliable manual control in the Desktop App equivalent to a safe checkpoint/compact/recovery action.

There are already many related reports around automatic context compaction hanging, failing, or corrupting handoff state. I am filing this additional report because the bug is still reproducible and still makes long Desktop App sessions unreliable.

Please prioritize at least a fail-safe timeout and recovery path for the Desktop App. Even if the underlying compaction request fails, the app should not leave the user trapped in an infinite “Automatically compacting context” state.

Additional context

Known related issues include reports such as:

  • #13906
  • #14342
  • #14346
  • #14472
  • #18363
  • #18720
  • #19910

This report is another affected-user repro: no-op prompt, lowest reasoning, GPT-5.5 -> GPT-5.4, still stuck at automatic compaction.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #21343
  • #20439
  • #20931
  • #21360
  • #20983

Powered by Codex Action

mahdikayvan · 3 months ago

@psyche314 Hey — I feel this pain too. Your issue is very close to the reliability problem I’m working on.

I’m building AgaveCore, and I’d like to let a few early people use it for free while I shape it into something stronger.

It helps when a coding agent starts to drift, loses important context, or gives you an output you do not fully trust.

In practice, it works through two habits:

  • tell the agent to remember-progress or remember-this when something important should not be lost
  • use consult-brain when the current task needs more grounded feedback on what to do next

Over time, as useful journals, decisions, and failures pile up, the product should help the agent make sharper decisions and take better actions with less drift.

If this sounds relevant, reply here and I’ll send the exact steps. You can also use the email or Telegram on my profile.

Cheers,
Mads.

Maxei6 · 3 months ago

Adding another affected-user signal: I am seeing this on Codex Desktop with GPT-5.5 using Extra High reasoning.

Observed behavior:

  • Long-running Desktop App sessions enter Automatically compacting context.
  • The app can remain stuck there instead of resuming the turn.
  • From the user perspective, the active session becomes unreliable/unusable once compaction starts.

Expected behavior is the same as described in this issue: compaction should finish, fail with an actionable error, or provide a recovery path such as retry/skip/continue in a fresh session. The current infinite compacting state is the blocker.