Skip to content

Compaction triggers too soon in comparison to context window size #21520

Closed as not planned

Description

@fteotini

Description

Hi,
I'm on github copilot provider and using GPT-5.4 extensively.

From models.dev, GPT-5.4 has:

Context Limit Input Limit Output Limit
400,000 272,000 128,000

But opencode triggers compaction early, around 128k.
I can confirm OpenCode is able to read the correct context window:

Image

Also, I added this compaction config but it seems not respected:

{
  "compaction": {
    "auto": false,
    "prune": true,
    "reserved": 10000
  },
}

Plugins

No response

OpenCode version

1.4.0 TUI

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

MacOs

Terminal

Warp

Activity

  1. github-actions commented on Apr 8, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If your issue is primarily about the config not being respected, consider commenting on #16882 instead. If it's specifically about the wrong threshold being used for GPT-5.4's context window, this may be a distinct bug worth tracking separately.

  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 8, 2026
  3. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. github-actions commented on Jul 3, 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