openai / openai/codex

Context compaction leaves usage above 65%

Open
#40,856 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug context
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

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

Codex & OWL 26.820.60940

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

After a long-running task is compacted, the context usage indicator still shows more than 65% usage. Compaction therefore appears either not to reclaim the expected context capacity or not to update the displayed usage correctly.

This significantly limits how much additional work can continue in the same task after compaction.

Observed in the feedback session identified below. Frequency across other tasks is unknown.

What steps can reproduce the bug?
  1. Open a Codex task and continue working until its context usage becomes high.
  2. Continue until Codex automatically compacts the task context.
  3. Wait for compaction to finish.
  4. Inspect the context usage indicator.
  5. Observe that usage remains above 65% immediately after compaction.

Session ID: 01a03833-eead-7843-aae8-a47f3fe339bb
Model: Sol High
Context window usage: More than 65% immediately after compaction

What is the expected behavior?

After context compaction completes, the context usage indicator should decrease substantially and accurately reflect the reduced post-compaction context. The task should regain enough context capacity to continue meaningful work.

Additional information

Feedback was submitted from the affected task.

Application: ChatGPT powered by Codex & OWL
Version: 26.820.60940
Operating system: macOS 26.5.2
OS build: 25F84
Architecture: Apple silicon (arm64)

The standard local Codex.app bundle path was unavailable, so the application version above comes from the in-app version information.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by running a long Codex task until automatic compaction completes, then inspect the context usage indicator. Compare the displayed usage immediately before and after compaction, using session 01a03833-eead-7843-aae8-a47f3fe339bb as reference. Done means the indicator accurately reflects substantially reduced post-compaction context and leaves meaningful capacity for continued work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
ai
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.