Codex models missing auto_compact_token_limit causes sluggish TUI as context grows

Open Beginner friendly
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Domain
ai, performance

Research direction

Open prompts/codex-models.json and review each Codex model entry. Set auto_compact_token_limit to 100000 for every Codex model, then verify that no Codex entry remains null and that the JSON stays valid.

Written by the indexing model from the issue text.

Description

All Codex models in prompts/codex-models.json have auto_compact_token_limit: null. When null, effective_compaction_max_context_chars falls back to DEFAULT_MAX_CONTEXT_CHARS (240,000 chars ≈ 60k tokens), but Codex's actual context window is 272,000 tokens — far larger. This means the TUI keeps sending an ever-growing context to the API for many turns before compaction fires, causing noticeable response and rendering slowdown in longer sessions.

Setting a reasonable auto_compact_token_limit on each Codex model would trigger compaction well before the context bloats. A value around 100_000 tokens is a sensible default — large enough not to compact prematurely, small enough to keep response times fast.

// prompts/codex-models.json — apply to each Codex model entry
{
  "auto_compact_token_limit": 100000,
  ...
}
Dominant language
Rust
Stars
640
Forks
39
PR merge metrics
No merged PRs in 30d

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.

More from browser-use/terminal

All issues in browser-use/terminal

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.