Skip to content

Codex models missing auto_compact_token_limit causes sluggish TUI as context grows #37

@rjpruitt16

Description

@rjpruitt16

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,
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions