anomalyco / anomalyco/opencode

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

Open
#38,851 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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.

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.

Research direction

Start by reproducing the issue in the OpenCode 2 beta TUI with openai/gpt-5.6-sol, then trace the context indicator and automatic compaction paths. Compare the displayed percentage with the configured model limit; done means compaction no longer starts around 30–35% unless that limit is actually reached.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.