Skip to content

Automatic context compaction in Codex Desktop is extremely slow, sometimes taking around a full minute #24372

Closed

Description

@GGBondBlueWhale

What version of the Codex App are you using?

26.519.41501 (3044)

What subscription do you have?

Pro

What platform is your computer?

macOS 26.5 on a MacBook Pro 16-inch with Apple M5 Max and 128 GB memory.

What issue are you seeing?

Over the last two days, automatic context compaction in Codex Desktop has become extremely slow.

In the representative session I uploaded, Codex reached the automatic compaction step and paused at Context automatically compacted / Automatically compacting context. The longest observed compaction took around a full minute before the agent continued.

This is clearly abnormal compared with normal task flow. Every long-running task can now spend a significant amount of time blocked on context compaction, which makes Codex feel much slower even when the actual coding/editing work is otherwise progressing.

This report is specifically about automatic context compaction latency. The compaction eventually completes in the representative case, but the delay is long enough to disrupt the workflow.

What steps can reproduce the bug?

  1. Open Codex Desktop on macOS.
  2. Work in a long-running coding session until automatic context compaction is triggered.
  3. Observe that Codex pauses at the context compaction step.
  4. In recent sessions, this pause can last close to a full minute before the agent continues.

Representative in-app feedback ID: 019e58c3-fca6-75f0-9512-6876983b86b5

I submitted that feedback with current Codex session logs included.

What is the expected behavior?

Automatic context compaction should not routinely block task progress for around a minute.

Expected behavior:

  • Automatic compaction should complete much faster in normal usage.
  • If compaction is expected to take a long time, the UI should show clearer progress/status.
  • If this is caused by backend latency, timeout, retry, or a recent regression in the compaction pipeline, Codex should make that visible in logs or UI.
  • Long-running tasks should not repeatedly lose large amounts of time at the automatic compaction step.

Additional information

The attached screenshot shows a representative session where Codex is at the automatic context compaction stage.

Image

Activity

  1. added
    bug
    app
    context
    on May 24, 2026
  2. github-actions commented on May 24, 2026

    @github-actions
    Contributor
  3. changed the title [-]Slow automatic context compaction in Codex Desktop[/-] [+]Automatic context compaction in Codex Desktop is extremely slow, sometimes taking around a full minute[/+] on May 24, 2026
  4. etraut-openai commented on Jun 29, 2026

    @etraut-openai
    Contributor

    Thanks for reporting this problem. Until recently, Codex used a separate endpoint and server-side logic for compaction. We recently switched to a more robust approach where the compaction logic is moved locally using the same endpoint as normal turns. This eliminates "remote compaction" errors and increases the stability and reliability of compaction operations. If you see further problems with compaction, please use /feedback and open a new bug report.

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

    appbugcontextperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions