Skip to content

[BUG]: Context percentage indicator doesn't reflect usable context proportion #28057

Closed as not planned

Description

@MoodyMarshmallow

Description

The context percentage indicator seems to use the model's raw context limit instead of the usable number of tokens before compaction.

For models with separate input and context limits, I feel that this can make context usage look much lower than it effectively is and lead to compaction when the percentage indicator is quite low.

Consider a model with a 400k context limit, 272k input limit, and 20k tokens reserved for compaction. The indicator may show 126k / 400k = 32%, even though the proportion of used to usable context is 126k / (272k - 20k) = 50%.

Consequently, the model may compact with the context percentage indicator showing 63% instead of close to 100%.

Not sure if this behaviour is intended? I personally find it somewhat misleading.

Plugins

none

OpenCode version

1.15.3

Steps to reproduce

How can we reproduce this issue?

  1. Use a model with separate context and input limits, such as GPT 5.5.
  2. Accumulate enough session context to observe the TUI context percentage.
  3. Compare the displayed percentage against the proportion of non-compaction input tokens used.

Screenshot and/or share link

Operating System

Arch Linux

Terminal

Ghostty

Activity

  1. changed the title [-]Context percentage indicator doesn't reflect usable context usage[/-] [+][BUG]: Context percentage indicator doesn't reflect usable context usage[/+] on May 17, 2026
  2. changed the title [-][BUG]: Context percentage indicator doesn't reflect usable context usage[/-] [+][BUG]: Context percentage indicator doesn't reflect usable context proportion[/+] on May 17, 2026
  3. kommander commented on May 18, 2026

    @kommander
    Contributor
  4. github-actions commented on Jul 19, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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