Skip to content

Instant compaction on first github-copilot/gpt-5.4 prompt with 3 screenshots #19863

Closed as not planned

Description

@thatdaveguy1

Planned GitHub issue submission

Title

Instant compaction on first github-copilot/gpt-5.4 prompt with 3 screenshots

Body

Description

Fresh desktop session, first real prompt, github-copilot/gpt-5.4, 1 text part + 3 PNG screenshots.

OpenCode immediately inserted a compaction overflow event and compacted the session instead of handling the multimodal request normally.

This looks like an oversized request assembly problem, not normal long-session compaction.

Plugins

~/.config/opencode/plugins/stall-watch.js

OpenCode version

1.3.5

Possible regression window: 1.3.4 included Refactor session compaction service to use Effect.

Steps to reproduce

  1. Open a new desktop session.
  2. Select github-copilot/gpt-5.4.
  3. Submit the first prompt with:
    • 1 text part
    • 3 PNG screenshots
  4. Observe immediate compaction.

Screenshot and/or share link

I am not including the original screenshots or prompt text here because they were real working-context attachments.

Here is the exact metadata/evidence from the local OpenCode DB for the repro session:

  • Session ID: ses_2c62311e5ffeWeo5Gd4IDrPmST
  • Session title: New session - 2026-03-29T13:51:13.434Z
  • First prompt text length: 430 characters
  • Image count: 3
  • Total serialized image payload in part.data: 6,445,024 bytes
  • Individual serialized image-part sizes:
    • 2641252 bytes
    • 1908532 bytes
    • 1895240 bytes

The image parts were stored as inline base64 data:image/png;base64,... payloads.

Immediately after the first user message, OpenCode inserted:

{"type":"compaction","auto":true,"overflow":true}

It then inserted a synthetic follow-up saying:

The previous request exceeded the provider's size limit due to large media attachments. The conversation was compacted and media files were removed from context. If the user was asking about attached images or files, explain that the attachments were too large to process and suggest they try again with smaller or fewer files.

Why this seems like an OpenCode bug

  • Global config only had:
"compaction": {
  "auto": true,
  "prune": true
}
  • No custom compaction.reserved
  • No project-level OpenCode config in the target repo
  • After compaction removed the attachments, github-copilot/gpt-5.4 continued to work normally in the same session

So this looks like OpenCode is building an oversized multimodal request, likely because pasted screenshots are serialized inline as large base64 data: payloads.

Expected behavior

Prefer any of these over instant session compaction:

  • downscale/compress screenshots before request assembly
  • keep attachments out of the main context budget until send time
  • surface a direct "attachments too large" error without compacting the whole conversation
  • preserve the original attachments and let the user retry with fewer/smaller files

Operating System

macOS arm64

Terminal

Desktop app repro

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    webRelates to opencode on web / desktop
    on Mar 29, 2026
  2. github-actions commented on Mar 29, 2026

    @github-actions
    Contributor

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

  3. removed
    webRelates to opencode on web / desktop
    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