cd /news/ai-tools/the-config-line-that-outlived-its-mo… · home topics ai-tools article
[ARTICLE · art-109971] src=hajek.no ↗ pub= topic=ai-tools verified=true sentiment=· neutral

The config line that outlived its model

A developer burned 39% of a weekly Codex quota in 4.5 hours, with 1,491 of 3,065 requests exceeding 272,000 input tokens, triggering a 2x input and 1.5x output price repricing for entire requests. The cause was a stale config line setting `model_context_window = 1000000` and `model_auto_compact_token_limit = 900000` in `~/.codex/config.toml`, which overrode OpenAI's July 18 reduction of GPT-5.6's reported context window from 372,000 to 272,000 tokens, preventing auto-compaction and inflating costs.

read2 min views27 publishedAug 23, 2026
The config line that outlived its model
Image: Hajek (auto-discovered)

I burned 39% of a weekly Codex quota in four and a half hours, and none of it was a bug.

That was Tuesday. 51% at 18:32, 90% at 23:00. Nine concurrent sessions at peak across three workspaces, nothing stuck in a loop, nothing retrying. It was all work I meant to run.

What stopped me was not money. I was going to run out of week, so I d it and went to sleep.

The next day I reconstructed where it went. Codex writes one JSONL file per session, and every model response records its own token counts, so the whole afternoon was sitting on disk.

1,491 of my 3,065 requests were over 272,000 input tokens.

Above that line the request is repriced at 2x input and 1.5x output. Not the tokens above the line. The whole request.

A month earlier, on 18 July, OpenAI had cut the context window that Codex reports for GPT-5.6 from 372,000 down to 272,000. The same number. Auto-compaction fires at a percentage of the reported window, so the smaller window should have compacted my sessions sooner and kept every request under the price line.

My config overrode it. model_context_window = 1000000

, with model_auto_compact_token_limit = 900000

. Sessions peaked at 611,000.

I set those lines myself. Opus has a million-token window, I read that Codex could do the same, so I switched it on. That was during GPT-5.5, which never pushed a session near that line. GPT-5.6 does. The model changed underneath the setting and the setting did not.

The setting was mine. The 272,000 line was not. It took both to make that afternoon cost what it did.

Most Codex limit complaints this week point at OpenAI. I only know why my own meter moved, and it moved because of two lines I typed into ~/.codex/config.toml

a model version ago. If you never set model_context_window

, the changelog is your answer and this post is not about you. If you did set it, go and look at what you set it to, and when.

Both override lines are commented out now. I have not run a comparable afternoon since, so I do not know yet what that saves.

── more in #ai-tools 4 stories · sorted by recency
── more on @openai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-config-line-that…] indexed:0 read:2min 2026-08-23 ·