Skip to content

tui: compaction triggers around 30–35% with gpt-5.6-sol #38851

Description

@magoz

Summary

In the TUI, automatic compaction consistently triggers when the context indicator reaches only
approximately 30–35% while using openai/gpt-5.6-sol. This causes sessions to be
compacted while most of the reported context window remains available.

Environment

  • opencode version: v0.0.0-next-16197
  • OS: Darwin 25.4.0, arm64
  • Terminal: tmux (TERM=xterm-256color, COLORTERM=truecolor)
  • Shell: /bin/zsh
  • Install/channel: OpenCode 2 beta/next
  • Active plugins: none
  • Model: openai/gpt-5.6-sol

Reproduction

  1. Launch the OpenCode 2 beta TUI with openai/gpt-5.6-sol as the active model.
  2. Continue working in a session until the TUI context indicator reaches approximately 30–35%.
  3. Observe that automatic compaction starts at that point.

Expected Behavior

Compaction should occur only when the session approaches the model's usable context
limit. A context indicator showing 30–35% should not cause automatic compaction unless
the displayed percentage or configured model limit is incorrect.

Actual Behavior

Automatic compaction consistently starts around 30–35% reported context usage in the TUI.

Additional Context

The behavior is consistent with openai/gpt-5.6-sol. Other models have not been tested.
No exact error is shown, and no workaround has been identified.

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