Skip to content

/compact doesn't correctly optimize the context (v0.63.0) #7232

Closed

Description

@madanlalit

What version of Codex is running?

codex-cli 0.63.0

What subscription do you have?

Business

Which model were you using?

gpt-5.1-codex-max xhigh

What platform is your computer?

Darwin 25.1.0 arm64 arm

What issue are you seeing?

I was at 70% usage of my context window and wanted to optimize it using the /compact command to free up some space. However, instead of summarizing the context window, the usage shot up to 100% (328K used / 272K).

What steps can reproduce the bug?

Uploaded thread: 019ab0b6-de79-77d2-99d3-f3c6a8f7249a

What is the expected behavior?

ideally the /compact should optimize the context window and free up some space

Additional information

No response

Activity

  1. added
    contextIssues related to context management (including compaction)
    on Nov 24, 2025
  2. lionel-oai commented on Nov 24, 2025

    @lionel-oai
    Contributor

    Hi @madanlalit, did it just happen this one time or are you able to reliably see this issue?

    Just tested it on my end and it works well (Context went from 93% left to 100%):

    Image
  3. cncwork commented on Nov 24, 2025

    @cncwork

    I have seen this happen too, I uploaded feedback thread: 20019ab696-5dc3-7371-8e03-8aede289e6f8 to assist with debugging. OpenAI Codex v0.63.0 for macOS via Homebrew
    Session: 019ab696-5dc3-7371-8e03-8aede289e6f8.

    Continuing with the conversation eventually shows a high % available context as expected, it appears to be a false alarm for me.

  4. madanlalit commented on Nov 24, 2025

    @madanlalit
    Author

    I tried again, but I'm experiencing the same issue.

    Image
  5. jif-oai commented on Nov 24, 2025

    @jif-oai
    Contributor

    Would you mind running a simple "Hello" turn after this and doing a /status again? An issue was fixed this morning around token count reporting so I just want to make sure this is not the same issue

  6. madanlalit commented on Nov 24, 2025

    @madanlalit
    Author

    sure i can do that

  7. madanlalit commented on Nov 24, 2025

    @madanlalit
    Author

    Yes, the issue is related to token count reporting and not /compact. Usually, when we reach 100% context usage, we receive an error message prompting us to open a /new conversation. However, in this case, we can proceed further, and after sending another message, the usage percentage changes (increases).

  8. jif-oai commented on Nov 25, 2025

    @jif-oai
    Contributor

    Ok so the problem should be fixed at the next release

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

    bugSomething isn't workingcontextIssues 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