Skip to content

Context automatically compacted / [RUINS SESSIONS] - [ CRITICAL BUG] #31033

Open

Description

@nikkapet22-bot

What version of the Codex App are you using (From “About Codex” dialog)?

Version 26.623.101652 • Released 3 Jul 2026

What subscription do you have?

PRO

What platform is your computer?

Windows 11

What issue are you seeing?

Codex has already consumed 2 resets and around 50% of my weekly tokens.

At first, I was too late to understand what the real issue was, but now I have a clear picture. I asked Codex to fix some metrics in my app. This is the kind of task that usually takes 5–10 minutes max, but this time it kept running for hours.

The problem is that Codex appears to be stuck in a loop. It runs a few commands, then compacts the context. After compaction, the context is still around 94–98%, so it only has enough room to run a couple more commands before trying to compact again.

This cycle has been repeating for hours: brief work, context compaction, still almost full context, then another compaction attempt. Because of this loop, it wasted a huge amount of my weekly tokens and resets without actually making meaningful progress.

Image

What steps can reproduce the bug?

I have no idea

What is the expected behavior?

I have no idea

Additional information

Nope

Activity

  1. added
    bugSomething isn't working
    contextIssues related to context management (including compaction)
    rate-limitsIssues related to rate limits, quotas, and token usage reporting
    on Jul 3, 2026
  2. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor
  3. fedeostrit commented on Jul 3, 2026

    @fedeostrit

    i have de same issue

  4. nikkapet22-bot commented on Jul 3, 2026

    @nikkapet22-bot
    Author

    user-ARpTy5d0ZgjgKzFSwRc4h0wB

    I would like my resets and usage back if possible; I was keeping them for 5.6 sol
    This bug cost me a lot while providing 0 progress

    You can verify it

  5. fedeostrit commented on Jul 3, 2026

    @fedeostrit

    I understand that this problem is affecting all users who have the Codex app and are experiencing the same issue.

    It is a critical problem; they need to release a fix as soon as possible or roll back the changes, because it is currently impossible to work.

  6. nikkapet22-bot commented on Jul 6, 2026

    @nikkapet22-bot
    Author

    Helloooooooooooooooooooooo

    This bug ruined my 1 month + session and I had to create a new one without any context.
    Why no one talks about it, when can I receive my compensation

  7. changed the title [-]Context automatically compacted [BUG][/-] [+]Context automatically compacted / [RUINS SESSIONS] - [ CRITICAL BUG][/+] on Jul 6, 2026
  8. QuickkNastyy commented on Jul 13, 2026

    @QuickkNastyy

    Mine is doing the same shit non stop. Used all of my 5 hour limits twice now.

    Literally the first prompt in a new chat and it's compacting....

  9. pifoub commented on Aug 2, 2026

    @pifoub

    I am seeing the same compaction-loop failure on the current Windows release, with additional reproducible evidence.

    Environment

    • Windows 11

    • ChatGPT/Codex application version: 26.727.6591.0

    • The application reports that it is up to date.

    • Local Git repository

    • Repository-level .codex/config.toml: not present

    • User-level %USERPROFILE%\.codex\config.toml: present, but contains none of:

      • model_context_window
      • model_auto_compact_token_limit
      • model_auto_compact_token_limit_scope
      • compact_prompt

    The applicable model/platform compaction defaults were therefore being used.

    Observed behavior

    One implementation task entered a repeating cycle:

    1. Context automatically compacts.
    2. The agent announces that it is reconstructing or reconciling its working state.
    3. It rereads the same central source files, tests, migration, and documentation.
    4. It rediscovers decisions or gaps that had already been established.
    5. Another automatic compaction occurs shortly afterward.

    At an earlier protocol checkpoint I counted:

    • 98 explicit Context automatically compacted markers
    • 805 occurrences of Get-Content
    • 103 read commands involving one central React page
    • 85 involving the central Netlify endpoint
    • 74 involving the Cloudinary helper
    • 73 involving the media service
    • 49 involving the new database migration

    The compactions occurred every 24–174 visible protocol lines, averaging approximately 67 lines apart. The same task has since progressed to well over 100 automatic compactions.

    The protocol labels these as automatic compactions; these counts do not include manually requested /compact operations.

    This appears to be a feedback loop: compaction loses the exact working set, reconstructing that set generates enough tool output to trigger another compaction, and meaningful implementation progress becomes increasingly slow.

    /feedback failure

    I attempted to report the affected session using /feedback.

    The upload failed and retained this Feedback ID:

    019f1a12-0ee3-7d33-b396-899e85e7358a

    Retrying the upload consistently causes the current Windows application to terminate with “ChatGPT stopped unexpectedly.” The Update ChatGPT action confirms that version 26.727.6591.0 is already current.

    This may indicate that the unusually large or pathological session also breaks feedback-session serialization or upload. The Feedback ID was generated, but the UI explicitly says that the upload failed.

    Expected behavior

    Automatic compaction should reclaim enough usable context for a long-running task to continue without repeatedly rereading the same files and compacting again.

    If sufficient space cannot be reclaimed, Codex should stop the loop, preserve the filesystem state, and offer a continuation or fresh-context recovery path.

    Submitting /feedback for an affected session should not terminate the application. If the session is too large to upload, the UI should report that safely and allow a reduced diagnostic report to be submitted.

    Compactions continued way past 100 prior to attempting /feedback.

    OS Name Microsoft Windows 11 Pro Insider Preview
    Version 10.0.26220 Build 26220

    The failing execution caused a huge waste of time and tokens

    Working for 3h 56m 37s.txt

  10. pifoub commented on Aug 2, 2026

    @pifoub
    Image Image Image

    Images documenting some of the error messages.

  11. pifoub commented on Aug 2, 2026

    @pifoub

    I used the following prompt to investigate the issue that I reported above from withing Codex:

    Review the file that I just uploaded. It is a partial protocol of the work and the endless automatic compactions that occurred over the last five hours or so. The issue is a known bug - I found an existing issue that matches your case closely: openai/codex #31033 — repeated automatic compaction loop. It remains open and already carries the labels bug, context, app, and rate-limits. See if there is anything you can detect about the error that is not visible to outside observers or error reporting. I submitted the error report below under the error that I quoted above:

    "text"

    The response included the following 'Suggested Issue Addendum':

    Additional local forensic evidence identifies the feedback crash cause.

    The affected task JSONL reached approximately 9.8 GiB. During the first
    feedback/upload attempt, the Codex desktop log reported:

    memory allocation of 10424232598 bytes failed

    The retry reported:

    memory allocation of 10424232600 bytes failed

    Both app-server processes exited with Windows status
    3221226505 / 0xC0000409. The requested allocations closely match the task
    record size, strongly suggesting feedback/upload materializes the complete
    session in one contiguous allocation.

    The exported protocol contains 114 explicit automatic-compaction markers,
    with an average of 65 visible lines between compactions, plus repeated reads
    of the same central files. No obvious JSONL corruption was found at the end
    of the task record.

    This appears to be two linked defects:

    1. compaction/reconstruction repeatedly expands the session;
    2. feedback submission crashes when serializing the resulting session.
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

    appIssues related to the Codex desktop appbugSomething isn't workingcontextIssues related to context management (including compaction)rate-limitsIssues related to rate limits, quotas, and token usage reporting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions