Skip to content

[BUG] /goal loops after usage limit and repeatedly triggers compaction #23828

Closed

Description

@roojay

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

macOS Codex app 26.506.31421 (2620)

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Darwin 24.6.0 x86_64 i386

What issue are you seeing?

When using the experimental /goal feature, Codex App can enter an infinite loop after the 5-hour usage limit is reached.

Image Image

What steps can reproduce the bug?

The issue does not seem to be caused by the usage limit and context compaction happening at exactly the same time initially. Instead, the observed sequence is:

  1. I start a long-running task with /goal.

  2. The goal keeps running normally for a while.

  3. During the goal execution, the 5-hour usage limit is reached.

  4. Codex repeatedly prints the usage-limit message:

    You've hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit    https://chatgpt.com/codex/settings/usage to purchase more credits or try again at 4:44 PM.
    
  5. Because the same usage-limit message is printed many times, the conversation context grows quickly.

  6. The large amount of repeated output appears to trigger automatic context compaction.

  7. The compaction step also requires a model request, but that request fails because the same 5-hour usage limit is still active.

  8. Codex then prints more usage-limit messages.

  9. Those additional messages appear to trigger compaction again.

  10. The session gets stuck in an infinite loop of usage-limit messages and failed compaction attempts.

In short, the loop appears to be:

/goal running
→ 5-hour usage limit reached
→ repeated usage-limit messages
→ context grows
→ compaction triggered
→ compaction hits the same usage limit
→ more usage-limit messages
→ context grows again
→ compaction triggered again
→ infinite loop

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    app
    on May 21, 2026
  2. added
    bug
    rate-limits
    context
    on May 21, 2026
  3. etraut-openai commented on May 21, 2026

    @etraut-openai
    Contributor

    Thanks for the report. This will be addressed in the next release. It will now automatically pause when your usage limit is reached, and you can choose to resume it at a later time.

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

    appbugcontextrate-limits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions