openai / openai/codex

Manual compacting makes context larger

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

Nobody has claimed this yet.

app bug context windows-os
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)?

26.818.61809

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

I had long chat and it was repeatedly compacting like five times in a row at least. Then decided to manually compact

This was before compacting
Context:
6% left (244,138 used / 258K)

After using /compact
Context:
0% left (258,400 used / 258K)

So compacting actually made context larger.

What steps can reproduce the bug?

Run model Luna 5.6 on Max reasoning. Long enough context and I started getting repeated compacts. Then tried to manually trigger compact and context got larger after.

What is the expected behavior?

Context would actually compact to smaller size.

Additional information

No response

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

Start by reproducing the report on Windows with a long context, Luna 5.6, Max reasoning, and the manual /compact command; compare the context usage before and after compaction. Trace the compaction entry point and verify that completed behavior reduces context usage rather than increasing it or reaching the limit.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.