GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — OpenCode immediately triggers “Input exceeds context window” and auto-compaction in empty sessions after latest update · Issue #27315 · anomalyco/opencode

OpenCode immediately triggers “Input exceeds context window” and auto-compaction in empty sessions after latest update #27315

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
OpenCode immediately triggers “Input exceeds context window” and auto-compaction in empty sessions after latest update#27315
Copy link
Assignees
kitlangton

Description

@evscott
evscott
opened on May 13, 2026
Issue body actions

Description

Since updating to the latest version, every new session immediately reports “Input exceeds context window of this model” and then automatically begins compacting the session, even when launched in a completely empty directory with no files or context loaded.

This happens consistently across multiple OpenAI models, including GPT-5.5.

The issue appears before any meaningful prompt or conversation history exists, even in an empty directory.

Plugins

None

OpenCode version

1.14.48

Steps to reproduce

  1. Update OpenCode to the latest version
  2. Open a completely empty directory
  3. Launch OpenCode
  4. Type a very short prompt (e.g. "hi")
  5. Observe immediate “Input exceeds context window of this model” automatic compaction process

Screenshot and/or share link

Image

Operating System

macOS 15.6.1

Terminal

Ghostty

Reacted by Lara Kelley, ricred, The Greg and eSoares

Activity

  1. github-actions
    assigned
    kitlangton
    on May 13, 2026
  2. github-actions commented on May 13, 2026

    @github-actions
    github-actionsBot
    on May 13, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • Instant compaction on first github-copilot/gpt-5.4 prompt with 3 screenshots #19863: Instant compaction on first prompt with GPT-5.x model in a fresh session (similar symptom: immediate compaction before any meaningful conversation history)
    • Large AGENTS.md files consume entire context window, triggering immediate compaction #18037: Immediate compaction triggered on first turn (different cause — large AGENTS.md — but same "compaction on first message" symptom that may share root cause)
  3. evscott commented on May 13, 2026

    @evscott
    evscott
    on May 13, 2026
    Author
    More actions

    I think I narrowed this down to having something to do with the Posthog MCP. Removing it from my config resolves the issue.

    For example, this is my config which results in Input exceeds context window of the model

    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "posthog": {
          "type": "remote",
          "url": "https://mcp.posthog.com/mcp",
          "enabled": true
        },
        "sentry": {
          "type": "remote",
          "url": "https://mcp.sentry.dev/mcp",
          "oauth": {},
          "enabled": true
        },
      },
      "agent": {
        "plan": {
          "model": "openai/gpt-5.5",
          "tools": {
            "write": false,
            "edit": false,
            "bash": true,
            "webfetch": true
          }
        },
        "build": {
          "model": "openai/gpt-5.5",
          "tools": {
            "write": true,
            "edit": true,
            "bash": true,
            "webfetch": true
          }
        },
      }
    }
    

    Whereas this works fine

    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "sentry": {
          "type": "remote",
          "url": "https://mcp.sentry.dev/mcp",
          "oauth": {},
          "enabled": true
        },
      },
      "agent": {
        "plan": {
          "model": "openai/gpt-5.5",
          "tools": {
            "write": false,
            "edit": false,
            "bash": true,
            "webfetch": true
          }
        },
        "build": {
          "model": "openai/gpt-5.5",
          "tools": {
            "write": true,
            "edit": true,
            "bash": true,
            "webfetch": true
          }
        },
      }
    }
    

    I'll leave open the issue incase you want to do something about this (not sure what). But, feel free to close it otherwise. I'm unblocked at least.

  4. antonlvovych commented on May 13, 2026

    @antonlvovych
    antonlvovych
    on May 13, 2026
    More actions

    same for me - also just after installed posthog mcp. endless auto compaction loop starting with any session, including completely new ones

  5. rekram1-node
    closed this as not plannedon Jun 12, 2026
  6. rekram1-node
    closed this as a duplicateof [FEATURE]:Add mcp search tool, reduce mcp tool occupying a lot of context #8625 on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @kitlangton
    kitlangton

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.