stuck at "100% context left" for local models

Resolved 💬 5 comments Opened Oct 26, 2025 by teub Closed Nov 1, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.50.0

What subscription do you have?

local model

Which model were you using?

gpt-oss-20b

What platform is your computer?

Linux 6.14.0-33-generic x86_64 x86_64

What issue are you seeing?

Codex doesn't seem to update how much context is left, and therefore never auto-compacts. The status always indicates "100% context left", no matter how much context I use.

What steps can reproduce the bug?

My config is simple:

[model_providers.lms]
name = "LM Studio"
base_url = "http://localhost:1234/v1"

[profiles.lmstudio]
model_provider = "lms"
api_key = "not-needed"
model = "openai/gpt-oss-20b"
model_context_window = 131072

approval_policy = "on-failure"

and then I run:

codex --profile lmstudio "hi, write a 2 page story"

At the end of the command, there's still "100% context left" in the status.

What is the expected behavior?

After 2 pages of story, I expect the context to drop below 100%

Additional information

I also tried previous versions of Codex and it never seemed to work. Context seems to be properly updated with other CLI tools such as gemini afair

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #5604

Powered by Codex Action

kargarisaac · 10 months ago

I still get this as well. sometimes it does autocompact, but sometimes fails and stops

teub · 10 months ago

@zhao-oai I tried building your PR but the context is still stuck at 100% left with my repro steps!
It was worth a shot though, thank you for the link.

teub · 10 months ago

Another hint about what the problem could be: if I type /status, I get a token usage of 0

teub · 10 months ago

Could be a duplicate of #2565 or #2293 ?