Pro tip: enable experimental context management for gpt-6-astra in Codex, 400k tokens sweet spot

brandon_galang · x · 2026-09-08

A practical config tip for Codex users running gpt-6-astra: enable the experimental context management setting, which lets the model manage its context by leaving notes for itself. The model also doesn't charge a premium above the previous 270k token limit, making larger windows far more practical.

To apply, edit /.codex/config.toml and add these lines before any [section] headers:

model = "gpt-6-astra"

modelcontextwindow = 400000

modelautocompacttokenlimit = 360000

The author advises against going all the way to 1M — broken caches at the upper range can wreck your rate limits; 400k is the recommended sweet spot.

Original post →

More from coding & agent

coding & agent channel →