stuck at "100% context left" for local models

Resolved 💬 5 comments Opened Oct 26, 2025 by teub Closed Nov 1, 2025

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 ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗