Skip to content

Context % uses limit.context instead of limit.input for split-window models #51251

Closed as not planned

Description

@manjeetsharma0796

Description

For models with a separate input limit (e.g. gpt-5.3-codex: context 400k, input 272k), the context % in the TUI divides by limit.context. Compaction uses limit.input (see usable() in packages/opencode/src/session/overflow.ts), so the % shown is lower than how close the session actually is to compacting.

Example with gpt-5.3-codex at 272k tokens: TUI shows 68%, but the input window is full.

Affected places:

  • packages/tui/src/component/prompt/index.tsx (prompt footer)
  • packages/tui/src/feature-plugins/sidebar/context.tsx (sidebar)
  • packages/tui/src/routes/session/subagent-footer.tsx (subagent footer)
  • packages/opencode/src/cli/cmd/run/runtime.boot.ts (run limits map)

Steps to reproduce

  1. Use a model whose models.dev entry has limit.input lower than limit.context (e.g. openai/gpt-5.3-codex)
  2. Run a long session
  3. Compare the context % with when compaction triggers

Activity

  1. added a commit that references this issue on Sep 25, 2026
    49f0011
  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions